mirror of
https://github.com/codex-team/editor.js
synced 2024-05-23 08:42:25 +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;
|
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;
|
data.size = Math.ceil(data.size / KBYTE) || 1;
|
||||||
|
|
||||||
uploadedFile = ui.uploadedFile(data);
|
uploadedFile = ui.uploadedFile(data);
|
||||||
codex.editor.content.switchBlock(upload.current, uploadedFile);
|
codex.editor.content.switchBlock(upload.current, uploadedFile, 'attaches');
|
||||||
|
|
||||||
uploadedFile.querySelector('input').focus();
|
uploadedFile.querySelector('input').focus();
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ var cdxAttaches = function () {
|
||||||
|
|
||||||
var defaultFrom = ui.defaultForm();
|
var defaultFrom = ui.defaultForm();
|
||||||
|
|
||||||
codex.editor.content.switchBlock(upload.current, defaultFrom);
|
codex.editor.content.switchBlock(upload.current, defaultFrom, 'attaches');
|
||||||
|
|
||||||
if (!upload.aborted) {
|
if (!upload.aborted) {
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ var header = (function(header_plugin) {
|
||||||
new_header.setAttribute('data-placeholder', 'Заголовок');
|
new_header.setAttribute('data-placeholder', 'Заголовок');
|
||||||
new_header.dataset.headerData = type;
|
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 */
|
/** Close settings after replacing */
|
||||||
codex.editor.toolbar.settings.close();
|
codex.editor.toolbar.settings.close();
|
||||||
|
|
|
@ -359,7 +359,7 @@ var image = (function(image_plugin) {
|
||||||
|
|
||||||
var newImage = make_(data);
|
var newImage = make_(data);
|
||||||
|
|
||||||
codex.editor.content.switchBlock(image.holder, newImage);
|
codex.editor.content.switchBlock(image.holder, newImage, 'image');
|
||||||
newImage.classList.add(elementClasses_.imagePreview);
|
newImage.classList.add(elementClasses_.imagePreview);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -404,7 +404,7 @@ var image = (function(image_plugin) {
|
||||||
var oldHolder = image.holder;
|
var oldHolder = image.holder;
|
||||||
var form = ui_.makeForm();
|
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');
|
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.innerHTML = oldEditable.innerHTML;
|
||||||
newEditable.classList.add(elementClasses_.pluginWrapper);
|
newEditable.classList.add(elementClasses_.pluginWrapper);
|
||||||
|
|
||||||
codex.editor.content.switchBlock(currentBlock, newEditable);
|
codex.editor.content.switchBlock(currentBlock, newEditable, 'list');
|
||||||
},
|
},
|
||||||
keyDown: function (e) {
|
keyDown: function (e) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue