Closed jnguyen32 closed 4 years ago
It is not related to the Core API. You can implement your own Image Tool with the asset manager using vue.js.
Because you can't just set the block data from the editor core — the tool should react to these changes. But you can use the blocks.insert() method to create the block with passed data.
I'm looking through the Core API and I am not sure of a way to set block data externally.
I have a Vue application that already has asset management (image upload/image selection) that I am looking to re-use.
I can trigger the asset manager to display by passing a function via the config.
e.g.,
From within
MyImageTool
:The above code will trigger the display of the asset selector, but once you have the asset chosen (external to EditorJS), how do I pass it back into the tool for saving?