Changeset 6715 for branches/2.4/expressoMail1_2/js/rich_text_editor.js
- Timestamp:
- 07/05/12 11:49:33 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4/expressoMail1_2/js/rich_text_editor.js
r6505 r6715 213 213 RichTextEditor.plain[id] = active; 214 214 var content = $("#content_id_"+id); 215 var div = $("<div>").attr("display", "none"); 215 216 if(active === true) 216 217 { … … 219 220 height -= 330; 220 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()); 227 221 228 $('#body_'+id).keydown(function(event) { 222 229 away = false; … … 228 235 $("[name=textplain_rt_checkbox_"+id+"]").button({ disabled: false }); 229 236 } 230 else 237 else{ 231 238 RichTextEditor.active('body_'+id, id); 239 /*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()); 242 } 232 243 } 233 244
Note: See TracChangeset
for help on using the changeset viewer.