X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b58b8f498d9b5e70aec099829b97af2c4d72da10..b20691e774cac0cbf2ee174472a1b1dbc94fa61b:/modules/documentToolbar/documentToolbar.js?ds=sidebyside diff --git a/modules/documentToolbar/documentToolbar.js b/modules/documentToolbar/documentToolbar.js index a2a1567..e364e99 100644 --- a/modules/documentToolbar/documentToolbar.js +++ b/modules/documentToolbar/documentToolbar.js @@ -33,15 +33,10 @@ return function(sandbox) { wlxmlTag = split[0]; wlxmlClass = split[1]; } - if(window.getSelection().isCollapsed) { - //view.insertNewNode(wlxmlTag, wlxmlClass); - } - else { - //this.wrapWithNodeRequest(wlxmlTag, wlxmlClass); - } sandbox.publish('newNodeRequested', wlxmlTag, wlxmlClass); + } else { + sandbox.publish('command', btn.attr('data-btn'), btn.attr('data-meta')); } - //sandbox.publish('command', btn.attr('data-btn'), btn.attr('data-meta')); } }); },