Changeset 4301 for sandbox/2.2.0.2/expressoMail1_2/js/rich_text_editor.js
- Timestamp:
- 05/10/11 10:31:11 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/expressoMail1_2/js/rich_text_editor.js
r4291 r4301 25 25 parentDiv.appendChild(this.table); 26 26 27 28 27 var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + this.id ); 28 this.table.style.visibility = ( mail_as_plain && mail_as_plain.checked ) ? 'hidden' : 'visible'; 29 29 if(!Element(this.editor)) 30 30 { … … 168 168 } 169 169 else{ 170 html = document.createTextNode( editor.contentWindow.document.body.innerHTML ); 171 this.table.style.visibility="hidden"; 170 var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + this.id ); 171 html = document.createTextNode( editor.contentWindow.document.body.innerHTML ); 172 173 html = html.nodeValue.replace( /<br\s*\/?>/mg, "\n" ).replace( /(<([^>]+)>)/ig, '' ).replace( /^[\n ]+|[\n ]+$/g, '' ); 174 175 if ( ! mobile_device && html != '' && ! ( mail_as_plain.checked = confirm( 'The text format will be lost.' ) ) ) 176 return false; 177 178 this.table.style.visibility="hidden"; 172 179 editor.contentWindow.document.body.innerHTML = ''; 173 180 … … 176 183 textarea.style.height = '300px'; 177 184 textarea.style.fontSize = '12pt'; 178 textarea.innerHTML = html .nodeValue.replace( /<br\s*\/?>/mg, "\n" ).replace( /(<([^>]+)>)/ig, '' );185 textarea.innerHTML = html; 179 186 180 187 editor.style.width = '0px'; … … 201 208 editor.style.visibility = 'visible'; 202 209 this.loadEditor( this.id ); 210 211 setTimeout( function( ) { editor.contentWindow.focus( ); }, 100 ); 203 212 } 204 213 }
Note: See TracChangeset
for help on using the changeset viewer.