mirror of
https://github.com/codex-team/editor.js
synced 2024-06-29 02:40:23 +02:00
fix block order bug
This commit is contained in:
parent
b72593041e
commit
8a910cdabf
|
@ -254,6 +254,7 @@ cEditor.renderer = {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asynchronously returns block data from blocksList by index
|
* Asynchronously returns block data from blocksList by index
|
||||||
* @return Promise to node
|
* @return Promise to node
|
||||||
|
@ -926,7 +927,6 @@ cEditor.content = {
|
||||||
newBlock.classList.add(cEditor.ui.BLOCK_CLASSNAME);
|
newBlock.classList.add(cEditor.ui.BLOCK_CLASSNAME);
|
||||||
newBlock.dataset.type = blockType;
|
newBlock.dataset.type = blockType;
|
||||||
|
|
||||||
|
|
||||||
if (workingNode) {
|
if (workingNode) {
|
||||||
|
|
||||||
cEditor.core.insertAfter(workingNode, newBlock);
|
cEditor.core.insertAfter(workingNode, newBlock);
|
||||||
|
@ -938,12 +938,13 @@ cEditor.content = {
|
||||||
*/
|
*/
|
||||||
cEditor.nodes.redactor.appendChild(newBlock);
|
cEditor.nodes.redactor.appendChild(newBlock);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set new node as current
|
|
||||||
*/
|
|
||||||
cEditor.content.workingNodeChanged(newBlock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set new node as current
|
||||||
|
*/
|
||||||
|
cEditor.content.workingNodeChanged(newBlock);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
97
example.html
97
example.html
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue