X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/6d69e02f9265a0be1c762e0798e22ac764f2dafc..10f48e60a7f7499a6602098fc44298e05d05af50:/project/templates/explorer/panels/xmleditor.html?ds=inline diff --git a/project/templates/explorer/panels/xmleditor.html b/project/templates/explorer/panels/xmleditor.html index e2e6b0b4..c818550e 100644 --- a/project/templates/explorer/panels/xmleditor.html +++ b/project/templates/explorer/panels/xmleditor.html @@ -35,17 +35,7 @@ panel_hooks = { // Editor is loaded // Buttons are connected // register callbacks for actions - $(document).bind("ui:action:INSERT_TAG", function(event, data) { - var tag = data; - var text = texteditor.selection(); - editor.replaceSelection('<' + tag + '>' + text + ''); - if (text.length == 0) { - var pos = texteditor.cursorPosition(); - texteditor.selectLines(pos.line, pos.character + tag.length + 2); - } - - $(document).trigger('panel:contentChanged', self); - }); + /* texteditor.grabKeys(function(event) { if (keys[event.keyCode]) { @@ -78,9 +68,8 @@ panel_hooks = { var frameBody = $('body', $(texteditor.frame).contents()); console.log(frameBody.css('font-size')); frameBody.css('font-size', parseInt(frameBody.css('font-size')) + 2); - }); - - this.texteditor = texteditor; + }); + this.texteditor = texteditor; }, unload: function() {