Update slate content using javascript #4289
Unanswered
sramineni-suki
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to update the text inside slate editor using javascript.
The slate component updates the text to database once it looses focus, for this to happen my text changes have to be reflected in its state.
I have tried to dispatch change events on target element, like below:
Also tried to update its textContent:
targetSlateElement.textContent = "Testing Slate JS"
Is there a way around to implement this ? Highly critical as of now.
Beta Was this translation helpful? Give feedback.
All reactions