No HTMl in rich event description
parent
5cf6e61061
commit
e5d94e74a2
|
@ -86,4 +86,13 @@ export default class CalEventParser {
|
|||
eventCopy.description = this.getRichDescriptionHtml();
|
||||
return eventCopy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a calendar event with rich description as plain text.
|
||||
*/
|
||||
public asRichEventPlain(): CalendarEvent {
|
||||
const eventCopy: CalendarEvent = { ...this.calEvent };
|
||||
eventCopy.description = this.getRichDescription();
|
||||
return eventCopy;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -508,7 +508,7 @@ const listCalendars = (withCredentials) =>
|
|||
const createEvent = async (credential: Credential, calEvent: CalendarEvent): Promise<unknown> => {
|
||||
const parser: CalEventParser = new CalEventParser(calEvent);
|
||||
const uid: string = parser.getUid();
|
||||
const richEvent: CalendarEvent = parser.asRichEvent();
|
||||
const richEvent: CalendarEvent = parser.asRichEventPlain();
|
||||
|
||||
const creationResult = credential ? await calendars([credential])[0].createEvent(richEvent) : null;
|
||||
|
||||
|
@ -555,7 +555,7 @@ const updateEvent = async (
|
|||
): Promise<unknown> => {
|
||||
const parser: CalEventParser = new CalEventParser(calEvent);
|
||||
const newUid: string = parser.getUid();
|
||||
const richEvent: CalendarEvent = parser.asRichEvent();
|
||||
const richEvent: CalendarEvent = parser.asRichEventPlain();
|
||||
|
||||
const updateResult = credential
|
||||
? await calendars([credential])[0].updateEvent(uidToUpdate, richEvent)
|
||||
|
|
Loading…
Reference in New Issue