Given a DOM div contenteditable element which is rendered and managed by Slate.js/React (it has the __reactFiber$… property, how can I update its text contents via external javascript? If I just change its content via the DOM, the changes are not reflected in the Slate state and the field even freezes – it stops allowing regular keyboard input.
For example: the Discord new message input field.
Is there a way to get the Slate or React editor object for that field and use its API? Or perhaps change the DOM directly but trigger the Slate/React state to sync.
The script is injected into the global page scope.
I was able to get the __reactFiber$xxxx property from the Debug console.