I use Editor.js in my ReactJS application. Everything perfect except I can't pass unique block id as 'id' attribute.
For example, data is:
{
"time": 1658299444298,
"blocks": [
{
"id": "sheNwCUP5A",
"data": {
"text": "Acceptable Use Policy",
"level": 2
},
"type": "header"
}
],
"version": "2.25.0"
}
and DOM-tree is
<div class="codex-editor__redactor" style="padding-bottom: 300px;">
<div class="ce-block">
<div class="ce-block__content">
<h2 class="ce-header" contenteditable="false" data-placeholder="">Audit Policy</h2>
</div>
</div>
</div>
To implement anchor links inside current document I need 'id' attribute for each element passed from data.
...
<h2 id="sheNwCUP5A" class="ce-header" contenteditable="false" data-placeholder="">Audit Policy</h2>
...
Any suggestions please?