Binds a generic plain text editor to a JSON CRDT str node,
enabling real-time collaborative editing of <input>, <textarea>, and code
editors like CodeMirror, Monaco, and Ace.
npm install json-joy @jsonjoy.com/collaborative-str
The minimal integration implements only get() and set():
import {StrBinding} from '@jsonjoy.com/collaborative-str';
const unbind = StrBinding.bind(
() => model.api.str(['path', 'to', 'string']),
{
get: () => input.value,
set: (text) => { input.value = text; },
},
true,
);For granular sync, implement more of the EditorFacade interface — see the
full documentation.
