Remove empty paragraphs added by TinyMCE in order to avoid false warnings about changed contents
This commit is contained in:
parent
fcfc997fe1
commit
b9ebb38ad6
1 changed files with 2 additions and 2 deletions
|
@ -868,7 +868,7 @@ function rcube_kolab_notes_ui(settings)
|
||||||
$('.notetitle', rcmail.gui_objects.noteviewtitle).focus().select();
|
$('.notetitle', rcmail.gui_objects.noteviewtitle).focus().select();
|
||||||
|
|
||||||
// read possibly re-formatted content back from editor for later comparison
|
// read possibly re-formatted content back from editor for later comparison
|
||||||
me.selected_note.description = editor.getContent({ format:'html' });
|
me.selected_note.description = editor.getContent({ format:'html' }).replace(/^<p><\/p>/, '');
|
||||||
is_html = true;
|
is_html = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1135,7 +1135,7 @@ function rcube_kolab_notes_ui(settings)
|
||||||
listselect = $('option:selected', rcmail.gui_objects.notebooks);
|
listselect = $('option:selected', rcmail.gui_objects.notebooks);
|
||||||
var savedata = {
|
var savedata = {
|
||||||
title: trim($('.notetitle', rcmail.gui_objects.noteviewtitle).val()),
|
title: trim($('.notetitle', rcmail.gui_objects.noteviewtitle).val()),
|
||||||
description: editor ? editor.getContent({ format:'html' }) : $('#notecontent').val(),
|
description: editor ? editor.getContent({ format:'html' }).replace(/^<p><\/p>/, '') : $('#notecontent').val(),
|
||||||
list: listselect.length ? listselect.val() : me.selected_note.list || me.selected_list,
|
list: listselect.length ? listselect.val() : me.selected_note.list || me.selected_list,
|
||||||
uid: me.selected_note.uid,
|
uid: me.selected_note.uid,
|
||||||
categories: []
|
categories: []
|
||||||
|
|
Loading…
Add table
Reference in a new issue