Closed orbachar closed 2 years ago
@orbachar Hi! First of all, thanks for your interest! ๐
Can you show me an example of the use case?
Thanks!
eventually I managed to make it work by using the editor core instance and use it's render function to update the editor content externally
Hi I wonder if is there a way to inject a new block to editor js, programmatically, from an outside event, while allowing to edit the content with the regular behavior of onChange prop.
the way I though of doing that, was to listen to onChange prop as usual, get the blocks on save, and when an outside event happens, push a new block to the content returned from
onChange
, and pass it onvalue
prop. Unfortunately using bothvalue
andonChange
props cause infinite loop.I wonder if is there another way achieving that?