FAQ

Why is the package called quoin-editor?

npm rejects the bare name quoin as too similar to an existing package, so Quoin is published as quoin-editor. Everywhere in these pages, quoin-editor is the package you install and import.

Where does the name come from?

A quoin is the wedge a letterpress printer tightens to lock blocks of type into the frame, so that nothing moves while the page is printed. Quoin keeps blocks of markdown in place the same way.

Does it render markdown?

Yes. The canvas draws each text block formatted as you type, and keeps its markdown source in data.markdown. toMarkdown, toHTML and toPlainText from quoin-editor/engine turn a whole document into each format, fromMarkdown reads one back, and QuoinView draws it on a server. Blocks you never edit are never rewritten: onChange hands them back as the same objects you supplied, with the same markdown. A block whose id repeats another's is the exception: it gets a fresh id.

Which frameworks does it support?

React 18.2 and later, React 19 included. npm run check:consumer typechecks the packed package against both majors and renders the server entries in plain Node on each.

How stable is it?

From 1.0, Quoin follows semantic versioning: a breaking change waits for the next major version, and every change is listed in the changelog. Until 1.0, a minor version could break, so pin ~0.4.0 to stay on 0.4.

How do I upgrade from 1.x to 2.0?

Change the version. 2.0 keeps the document format, the props of every component and every command of 1.x, and removes seven names that only the view layer ever called itself: BlockShell, SelectionSink, the BlockShellProps and SelectionSinkProps that typed them, VoidBlockFallback, defaultRenderers and isCrossSelection. Five of the seven carried a deprecation notice from 1.8.0. A host that imports none of them has nothing else to do, and the migration guide covers the one with a cost, defaultRenderers, whose text a renderer of your own draws with EditableRegion.

How do I upgrade from 0.4?

A 0.4 document loads in 1.0 as it is, and the BlockCanvas props keep their names. The migration guide lists what changes, from multi-paragraph blocks that split on their first edit to the 0.4 helpers that became engine commands, and ends with a checklist.

Esc

Type to search the guide, the comparison and the changelog.