Format comment in Text Composer

parent 62a7d55c
......@@ -68,7 +68,13 @@ export default {
const htmlHasImage = html.indexOf('<img') !== -1
this.editorHasContentToSubmit = textContentWithoutWhitespace !== '' || htmlHasImage
// The HTML should never be an empty string (which can happen if you select all the text in the editor and delete it or if you press the “Clear” button). Quill doesn’t handle this well (the caret gets put above and to the left of the editor and the generated HTML is corrupted). To avoid this, we’re setting it to the basic template Quill expects for an empty editor.
// The HTML should never be an empty string (which can happen if you
// select all the text in the editor and delete it or if you press the
// “Clear” button).
//
// Quill doesn’t handle this well (the caret gets put above and to the
// left of the editor and the generated HTML is corrupted). To avoid this,
// we’re setting it to the basic template Quill expects for an empty editor.
if (html === '') {
this.editorContent = '<p><br></p>'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment