X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/7b7f19b8680ed7653359bede5833d2cffc11ef8c..ac08344e45e2d8f2aaa19fa022a279226117ce13:/src/editor/plugins/core/switch.js diff --git a/src/editor/plugins/core/switch.js b/src/editor/plugins/core/switch.js index 88544bf..2c1e8b0 100644 --- a/src/editor/plugins/core/switch.js +++ b/src/editor/plugins/core/switch.js @@ -10,7 +10,7 @@ var createSwitchAction = function(createParams) { return { name: createParams.name, params: { - fragment: {type: 'context', name: 'fragment'}, + fragment: {type: 'context', name: 'fragment'} }, getState: function(params) { var state = { @@ -68,12 +68,13 @@ 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('paragraph')}}), - imageAction = createSwitchAction({name: 'switchToImage', from: {tagName: 'div'}, to: {tagName: 'div', klass: 'img', name: gettext('image')}}); + imageAction = createSwitchAction({name: 'switchToImage', from: {}, to: {tagName: 'div', klass: 'img', name: gettext('image')}}), + videoAction = createSwitchAction({name: 'switchToVideo', from: {}, to: {tagName: 'div', klass: 'video', name: gettext('video')}}); return { - actions: [headerAction, paragraphAction, imageAction], + actions: [headerAction, paragraphAction, imageAction, videoAction], canvasActionHandler: { - handles: [headerAction, paragraphAction, imageAction], + handles: [headerAction, paragraphAction, imageAction, videoAction] // handle: function(canvas, action, ret) { // var params = {}, // f;