This commit is contained in:
2020-04-17 20:27:49 +00:00
parent 9e26f57b4f
commit a86b6479bb

View File

@@ -44,10 +44,14 @@
<v-btn depressed tile @click="clickBold">
<v-icon>fa-bold</v-icon></v-btn
>
<v-btn depressed tile> <v-icon>fa-italic</v-icon></v-btn>
<v-btn depressed tile> <v-icon>fa-strikethrough</v-icon></v-btn>
<v-btn depressed tile @click="clickItalic">
<v-icon>fa-italic</v-icon></v-btn
>
<v-btn depressed tile @click="clickStrike">
<v-icon>fa-strikethrough</v-icon></v-btn
>
<v-btn depressed tile> <v-icon>fa-heading</v-icon></v-btn>
<v-btn depressed tile class="ml-1">
<v-btn depressed tile class="ml-1" @click="clickLine">
<v-icon>fa-minus</v-icon></v-btn
>
<v-btn depressed tile> <v-icon>fa-quote-left</v-icon></v-btn>
@@ -133,10 +137,6 @@ export default {
newString
);
},
clickBold() {
this.getSelectedRange();
this.replaceSelectedText("**" + this.getSelectedText() + "**");
},
handleDoubleClick(i) {
//the purpose of this is only to change the selection if it's got an extra space to the right
//because double clicking on a word with another word after it causes the space to be included
@@ -217,6 +217,22 @@ export default {
},
compiledOutput() {
return DOMPurify.sanitize(marked(this.localVal));
},
clickBold() {
this.getSelectedRange();
this.replaceSelectedText("**" + this.getSelectedText() + "**");
},
clickItalic() {
this.getSelectedRange();
this.replaceSelectedText("*" + this.getSelectedText() + "*");
},
clickStrike() {
this.getSelectedRange();
this.replaceSelectedText("~~" + this.getSelectedText() + "~~");
},
clickLine() {
this.getSelectedRange();
this.replaceSelectedText("***");
}
}
};
@@ -245,6 +261,9 @@ todo: STYLE OUTPUT CSS
I stole the css from toast it's in the notes, search for task-list-item
also maybe there's a cleaner way try a google search once you see how they did it
- Tables currently look shitty, find a proper style for them with boxes and shit, maybe alternating background on rows etc
- strikethrough hard to see
*/
</script>