This commit is contained in:
@@ -63,8 +63,12 @@
|
||||
>
|
||||
<v-btn depressed tile> <v-icon>fa-link</v-icon></v-btn>
|
||||
<v-btn depressed tile> <v-icon>fa-image</v-icon></v-btn>
|
||||
<v-btn depressed tile class="ml-1"> <v-icon>fa-code</v-icon></v-btn>
|
||||
<v-btn depressed tile> <v-icon>fa-square-full</v-icon></v-btn>
|
||||
<v-btn depressed tile class="ml-1" @click="clickCode">
|
||||
<v-icon>fa-code</v-icon></v-btn
|
||||
>
|
||||
<v-btn depressed tile @click="clickCodeBlock">
|
||||
<v-icon>fa-square-full</v-icon></v-btn
|
||||
>
|
||||
</div>
|
||||
<v-textarea
|
||||
ref="editArea"
|
||||
@@ -233,6 +237,14 @@ export default {
|
||||
clickLine() {
|
||||
this.getSelectedRange();
|
||||
this.replaceSelectedText("***");
|
||||
},
|
||||
clickCode() {
|
||||
this.getSelectedRange();
|
||||
this.replaceSelectedText("`" + this.getSelectedText() + "`");
|
||||
},
|
||||
clickCodeBlock() {
|
||||
this.getSelectedRange();
|
||||
this.replaceSelectedText("\n```\n" + this.getSelectedText() + "\n```\n");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user