mirror of
https://github.com/codex-team/editor.js
synced 2024-06-05 07:22:26 +02:00
fix ce-block data attribute
This commit is contained in:
parent
dc1d780c89
commit
78db8563d6
|
@ -217,7 +217,7 @@ var cdxAttaches = function () {
|
|||
|
||||
upload.current = progress;
|
||||
|
||||
codex.editor.content.switchBlock(codex.editor.content.currentNode, progress);
|
||||
codex.editor.content.switchBlock(codex.editor.content.currentNode, progress, 'attaches');
|
||||
|
||||
},
|
||||
|
||||
|
@ -261,7 +261,7 @@ var cdxAttaches = function () {
|
|||
data.size = Math.ceil(data.size / KBYTE) || 1;
|
||||
|
||||
uploadedFile = ui.uploadedFile(data);
|
||||
codex.editor.content.switchBlock(upload.current, uploadedFile);
|
||||
codex.editor.content.switchBlock(upload.current, uploadedFile, 'attaches');
|
||||
|
||||
uploadedFile.querySelector('input').focus();
|
||||
|
||||
|
@ -290,7 +290,7 @@ var cdxAttaches = function () {
|
|||
|
||||
var defaultFrom = ui.defaultForm();
|
||||
|
||||
codex.editor.content.switchBlock(upload.current, defaultFrom);
|
||||
codex.editor.content.switchBlock(upload.current, defaultFrom, 'attaches');
|
||||
|
||||
if (!upload.aborted) {
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ var header = (function(header_plugin) {
|
|||
new_header.setAttribute('data-placeholder', 'Заголовок');
|
||||
new_header.dataset.headerData = type;
|
||||
|
||||
codex.editor.content.switchBlock(old_header, new_header);
|
||||
codex.editor.content.switchBlock(old_header, new_header, 'header');
|
||||
|
||||
/** Close settings after replacing */
|
||||
codex.editor.toolbar.settings.close();
|
||||
|
|
|
@ -359,7 +359,7 @@ var image = (function(image_plugin) {
|
|||
|
||||
var newImage = make_(data);
|
||||
|
||||
codex.editor.content.switchBlock(image.holder, newImage);
|
||||
codex.editor.content.switchBlock(image.holder, newImage, 'image');
|
||||
newImage.classList.add(elementClasses_.imagePreview);
|
||||
|
||||
/**
|
||||
|
@ -404,7 +404,7 @@ var image = (function(image_plugin) {
|
|||
var oldHolder = image.holder;
|
||||
var form = ui_.makeForm();
|
||||
|
||||
codex.editor.content.switchBlock(oldHolder, form);
|
||||
codex.editor.content.switchBlock(oldHolder, form, 'image');
|
||||
|
||||
}
|
||||
},
|
||||
|
@ -467,7 +467,7 @@ var image = (function(image_plugin) {
|
|||
|
||||
var img = image.querySelector('img');
|
||||
|
||||
codex.editor.content.switchBlock(codex.editor.content.currentNode, image);
|
||||
codex.editor.content.switchBlock(codex.editor.content.currentNode, image, 'image');
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ var list = (function(list_plugin) {
|
|||
newEditable.innerHTML = oldEditable.innerHTML;
|
||||
newEditable.classList.add(elementClasses_.pluginWrapper);
|
||||
|
||||
codex.editor.content.switchBlock(currentBlock, newEditable);
|
||||
codex.editor.content.switchBlock(currentBlock, newEditable, 'list');
|
||||
},
|
||||
keyDown: function (e) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue