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