DayPilot.Event.text

The text() method returns the current event text or sets a new value.

Declaration

DayPilot.Event.text()
DayPilot.Event.text(newText)

The new value is applied when you call DayPilot.Scheduler.events.update().

Parameters

  • newText (string) - new event text.

Notes

When setting a new text value, it automatically updates event HTML. See also DayPilot.Event.client.innerHTML().

Since version 2020.4.4701, strings set using text() are automatically HTML-encoded to help prevent XSS attacks. To set raw HTML, use client.html() or modify data.html (see DayPilot.Event.data).

Example

const oldText = e.text();
e.text("New text");

See Also

DayPilot.Event Class

XSS Protection [doc.daypilot.org]

XSS Protection [doc.daypilot.org]

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript