Skip to content

Commit

Permalink
fix ce-block data attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
khaydarov committed Apr 25, 2017
1 parent dc1d780 commit 78db856
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions plugins/attaches/attaches.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

},

Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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) {

Expand Down
2 changes: 1 addition & 1 deletion plugins/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions plugins/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
Expand Down Expand Up @@ -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');

}
},
Expand Down Expand Up @@ -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');

};

Expand Down
2 changes: 1 addition & 1 deletion plugins/list/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down

0 comments on commit 78db856

Please sign in to comment.