Draft.js bindings or implementation

Hi , Team

Thanks for making Y.js its quite impressive on features , however i do wish to know is ther any bindings or documenatation on how to use it on Draft.js (https://github.com/facebook/draft-js)

looking forward for reply

Thank you

Hi @ajay01994,

There currently doesn’t exist a Draft.js binding for Yjs.

I haven’t written a generic tutorial on how to create editor bindings. The basic idea is to reflect the editor-model with Yjs’ shared types. Now every time the editor changes, you change the shared types. When the shared types change (use the observeDeep event), you reflect the changes in the editor.

For Draft.js, you probably want to use Y.Xml* as a data model.