web/res/js/tinymce/plugins/code/plugin.min.js
author Nicolas Sauret <nicolas.sauret@iri.centrepompidou.fr>
Thu, 12 Jun 2014 12:52:01 +0200
changeset 1130 393bb7c2bc1d
parent 1012 5064d9d287a0
permissions -rw-r--r--
Added tag v02.96 for changeset d586369f8c46

tinymce.PluginManager.add("code",function(e){function o(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),value:e.getContent({source_view:!0}),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(o){e.focus(),e.undoManager.transact(function(){e.setContent(o.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}})}e.addCommand("mceCodeEditor",o),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:o}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:o})});