@jsonjoy.com/collaborative-peritext
v18.28.0
Published
JSON CRDT peritext node bindings to any generic rich-text editor.
Readme
Collaborative rich-text editor binding
Binds a generic rich-text editor to a JSON CRDT peritext node, enabling
real-time collaborative rich-text editing.
Installation
npm install json-joy @jsonjoy.com/collaborative-peritextUsage
import {PeritextBinding, type RichtextEditorFacade} from '@jsonjoy.com/collaborative-peritext';
const editor: RichtextEditorFacade = {
get: () => toViewRange(myEditor),
set: (fragment) => renderFragment(myEditor, fragment),
// optional: onchange, getSelection, setSelection, dispose
};
const unbind = PeritextBinding.bind(() => peritextApi, editor);See the full documentation
for the complete RichtextEditorFacade interface.
Funding
This project is funded through NGI Zero Core, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.
