4 * Copyright, Moxiecode Systems AB
5 * Released under LGPL License.
7 * License: http://www.tinymce.com/license
8 * Contributing: http://www.tinymce.com/contributing
11 /*global tinymce:true */
13 tinymce.PluginManager.add('code', function(editor) {
14 function showDialog() {
15 editor.windowManager.open({
21 minWidth: editor.getParam("code_dialog_width", 600),
22 minHeight: editor.getParam("code_dialog_height", 500),
23 value: editor.getContent({source_view: true}),
26 onSubmit: function(e) {
27 editor.undoManager.transact(function() {
28 editor.setContent(e.data.code);
36 editor.addCommand("mceCodeEditor", showDialog);
38 editor.addButton('code', {
40 tooltip: 'Source code',
44 editor.addMenuItem('code', {