Ignore:
Timestamp:
11/27/12 09:52:35 (11 years ago)
Author:
marcosw
Message:

Ticket #3203 - Correção inconsistências no editor de texto simples

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/rich_text_editor.js

    r7522 r7568  
    213213      RichTextEditor.plain[id] = active; 
    214214          var content = $("#content_id_"+id); 
    215           var div = $("<div>").attr("display", "none"); 
     215          //var div = $("<div>").attr("display", "none"); 
    216216      if(active === true) 
    217217      { 
     
    219219            var height = document.body.scrollHeight; 
    220220            height -= 330; 
    221             $('#body_'+id).height(height); 
    222             div.html($('#body_'+id).val()); 
    223             /*Remove as tags html, tabulações e quebras de linha quando for utilizado o editor de texto simples*/ 
    224             div.html($.trim(div.text().replace(/[\t]+/g, '').replace(/[\n]+/g, '\n'))); 
    225             /*Insere o texto sem formatação no textarea*/ 
    226             $('#body_'+id).val(div.text()); 
     221            //Insere o texto sem formatação no textarea 
     222            var text_body = remove_tags($('#body_'+id).val()); 
     223            $('#body_'+id).val(text_body); 
    227224             
    228225            $('#body_'+id).keydown(function(event) { 
     
    238235          RichTextEditor.active('body_'+id, id); 
    239236          /*Insere somente quebras de linha para que o texto convertido não fique todo em uma linha só*/ 
    240           div.html($('#body_'+id).val().replace(/[\n]+/g, '<br>')); 
    241           $('#body_'+id).val(div.html()); 
     237          var text_body = $('#body_'+id).val().replace(/[\n]+/g, '<br>'); 
     238          $('#body_'+id).val(text_body); 
    242239      } 
    243240} 
Note: See TracChangeset for help on using the changeset viewer.