diff -r 902822492a68 -r fe660c52c48f includes/clientside/tinymce/plugins/noneditable/editor_plugin_src.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/includes/clientside/tinymce/plugins/noneditable/editor_plugin_src.js Wed Jun 13 16:07:17 2007 -0400 @@ -0,0 +1,153 @@ +/** + * $Id: editor_plugin_src.js 205 2007-02-12 18:58:29Z spocke $ + * + * @author Moxiecode + * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. + */ + +var TinyMCE_NonEditablePlugin = { + getInfo : function() { + return { + longname : 'Non editable elements', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', + version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion + }; + }, + + initInstance : function(inst) { + tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/noneditable/css/noneditable.css"); + + // Ugly hack + if (tinyMCE.isMSIE5_0) + tinyMCE.settings['plugins'] = tinyMCE.settings['plugins'].replace(/noneditable/gi, 'Noneditable'); + }, + + handleEvent : function(e) { + return this._moveSelection(e, tinyMCE.selectedInstance); + }, + + cleanup : function(type, content, inst) { + switch (type) { + case "insert_to_editor_dom": + var nodes, i, editClass, nonEditClass, editable, elm; + + // Pass through Gecko + if (tinyMCE.isGecko) + return content; + + nodes = tinyMCE.getNodeTree(content, [], 1); + + editClass = tinyMCE.getParam("noneditable_editable_class", "mceEditable"); + nonEditClass = tinyMCE.getParam("noneditable_noneditable_class", "mceNonEditable"); + + for (i=0; i