Integration features

Live, runnable demos β€” AI assistant Β· image upload hook Β· @mention & #task Β· Markdown / JSON / HTML export Β· fromTextarea Β· renderStatic.

P0 Editor β€” upload hook + @mention + AI

Type @ to tag a person, # to link a task. Insert an image (toolbar / paste / drop) β€” it uploads via the image.upload hook (simulated 800 ms) and the placeholder is swapped for the returned URL.


      
    

P0 AI assistant β€” selection toolbar + ghost-text

In the editor above: select some text β†’ a floating bar offers Improve Β· Fix Β· Shorten Β· Lengthen Β· Simplify Β· Summarize and a free-form Ask AI… box, each previewed with Accept / Retry / Discard. Or just keep typing to see a greyed ghost-text suggestion β€” press Tab to accept. This demo mocks the model locally (it streams a transformed version of your text); in your app you point ai.complete at your own LLM. No SDK is bundled, and the module tree-shakes to 0 when unused.

P1 Markdown & JSON round-trip

Load content into the editor above from Markdown or JSON. Edit, then re-export β€” the mention ids survive the round-trip.


    

P0 Comment box β€” Enter-to-send Β· toolbar compact Β· attach file

Enter sends, Shift+Enter = newline β€” but when the @ popup is open, Enter picks the mention instead of sending. A trimmed toolbar adds a file button (paperclip) that uploads via file.upload and inserts a chip. Presets 'compact' / 'full' / { exclude } also available.

Sent messages (Enter):


    

P1 fromTextarea β€” 2-way sync + controller

The textarea is enhanced into an editor. Edits sync to textarea.value (native input fired); writing the value back updates the editor. The returned editor exposes setValue() / getValue() / destroy().

textarea.value (live mirror, format: markdown):