"""
end
# ============================================================================
# 3. document_editor_full/1
# ============================================================================
attr :id, :string, required: true
attr :value, :string, default: ""
attr :title, :string, default: "Untitled"
attr :on_update, :string, default: "editor:update"
attr :class, :string, default: nil
attr :rest, :global
@doc """
Renders a full document editor with header, toolbar, content, sidebar, and footer.
This is the most complete preset — a Google Docs-like experience with title
bar, save status, collapsible sidebar, word count footer, and full formatting
toolbar.
## Example
<.document_editor_full id="report" title="Q4 Report" value={@content} />
"""
def document_editor_full(assigns) do
~H"""
<%!-- Editor with no visible toolbar --%>
<.rich_editor
id={@id}
value={@value}
on_update={@on_update}
placeholder="Press '/' for commands, or just start typing..."
min_height="400px"
toolbar_variant={:floating}
show_word_count={false}
/>
"""
end
# ============================================================================
# 7. google_docs_editor/1
# ============================================================================
attr :id, :string, required: true
attr :value, :string, default: ""
attr :title, :string, default: "Untitled Document"
attr :on_update, :string, default: "editor:update"
attr :track_changes, :boolean, default: false
attr :class, :string, default: nil
attr :rest, :global
@doc """
Renders a Google Docs-style editor with a full menu bar, toolbar,
A4-formatted pages, and optional track changes mode.
Features: document title, save status, full formatting toolbar,
A4 page layout, word count footer, track changes toggle.
## Example
<.google_docs_editor id="doc" title="Q4 Report" track_changes={true} />
"""
def google_docs_editor(assigns) do
~H"""
"""
end
# ============================================================================
# 8. medium_editor_v2/1
# ============================================================================
attr :id, :string, required: true
attr :value, :string, default: ""
attr :on_update, :string, default: "editor:update"
attr :class, :string, default: nil
attr :rest, :global
@doc """
Renders a Medium-style writing experience with floating toolbar, clean
reading typography, and image-focused layout.
Features: floating selection toolbar, large headings, wide image support,
drop cap option, distraction-free writing.
## Example
<.medium_editor_v2 id="story" value={@story_content} />
"""
def medium_editor_v2(assigns) do
~H"""
<%!-- Clean header --%>
Write
<%!-- Editor with floating toolbar --%>
<.rich_editor
id={@id}
value={@value}
on_update={@on_update}
placeholder="Tell your story..."
min_height="500px"
toolbar_variant={:floating}
show_word_count={true}
class="prose prose-lg max-w-none"
/>
"""
end
# ============================================================================
# 9. code_notes_editor/1
# ============================================================================
attr :id, :string, required: true
attr :value, :string, default: ""
attr :on_update, :string, default: "editor:update"
attr :class, :string, default: nil
attr :rest, :global
@doc """
Renders a developer-focused notes editor with syntax highlighting,
code sandbox blocks, and markdown input shortcuts.
Features: code blocks with language detection and highlighting,
inline code formatting, monospace-friendly layout, markdown shortcuts.
## Example
<.code_notes_editor id="dev-notes" value={@notes} />
"""
def code_notes_editor(assigns) do
~H"""
<%!-- Dev toolbar --%>
Code Notes
Markdown shortcuts active
<%!-- Editor with full toolbar --%>
<.rich_editor
id={@id}
value={@value}
on_update={@on_update}
placeholder="# Start with a heading, or ``` for a code block..."
min_height="500px"
toolbar_variant={:default}
show_word_count={true}
class="font-mono"
/>
"""
end
# ============================================================================
# 10. collaborative_editor/1
# ============================================================================
attr :id, :string, required: true
attr :value, :string, default: ""
attr :title, :string, default: "Shared Document"
attr :on_update, :string, default: "editor:update"
attr :collaborators, :list, default: []
attr :class, :string, default: nil
attr :rest, :global
@doc """
Renders a full collaborative editing experience with presence indicators,
cursor tracking, comments sidebar, and version history access.
Designed to integrate with PhiaUI's Collab Suite (CollabRoom, CollabPresence,
etc.) for real-time multi-user editing.
## Example
<.collaborative_editor
id="collab-doc"
title="Team Notes"
collaborators={@online_users}
/>
"""
def collaborative_editor(assigns) do
~H"""