When I paste a copied HTML header (eg <h2>) into EditorJS field, it does not store the header properly, just completely ignores it.
I tried to debug it: something happens in editor.save() method called here, and the followup .then(function (data) function receives empty data (data.blocks is an empty array).
I tried digging into save() method: it seems that for some reason it receives tool: "Header", data: {text: '', level: 2}, although header's text is actually not empty.
When I do anything else in EditorJS field after pasting the header (eg just pressing Enter), it works fine and stores the header and the followup text properly.
Seems to be working fine with other non-header pasted text.
When I paste a copied HTML header (eg
<h2>
) into EditorJS field, it does not store the header properly, just completely ignores it. I tried to debug it: something happens ineditor.save()
method called here, and the followup.then(function (data)
function receives empty data (data.blocks
is an empty array). I tried digging intosave()
method: it seems that for some reason it receivestool: "Header", data: {text: '', level: 2}
, although header's text is actually not empty.When I do anything else in EditorJS field after pasting the header (eg just pressing Enter), it works fine and stores the header and the followup text properly.
Seems to be working fine with other non-header pasted text.