eleven / ocho Public

web: ProseMirror vendored + the composer's markdown core (#531) (#887)

The rich composer's document layer, pure and Node-tested: schema (the
feed's allowlist minus render-only concerns — no headings/images), a
MarkdownParser built on markdown.js's houseParser so composer and feed
can never disagree, a zero-escape MarkdownSerializer (plain text
serializes verbatim; escapes only where generated syntax would corrupt;
strike stays single-tilde; hard_break → plain \n so wire bytes don't
drift under old clients), and the doc⇄plaintext offset mapping the
frozen typeahead contract rides on.

vendor/prosemirror.js is one ESM bundle (class identity across PM
packages) with markdown-it kept external → ./markdown-it.js, so the
page holds exactly one Markdown parser and embed loads never pay for
the editor. No UI change — the view glue lands next.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Paul Campbell 1f3d98dc6cfe74089769b89e005c64f440841673 parent 73c6cbe
4 files changed, +14713 −1
  • package.json +1 −1
  • test/composer.test.mjs +211 −0
  • web/static/composer-md.js +366 −0
  • web/static/vendor/prosemirror.js +14135 −0
package.json

Loading diff…

test/composer.test.mjs

Loading diff…

web/static/composer-md.js

Loading diff…

web/static/vendor/prosemirror.js

Loading diff…