From b9ebb38ad63fa77812f7c00b76096fd36aee26e8 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 11 Aug 2014 15:47:16 +0200 Subject: [PATCH] Remove empty paragraphs added by TinyMCE in order to avoid false warnings about changed contents --- plugins/kolab_notes/notes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kolab_notes/notes.js b/plugins/kolab_notes/notes.js index f761f54b..7179a5ac 100644 --- a/plugins/kolab_notes/notes.js +++ b/plugins/kolab_notes/notes.js @@ -868,7 +868,7 @@ function rcube_kolab_notes_ui(settings) $('.notetitle', rcmail.gui_objects.noteviewtitle).focus().select(); // 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>/, ''); is_html = true; } else { @@ -1135,7 +1135,7 @@ function rcube_kolab_notes_ui(settings) listselect = $('option:selected', rcmail.gui_objects.notebooks); var savedata = { title: trim($('.notetitle', rcmail.gui_objects.noteviewtitle).val()), - description: editor ? editor.getContent({ format:'html' }) : $('#notecontent').val(), + description: editor ? editor.getContent({ format:'html' }).replace(/^

<\/p>/, '') : $('#notecontent').val(), list: listselect.length ? listselect.val() : me.selected_note.list || me.selected_list, uid: me.selected_note.uid, categories: []