Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to update the data property of Editorjs options

See original GitHub issue

Hi, 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:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

DDrollcommented, Sep 24, 2019

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.

itsMarydancommented, Jul 9, 2021

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

Read more comments on GitHub >

github_iconTop 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 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found