Changeset 4585 for branches/2.2/expressoMail1_2/js/rich_text_editor.js
- Timestamp:
- 06/03/11 12:00:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/js/rich_text_editor.js
r4379 r4585 163 163 164 164 if (source) { 165 var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + this.id ); 165 166 if (is_ie){ 166 167 connector.loadScript('html2xhtml'); 167 168 html = frames[this.editor].document.body; 168 169 var xhtml = get_xhtml(html, 'en', 'iso-8859-1'); 170 xhtml = xhtml.replace( /<br\s*\/?>/mg, "\n" ).replace( /(<([^>]+)>)/ig, '' ).replace( /^[\n ]+|[\n ]+$/g, '' ); 171 if ( ! mobile_device && xhtml != '' && ! ( mail_as_plain.checked = confirm( get_lang( 'The text format will be lost' ) + '.' ) ) ) 172 return false; 169 173 frames[this.editor].document.body.innerText = xhtml; 170 174 document.getElementById("table_richtext_toolbar").style.visibility="hidden"; 171 175 } 172 176 else{ 173 var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + this.id );174 175 177 html = document.createTextNode( editor.contentWindow.document.body.innerHTML ); 176 178 html = html.nodeValue.replace( /<br\s*\/?>/mg, "\n" ).replace( /(<([^>]+)>)/ig, '' ).replace( /^[\n ]+|[\n ]+$/g, '' );
Note: See TracChangeset
for help on using the changeset viewer.