Extension API of the Nextcloud Calendar app. Other Nextcloud apps use it to extend the calendar, starting with the event editor.
Warning
This library is a pre-release and not yet implemented in the Calendar app. Extensions registered with it have no effect yet, and the API may still change between any versions. Follow the progress in nextcloud/calendar#8522.
npm install @nextcloud/calendarimport { registerEventEditorExtension } from '@nextcloud/calendar'
const registration = registerEventEditorExtension({
app: 'myapp',
name: 'my-field',
setup({ event, editor }) {
const icon = document.createElement('span')
const field = document.createElement('input')
editor.addField({ icon, field })
event.onSave({
callback: () => {
event.setProperty({ name: 'X-MYAPP-VALUE', value: field.value })
},
})
},
})
// Remove the extension again
registration.unregister()| Version | Feature | API | Calendar |
|---|---|---|---|
| 0.0.1-dev.1 | Register extensions for the event editor | registerEventEditorExtension |
– |
| 0.0.1-dev.1 | Add own fields to the event editor | addField |
– |
| 0.0.1-dev.1 | Update the event before it is saved | onSave |
– |
| 0.0.1-dev.1 | Set properties of the event | setProperty |
– |
- Version: first version of this library with the feature. Unreleased versions are planned.
- Calendar: first Calendar app version that implements the feature,
–if none yet.
See CONTRIBUTING.md.