This commit is contained in:
2020-04-18 19:40:45 +00:00
parent 32fdd3631d
commit 63e4b566f5

View File

@@ -204,6 +204,7 @@ export default {
},
getSelectedRange(forceBlock) {
let bodyTextArea = this.$refs.editArea.$el.querySelector("textarea");
// debugger;
this.selection.start = bodyTextArea.selectionStart;
this.selection.end = bodyTextArea.selectionEnd;
@@ -232,6 +233,9 @@ export default {
);
if (indexOfLineFeed != -1) {
this.selection.startOfBlock = indexOfLineFeed + 1;
} else {
//this may be wrong but if it's the first line then I think the block should be the first character
this.selection.startOfBlock = 0;
}
}
@@ -371,6 +375,9 @@ export default {
return this.wikiVisible ? "fa-eye-slash" : "fa-eye";
},
compiledOutput() {
if (this.localVal.length == 0) {
return "";
}
return DOMPurify.sanitize(marked(this.localVal, { breaks: true }));
},
clickBold() {