sstur / react-rte

Pure React rich text WYSIWYG editor based on draft-js.
https://react-rte.org
ISC License
2.86k stars 430 forks source link

RTE Value changed randomly when update text #161

Open mo-rubikal opened 7 years ago

mo-rubikal commented 7 years ago

we have some tags need to be evaluated when user write text in RTE,

EX:
tags: name = Mark, email=test@test.com so when use write text in RTE like hello
should be translated to hello Mark so when on change triggered on parent and do the evaluation and then update RTE component it success but there is something miss with the internal state for RTE, cursor not update correctly and some test keep repeated.

mvincent7891 commented 7 years ago

Not sure if this has been resolved but I'm also getting very strange behavior, seemingly whenever the parent component fires off an action (which may in turn update the parent components state, or it could fire off a POST request), and also when I refresh (rarely). Once I break the component (no new text will show up), it takes several refreshes (sometimes empty cache and reload) to use the editor again.

That makes it sound like the problem is with my app's state, but even if I don't fire off an action that updates state and instead just submit a http request, I still sometimes get this erratic behavior.