Data & embeds
Calendar Plugin
Calendar atoms and the Calendar Editor studio. Source of truth is attrs.payload: CalendarDoc (no localStorage). Same studio UI for WYSIWYG atom popup (surface: 'atom') and the standalone app (surface: 'workspace').
Features
- Views: month, week, day, year, agenda (week/day share one timed grid)
- Layers (calendars) with color + visibility
- One EventInspector (all-day + RRULE toggles)
- JSON primary I/O; thin ICS import/export
- Drag/resize timed events; month day-move
- Publish reminders via
calendar-remindersruntime — recurring events get one reminder per occurrence in the next 60 days from publish - Timed events past midnight render on each day they touch; moving one keeps its duration
Full Calendar-only app: Calendar Editor · compare surfaces: Editors.
Basic Usage
import { Editor, CalendarPlugin } from 'on-codemerge';
const editor = new Editor(container, {
plugins: [CalendarPlugin()], // surface: 'atom' (default)
});
Demo
Public API
Factory: CalendarPlugin({ surface?, toolbar?, features? }).
| Command | |
|---|---|
insertCalendar | editor.command('insertCalendar') |
calendar.addEvent | workspace only |
calendar.clearEvents | workspace only |
Keyboard shortcuts
| Shortcut | Command |
|---|---|
Mod-Alt-l | insertCalendar |
CalendarDoc
type CalendarDoc = {
title: string;
tz: string; // single doc-level IANA tz
view: 'month' | 'week' | 'day' | 'year' | 'agenda';
cursor: string; // YYYY-MM-DD
calendars: { id: string; title: string; color: string; visible: boolean }[];
events: CalendarEvent[];
};
Legacy payloads { calendar, events } with date / time / duration are coerced on load.
Surfaces
| Surface | Role |
|---|---|
atom | In-document widget + lg studio popup (Save/Cancel) |
workspace | Shell ViewPort studio; requires doc → calendar seed |
See also
Form Builder
The Form Builder Plugin provides comprehensive form creation and management capabilities for the on-CodeMerge editor. It allows users to build interactive forms with various field types, validation rules, and templates through an intuitive visual interface.
Timer
The Timer Plugin provides comprehensive countdown timer functionality for the on-CodeMerge editor, allowing users to create, edit, and manage countdown timers with real-time updates through an intuitive interface.