Changeset 4258 for branches/2.2.0.1/expressoMail1_2/js/rich_text_editor.js
- Timestamp:
- 05/06/11 17:01:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/expressoMail1_2/js/rich_text_editor.js
r4252 r4258 166 166 } 167 167 else{ 168 var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + this.id ); 169 168 170 html = document.createTextNode( editor.contentWindow.document.body.innerHTML ); 171 html = html.nodeValue.replace( /<br\s*\/?>/mg, "\n" ).replace( /(<([^>]+)>)/ig, '' ).replace( /^[\n ]+|[\n ]+$/g, '' ); 172 173 if ( ! mobile_device && html != '' && ! ( mail_as_plain.checked = confirm( 'The text format will be lost.' ) ) ) 174 return false; 175 169 176 this.table.style.visibility="hidden"; 170 177 editor.contentWindow.document.body.innerHTML = ''; … … 174 181 textarea.style.height = '300px'; 175 182 textarea.style.fontSize = '12pt'; 176 textarea.innerHTML = html .nodeValue.replace( /<br\s*\/?>/mg, "\n" ).replace( /(<([^>]+)>)/ig, '' );183 textarea.innerHTML = html; 177 184 178 185 editor.style.width = '0px';
Note: See TracChangeset
for help on using the changeset viewer.