google-api - Google Calendar Api 的换行符?

标签 google-api google-calendar-api

我正在尝试从我的网络应用程序在谷歌日历中插入事件的描述,但我无法获得\n 或 <br />被解释为换行符。谷歌日历如何解释换行符?帮助将不胜感激!

最佳答案

您是否使用特定的客户端库?如果使用该协议(protocol),只需在内容元素中添加换行符即可:

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
       xmlns:gCal="http://schemas.google.com/gCal/2005"
       xmlns:gd="http://schemas.google.com/g/2005">
  <title type="text">Event with new line</title>
  <content type="text">This is an event with one
two
three
and and four lines.</content>
<gd:when endTime="2011-12-23T10:00:00.000-07:00" 
         startTime="2011-12-23T08:00:00.000-07:00"/>
</entry>

如果使用客户端库,使用 '\n' 应该也可以。

关于google-api - Google Calendar Api 的换行符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7830582/

相关文章:

javascript - Google Api获取access_token请求返回invalid_request

Android Google Plus 登录问题。 handleSignInResult 返回 False

arrays - 将值推送到数组nodejs

android - Google 日历崩溃,因为我添加了一个结束时间早于开始时间的事件

google-cloud-platform - 有没有API可以获取我的Gcloud帐户中的所有资源

email - 使用 Google API 获取用户的所有电子邮件地址

calendar - Javascript 库创建日历 uri/链接到 Google、Yahoo、Outlook、iCal?

php - 谷歌日历 API : Selecting/Creating calendars?

java - 未找到 Google Calendar API - 缺少日历类

c# - Youtube API上载时间太短