This commit is contained in:
2020-04-19 00:03:53 +00:00
parent c042d1a344
commit 98dcb7b66d

View File

@@ -239,8 +239,8 @@ import DOMPurify from "dompurify";
export default {
created() {
// Add a hook to make all links open a new window
//https://github.com/cure53/DOMPurify/blob/master/demos/hooks-target-blank-demo.html
DOMPurify.addHook("afterSanitizeAttributes", function(node) {
// set all elements owning target to target=_blank
if ("target" in node) {
@@ -420,7 +420,6 @@ export default {
}
},
handleInput(val) {
debugger;
this.$emit("input", val);
this.localVal = val;
},
@@ -495,6 +494,7 @@ export default {
clickBold() {
this.getSelectedRange();
this.replaceSelectedText("**" + this.getSelectedText() + "**");
this.handleInput(this.localVal);
},
clickItalic() {
this.getSelectedRange();
@@ -673,6 +673,9 @@ todo: all editing controls enabled
todo: replace all redundant clickXXX functions with a single function and a flag indicating what to do
- HANDLE INPUT must be called from that function so that th eparent form knows a change was made
because right now menu clicks changing text doesn't trigger the changedd event
todo: Undo / redo (ctrl-z / ctrl-y) ability?
- may need a library for this one if it's tricky to support levels of undo