close #1475 Fixed: Not able to create newline in email templates
This commit is contained in:
@ -20,6 +20,10 @@
|
|||||||
<script>
|
<script>
|
||||||
import Quill from 'quill';
|
import Quill from 'quill';
|
||||||
|
|
||||||
|
//var Block = Quill.import('blots/block');
|
||||||
|
//Block.tagName = 'div';
|
||||||
|
//Quill.register(Block);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'akaunting-html-editor',
|
name: 'akaunting-html-editor',
|
||||||
|
|
||||||
@ -57,7 +61,9 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (this.value.length > 0) {
|
if (this.value.length > 0) {
|
||||||
this.editor.pasteHTML(this.value)
|
this.value = this.value.replace(new RegExp('<p><br></p>', 'g'), '<p> </p>');
|
||||||
|
|
||||||
|
this.editor.pasteHTML(this.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
let editorRef = this.$refs.editor;
|
let editorRef = this.$refs.editor;
|
||||||
@ -68,6 +74,8 @@ export default {
|
|||||||
|
|
||||||
if (html === '<p><br></p>') {
|
if (html === '<p><br></p>') {
|
||||||
html = '';
|
html = '';
|
||||||
|
} else {
|
||||||
|
html = html.replace(new RegExp('<p><br></p>', 'g'), '<p> </p>');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.content = html;
|
this.content = html;
|
||||||
@ -81,6 +89,8 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.value = this.value.replace(new RegExp('<p><br></p>', 'g'), '<p> </p>');
|
||||||
|
|
||||||
this.editor.pasteHTML(this.value);
|
this.editor.pasteHTML(this.value);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user