I'm trying to insert the description of an event in google calendar from my web application and i cant get \n or <br />
to be interpreted as a line break. How does the google calendar interpret newlines? Help would be appreciated!
Millions of people use Google Calendar to track their events. The Calendar API lets you integrate your app with Google Calendar, creating new ways for you to engage your users.
The Google Calendar API is a RESTful API that can be accessed through explicit HTTP calls or via the Google Client Libraries. The API exposes most of the features available in the Google Calendar Web interface.
Are you using a specific client library? If using the protocol, simply putting newline in the content element should work:
<?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>
If using a client library, using '\n' should work as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With