How to update the data property of Editorjs options
See original GitHub issueHi,
I am not able to find any api or function in the docs which can be used to update the data.
Suppose I have updated data, and want to update the editorjs instance, I suppose something like this should be present.
editorJsInstance.setData(newData);
Can you please help in the same?
Glad to give more insight if required
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Configuration - Editor.js
To initialize the Editor with previously saved data, pass it through the data property: const editor = new EditorJS({ /** * Id of...
Read more >Saving data - Editor.js
To get all entry's data from Editor.js, call the save() method on the ... A blocks property contains an array of objects with...
Read more >Fill Block with saved data - Editor.js
When user will edit previously saved article, Editor will get saved data by the data property. Then the Editor will render Blocks one-by-one...
Read more >Tools API - Editor.js
This article describes all available options for Tools creation. ... Tag event contains pasted HTML element in detail.data property.
Read more >Changing a view - Editor.js
When user pastes an Image URL to the input, we will update ... let's save a main Block wrapper to this.wrapper property to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
render() expects to full structure object to be passed, not only blocks array.
{ “time” : 1550476186479, “blocks” : [ {…}, {…}, {…}], “version” : “2.8.1” } Its not clear from docs) You can only pass
{blocks[ your_blocks ]}
, it works.I sent my editor.js data to MongoDB but when I get it back I am not able to pass it into the editor. I retrieve it using await