X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/981e87b8a8d4dfca0c816d8bcedcd7c4dbdab9f4..cff9718672752da4840cb0b5bd62c60e7d9c7a30:/src/editor/plugins/core/switch.js diff --git a/src/editor/plugins/core/switch.js b/src/editor/plugins/core/switch.js index 645f7ad..e3ec5c4 100644 --- a/src/editor/plugins/core/switch.js +++ b/src/editor/plugins/core/switch.js @@ -67,12 +67,14 @@ var createSwitchAction = function(createParams) { }; var headerAction = createSwitchAction({name: 'switchToHeader', from: {tagName: 'div', klass: 'p'}, to: {tagName: 'header', klass: '', name: gettext('header')}}), - paragraphAction = createSwitchAction({name: 'switchToParagraph', from: {tagName: 'header'}, to: {tagName: 'div', klass: 'p', name: gettext('paragraf')}}); + paragraphAction = createSwitchAction({name: 'switchToParagraph', from: {tagName: 'header'}, to: {tagName: 'div', klass: 'p', name: gettext('paragraph')}}), + imageAction = createSwitchAction({name: 'switchToImage', from: {tagName: 'div'}, to: {tagName: 'div', klass: 'img', name: gettext('image')}}), + videoAction = createSwitchAction({name: 'switchToVideo', from: {tagName: 'div'}, to: {tagName: 'div', klass: 'video', name: gettext('video')}}); return { - actions: [headerAction, paragraphAction], + actions: [headerAction, paragraphAction, imageAction, videoAction], canvasActionHandler: { - handles: [headerAction, paragraphAction], + handles: [headerAction, paragraphAction, imageAction, videoAction] // handle: function(canvas, action, ret) { // var params = {}, // f;