changeset 588 | 20484deb89cd |
parent 543 | dffcbfbc4e59 |
child 778 | 57ce13805b6f |
587:705ed7162315 | 588:20484deb89cd |
---|---|
1 /** |
1 /** |
2 * $Id: editor_plugin_src.js 738 2008-03-20 20:00:48Z spocke $ |
2 * $Id: editor_plugin_src.js 862 2008-06-02 20:09:06Z spocke $ |
3 * |
3 * |
4 * @author Moxiecode |
4 * @author Moxiecode |
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
6 */ |
6 */ |
7 |
7 |
101 ed.execCommand('mcePasteWord', false, html); |
101 ed.execCommand('mcePasteWord', false, html); |
102 |
102 |
103 return Event.cancel(e); |
103 return Event.cancel(e); |
104 }, |
104 }, |
105 |
105 |
106 _insertText : function(content, bLinebreaks) { |
106 _insertText : function(content, bLinebreaks) { |
107 content = this.editor.dom.encode(content); |
|
108 |
|
107 if (content && content.length > 0) { |
109 if (content && content.length > 0) { |
108 if (bLinebreaks) { |
110 if (bLinebreaks) { |
109 // Special paragraph treatment |
111 // Special paragraph treatment |
110 if (this.editor.getParam("paste_create_paragraphs", true)) { |
112 if (this.editor.getParam("paste_create_paragraphs", true)) { |
111 var rl = this.editor.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); |
113 var rl = this.editor.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); |
152 content = content.replace(/\r\n/g, '<br />'); |
154 content = content.replace(/\r\n/g, '<br />'); |
153 content = content.replace(/\r/g, '<br />'); |
155 content = content.replace(/\r/g, '<br />'); |
154 content = content.replace(/\n/g, '<br />'); |
156 content = content.replace(/\n/g, '<br />'); |
155 } |
157 } |
156 } |
158 } |
157 |
159 |
158 this.editor.execCommand("mceInsertRawHTML", false, content); |
160 this.editor.execCommand("mceInsertRawHTML", false, content); |
159 } |
161 } |
160 }, |
162 }, |
161 |
163 |
162 _insertWordContent : function(content) { |
164 _insertWordContent : function(content) { |