includes/clientside/tinymce/plugins/paste/editor_plugin_src.js
changeset 395 fa4c5ecb7c9a
parent 335 67bd3121a12e
child 459 31c23016ab62
equal deleted inserted replaced
394:fbfdcea634a7 395:fa4c5ecb7c9a
     1 /**
     1 /**
     2  * $Id: editor_plugin_src.js 432 2007-11-23 16:07:16Z spocke $
     2  * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
     8 (function() {
     8 (function() {
     9 	var Event = tinymce.dom.Event;
     9 	var Event = tinymce.dom.Event;
    10 
    10 
   152 				this.editor.execCommand("mceInsertRawHTML", false, content); 
   152 				this.editor.execCommand("mceInsertRawHTML", false, content); 
   153 			}
   153 			}
   154 		},
   154 		},
   155 
   155 
   156 		_insertWordContent : function(content) { 
   156 		_insertWordContent : function(content) { 
       
   157 			var t = this, ed = t.editor;
       
   158 
   157 			if (content && content.length > 0) {
   159 			if (content && content.length > 0) {
   158 				// Cleanup Word content
   160 				// Cleanup Word content
   159 				var bull = String.fromCharCode(8226);
   161 				var bull = String.fromCharCode(8226);
   160 				var middot = String.fromCharCode(183);
   162 				var middot = String.fromCharCode(183);
   161 				var cb;
   163 				var cb;
   218 
   220 
   219 				content = content.replace(/<\/?div[^>]*>/gi, "");
   221 				content = content.replace(/<\/?div[^>]*>/gi, "");
   220 
   222 
   221 				// Convert all middlot lists to UL lists
   223 				// Convert all middlot lists to UL lists
   222 				if (this.editor.getParam("paste_convert_middot_lists", true)) {
   224 				if (this.editor.getParam("paste_convert_middot_lists", true)) {
   223 					var div = document.createElement("div");
   225 					var div = ed.dom.create("div", null, content);
   224 					div.innerHTML = content;
       
   225 
   226 
   226 					// Convert all middot paragraphs to li elements
   227 					// Convert all middot paragraphs to li elements
   227 					var className = this.editor.getParam("paste_unindented_list_class", "unIndentedList");
   228 					var className = this.editor.getParam("paste_unindented_list_class", "unIndentedList");
   228 
   229 
   229 					while (this._convertMiddots(div, "--list--")) ; // bull
   230 					while (this._convertMiddots(div, "--list--")) ; // bull