nossas / slate-editor

A complete rich text editor based on SlateJS framework
https://slate-editor.bonde.org
MIT License
263 stars 56 forks source link

Allow state value to be changed externally after the initial value #67

Open abobwhite opened 6 years ago

abobwhite commented 6 years ago

I have been burned by this several times now where I need to bind the value (state) passed into the slate-editor to a changed prop than what it was initialized with but slate-editor never looks at that value except upon initial creation. In my situation, I'm changing locales in my UI to bind to the different translated values. It appears that slate itself doesn't restrict this but slate-editor never exposes a way to externally change the state value.

Let me know if you need any more details.