Fixed issue #1917. Only images in new note are lost on submit.

This commit is contained in:
Martin Edenhofer 2018-04-04 09:47:21 +02:00
parent cef84ef74f
commit 20e0784c34

View file

@ -540,7 +540,7 @@
// for validation, do not retrun empty content by empty tags // for validation, do not retrun empty content by empty tags
text_plain = this.$element.text().trim() text_plain = this.$element.text().trim()
if ( !text_plain || text_plain == '' ) { if ( (!text_plain || text_plain == '') && !this.$element.find('img').get(0) ) {
return text_plain return text_plain
} }
return this.$element.html().trim() return this.$element.html().trim()