X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/76a7781f806775f0b29c50ab8937e4dd64807830..51a4b0a4a2aad9b17eb9b6c5d71bb67677e20b50:/project/templates/explorer/panels/xmleditor.html diff --git a/project/templates/explorer/panels/xmleditor.html b/project/templates/explorer/panels/xmleditor.html index f2a6d733..bb225e4c 100644 --- a/project/templates/explorer/panels/xmleditor.html +++ b/project/templates/explorer/panels/xmleditor.html @@ -15,7 +15,10 @@ path: "/static/js/codemirror/", stylesheet: "/static/css/xmlcolors.css", parserConfig: {useHTMLKludges: false}, - initCallback: function() { + onChange: function() { + $(document).trigger('panel:contentChanged', panel); + }, + initCallback: function(editor) { // Toolbar $('.toolbar-tabs li', panel).click(function() { var id = $(this).attr('p:button-list'); @@ -38,6 +41,7 @@ var pos = editor.cursorPosition(); editor.selectLines(pos.line, pos.character + tag.length + 2); } + $(document).trigger('panel:contentChanged', panel); } if ($(this).attr('p:key')) { keys[$(this).attr('p:key')] = handler;