fix formula
This commit is contained in:
@@ -90,12 +90,6 @@
|
|||||||
>
|
>
|
||||||
/
|
/
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
class="bg-base-200 px-2 rounded-xl"
|
|
||||||
@click="insertTextUnderCursor(' % ')"
|
|
||||||
>
|
|
||||||
%
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
class="bg-base-200 px-2 rounded-xl"
|
class="bg-base-200 px-2 rounded-xl"
|
||||||
@click="insertTextUnderCursor('^')"
|
@click="insertTextUnderCursor('^')"
|
||||||
@@ -232,9 +226,11 @@ export default {
|
|||||||
|
|
||||||
this.formula = newText
|
this.formula = newText
|
||||||
|
|
||||||
textarea.setSelectionRange(cursorPos + textToInsert.length, cursorPos + textToInsert.length)
|
this.$nextTick(() => {
|
||||||
|
textarea.setSelectionRange(cursorPos + textToInsert.length, cursorPos + textToInsert.length)
|
||||||
|
|
||||||
textarea.focus()
|
textarea.focus()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
resizeTextarea () {
|
resizeTextarea () {
|
||||||
const textarea = this.$refs.textarea
|
const textarea = this.$refs.textarea
|
||||||
|
|||||||
Reference in New Issue
Block a user