Changeset 7568 for trunk/expressoMail1_2/js/rich_text_editor.js
- Timestamp:
- 11/27/12 09:52:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/rich_text_editor.js
r7522 r7568 213 213 RichTextEditor.plain[id] = active; 214 214 var content = $("#content_id_"+id); 215 var div = $("<div>").attr("display", "none");215 //var div = $("<div>").attr("display", "none"); 216 216 if(active === true) 217 217 { … … 219 219 var height = document.body.scrollHeight; 220 220 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); 227 224 228 225 $('#body_'+id).keydown(function(event) { … … 238 235 RichTextEditor.active('body_'+id, id); 239 236 /*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); 242 239 } 243 240 }
Note: See TracChangeset
for help on using the changeset viewer.