Add metadata to existing blocks and return it on Editor save
Is there a way to add metadata to a block and have it returned on editor save?
For instance adding a self generated uuid to a particular so I can link the data from a particular block to some other aspect of my application.
{
"type": "paragraph",
"data": {
"text": "Hey. Meet the new Editor. On this page you can see it in action — try to edit this text. Source code of the page contains the example of connection and configuration."
}
uuid: "a24f-fs4f-fsdf4-fsefsdf"
}
When I call save() the uuid part is stripped and it's not returned.
Having this would be awesome to be able to link individual block and add some outside logic to it. Other metadata could be used as well. Allowing metadata key in data would solve the issue as well
{
"type": "paragraph",
"data": {
"text": "Hey. Meet the new Editor. On this page you can see it in action — try to edit this text. Source code of the page contains the example of connection and configuration."
},
metadata: {
uuid: "a24f-fs4f-fsdf4-fsefsdf",
foo: "bar"
}
}
Hi @majuric
Good point! We have plans to extend the API to allow pass any meta data you want
To add a use-case to this request: if I am saving the data in a different format, and assembling it before passing through to Editor.js then it would be useful to have my own meta associated with each block, so that if a block is updated, I can then pass that individual change back to my database.
This could be useful for real-time collaboration, etc.
Is there any new infomation on this issue?
Any update on this? Whatever data I pass should remain on the object after save()
We really need that ability