This commit is contained in:
@@ -44,10 +44,14 @@
|
|||||||
<v-btn depressed tile @click="clickBold">
|
<v-btn depressed tile @click="clickBold">
|
||||||
<v-icon>fa-bold</v-icon></v-btn
|
<v-icon>fa-bold</v-icon></v-btn
|
||||||
>
|
>
|
||||||
<v-btn depressed tile> <v-icon>fa-italic</v-icon></v-btn>
|
<v-btn depressed tile @click="clickItalic">
|
||||||
<v-btn depressed tile> <v-icon>fa-strikethrough</v-icon></v-btn>
|
<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> <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-icon>fa-minus</v-icon></v-btn
|
||||||
>
|
>
|
||||||
<v-btn depressed tile> <v-icon>fa-quote-left</v-icon></v-btn>
|
<v-btn depressed tile> <v-icon>fa-quote-left</v-icon></v-btn>
|
||||||
@@ -133,10 +137,6 @@ export default {
|
|||||||
newString
|
newString
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
clickBold() {
|
|
||||||
this.getSelectedRange();
|
|
||||||
this.replaceSelectedText("**" + this.getSelectedText() + "**");
|
|
||||||
},
|
|
||||||
handleDoubleClick(i) {
|
handleDoubleClick(i) {
|
||||||
//the purpose of this is only to change the selection if it's got an extra space to the right
|
//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
|
//because double clicking on a word with another word after it causes the space to be included
|
||||||
@@ -217,6 +217,22 @@ export default {
|
|||||||
},
|
},
|
||||||
compiledOutput() {
|
compiledOutput() {
|
||||||
return DOMPurify.sanitize(marked(this.localVal));
|
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
|
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
|
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
|
- 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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user