Notes

A notes app with a notebook tree, WYSIWYG editing, and live collaboration.

Since 0.9.1BETA

Usage

Shared notes

In view, Lin joins and types a to-do one character at a time, then Zhou comments on it; click anywhere to take over.

Loading demo...

Overview

A team notes space in the style of Notion or Bear: notebooks on the left, one note open in TxMarkdownEditor's rich text, and who is here along the top. The people, notes and numbers are sample data, and the AI rewrite in the selection bar is simulated locally; no model is called.

  • The first time it scrolls into view it plays once: after about 0.7 seconds Lin joins, moves to the end of a to-do and types - [ ] Ship Burn after reading to beta by Friday one character at a time; Zhou then selects “by Friday” and comments on it, and a toast inside the stage says so for about four seconds. The whole script takes about 6 seconds.
  • Both colleagues come in through the editor's real collaboration adapter, carets and name tags through onPeers and typing through onChanges, so undo history, comment anchors and the status bar's counts follow their edits as they would a server's. Comments are bound with v-model:comments.
  • The first pointer, key or focus inside the template takes over: Lin finishes the line she is on at once, and nothing else is scheduled. Reduced motion shows where the script ends, with no timers.
  • Nothing in the script focuses or scrolls: remote edits only patch the editor's DOM, and the reader's selection stays where it was.
  • Click a note in the tree to open it; the search matches titles and bodies. New note adds an empty note to the current notebook and puts the caret in it.
  • Wide (≥ 960px) adds the note's properties (created by, notebook, updated, words, comments, tags) and its recent activity; 640–959px keeps the tree and the editor; below 640px the tree slides in from the menu button.

Customization

  • For a real backend, send forwards each local change set and subscribe delivers remote ones already rebased onto the editor's current document; transformMarkdownChanges and mapMarkdownPosition from @talex-touch/tuffex/markdown-editor do the rebasing. Keep the adapter object stable: a new object restarts the session.
  • The editor is keyed by note, so each note gets its own document, undo history and subscription, and the remount announces again who is in it.
  • A peer's name tag shows for 2.5 seconds after its caret moves, and a caret the editor only maps through an edit does not count as moving; the script moves Lin's caret before she types, so her tag stays up for the whole line.
  • Zhou's comment arrives as a highlight, the count on the comments button and the toast; the sidebar stays closed. openComments(id) on the editor opens it on a thread.
  • The Words row is markdownStats(body).words from @talex-touch/tuffex/markdown-editor, the status bar's own count.
RegionComponentsRole
NotebooksTxTree, TxSearchInput, TxButtonThree notebooks, the filter, and New note
Top barTxBreadcrumb, TxAvatarGroup, TxAvatar, TxButton, TxIconButtonWhere the note is, who is here, and Share
EditorTxMarkdownEditorRich text, toolbar, slash menu, selection bar, comments and status bar, with the collaboration adapter
Properties (wide)TxDescriptions, TxTag, TxAvatarCreated by, updated, words, comments, tags, and activity
NoticeTxToastPanelZhou's comment and the share link