From d025cfee1bd9ec2edb57c3bae7a168549e1576d7 Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 4 Jan 2020 13:22:07 +0100 Subject: [PATCH] empty note with just included note should be saved, closes #807 --- .../javascripts/services/note_detail_text.js | 14 +++++++++----- src/public/javascripts/services/utils.js | 6 +++++- src/public/stylesheets/style.css | 4 ++++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/public/javascripts/services/note_detail_text.js b/src/public/javascripts/services/note_detail_text.js index 068cedd46..d81d5aed0 100644 --- a/src/public/javascripts/services/note_detail_text.js +++ b/src/public/javascripts/services/note_detail_text.js @@ -116,15 +116,19 @@ class NoteDetailText { } getContent() { - let content = this.textEditor.getData(); + const content = this.textEditor.getData(); // if content is only tags/whitespace (typically

 

), then just make it empty // this is important when setting new note to code - if (jQuery(content).text().trim() === '' && !content.includes("").html(html).text().trim().length === 0 && !html.toLowerCase().includes('").html(html).text().trim().length === 0 + && !html.includes('