Composite collaborative editor widget.
Composes the full collaboration experience: status bar, TipTap editor, cursor overlay, thread sidebar, floating composer, and version badge. This is the "just give me a collaborative editor" convenience component.
Example
<.collab_editor
id="doc-editor"
doc_id="doc-123"
current_user={%{id: "u1", name: "Alice", color: "#E53E3E", avatar_url: nil}}
users={@online_users}
threads={@threads}
typing_users={@typing_users}
connection_status={@connection_status}
/>
Summary
Functions
Renders a complete collaborative editing experience.
Functions
Renders a complete collaborative editing experience.
Composes status bar, editor, cursors, threads, and version history into a single widget. Toggle features via boolean attrs.
Attributes
id(:string) (required)doc_id(:string) (required)current_user(:map) (required)users(:list) - Defaults to[].threads(:list) - Defaults to[].typing_users(:list) - Defaults to[].versions(:list) - Defaults to[].notifications(:list) - Defaults to[].connection_status(:atom) - Defaults to:connected. Must be one of:connected,:reconnecting, or:offline.cursors(:list) - Defaults to[].show_threads(:boolean) - Defaults totrue.show_cursors(:boolean) - Defaults totrue.show_version_history(:boolean) - Defaults tofalse.show_notifications(:boolean) - Defaults tofalse.show_status_bar(:boolean) - Defaults totrue.editor_placeholder(:string) - Defaults to"Start writing...".editor_min_height(:string) - Defaults to"400px".active_version_id(:string) - Defaults tonil.version_changes(:list) - Defaults to[].last_saved_at(:any) - Defaults tonil.has_unsaved(:boolean) - Defaults tofalse.mention_suggestions(:list) - Defaults to[].show_mention_dropdown(:boolean) - Defaults tofalse.class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
toolbar_extra- Extra toolbar items injected into the editor toolbar.