Ignore:
Timestamp:
05/04/11 18:49:21 (13 years ago)
Author:
rodsouza
Message:

Ticket #1824 - Corrige local do opcao do envio de e-mail em texto puro.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/js/rich_text_editor.js

    r4202 r4218  
    166166                } 
    167167                else{ 
     168                        var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + this.id ); 
     169 
    168170                        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 
    169176                        this.table.style.visibility="hidden"; 
    170177                        editor.contentWindow.document.body.innerHTML = ''; 
     
    174181                        textarea.style.height = '300px'; 
    175182                        textarea.style.fontSize = '12pt'; 
    176                         textarea.innerHTML = html.nodeValue.replace( /<br\s*\/?>/mg, "\n" ).replace( /(<([^>]+)>)/ig, '' ); 
     183                        textarea.innerHTML = html; 
    177184 
    178185                        editor.style.width = '0px'; 
Note: See TracChangeset for help on using the changeset viewer.