diff --git a/src/block_manager/config/config.js b/src/block_manager/config/config.js index a0b914e5f..2c96bb49e 100644 --- a/src/block_manager/config/config.js +++ b/src/block_manager/config/config.js @@ -8,7 +8,7 @@ export default { // If there is no selected component, the block will be appened to the wrapper. // You can also pass a function to this option, use it as a catch-all for all block // clicks and implement a custom logic for each block. - // appendOnClick: (editor, block) => { + // appendOnClick: (block, editor) => { // if (block.get('id') === 'some-id') // editor.getSelected().append(block.get('content')) // else diff --git a/src/block_manager/model/Block.js b/src/block_manager/model/Block.js index 842105443..ec40cf862 100644 --- a/src/block_manager/model/Block.js +++ b/src/block_manager/model/Block.js @@ -9,7 +9,7 @@ import { Model } from 'common'; * @property {Boolean} [select=false] If true, the dropped component will be selected * @property {Boolean} [resetId=false] If true, all IDs of dropped components and their styles will be changed * @property {Boolean} [disable=false] Disable the block from being interacted - * @property {Function} [onClick] Custom behavior on click, eg. `(editor, block) => editor.getWrapper().append(block.get('content'))` + * @property {Function} [onClick] Custom behavior on click, eg. `(block, editor) => editor.getWrapper().append(block.get('content'))` * @property {Object} [attributes={}] Block attributes to apply in the view element */ export default class Block extends Model { diff --git a/src/block_manager/view/BlockView.js b/src/block_manager/view/BlockView.js index a8b0d4c3b..d691421d7 100644 --- a/src/block_manager/view/BlockView.js +++ b/src/block_manager/view/BlockView.js @@ -28,7 +28,7 @@ export default Backbone.View.extend({ if (!onClick) { return; } else if (isFunction(onClick)) { - return onClick(em.getEditor(), model, { event: ev }); + return onClick(model, em.getEditor(), { event: ev }); } const sorter = config.getSorter(); const content = model.get('content');