We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
When I update the v-model value from another function, then I got this error: Uncaught (in promise) RangeError: Selection points outside of document
Uncaught (in promise) RangeError: Selection points outside of document
Versions: vue: 3.3.4 codemirror: 6.0.1 vue-codemirror6: 1.1.31 @codemirror/lang-css: 6.2.1
Maybe someone have an Idea?
<template> <button @click="restoreCustomStyleCss()">restore</button> <button @click="cearCustomStyleCss()">clear</button> <code-mirror v-model="customStyleCss" :lang="[lang]" :basic="true" :gutter="true" /> </template> <script lang="ts"> import { defineComponent, defineAsyncComponent } from "vue"; import CodeMirror from "vue-codemirror6"; import { css } from "@codemirror/lang-css"; export default defineComponent({ name: "EventStyle", components: { CodeMirror, }, setup() { const lang = css(); return { lang }; }, data() { return { customStyleCss: "", restoreCustomStyleCss = "body {color: red;}", }; }, methods: { restoreCustomStyleCss() { this.customStyleCss = this.restoreCustomStyleCss; }, cearCustomStyleCss() { this.customStyleCss = ""; }, }, }); </script>
The text was updated successfully, but these errors were encountered:
I have temporarily solved the error as follows: this.$refs.cm.setCursor(0);
this.$refs.cm.setCursor(0);
<template> <button @click="restoreCustomStyleCss()">restore</button> <button @click="cearCustomStyleCss()">clear</button> <code-mirror v-model="customStyleCss" :lang="[lang]" :basic="true" :gutter="true" ref="cm" /> </template> <script lang="ts"> import { defineComponent, defineAsyncComponent } from "vue"; import CodeMirror from "vue-codemirror6"; import { css } from "@codemirror/lang-css"; export default defineComponent({ name: "EventStyle", components: { CodeMirror, }, setup() { const lang = css(); return { lang }; }, data() { return { customStyleCss: "", restoreCustomStyleCss = "body {color: red;}", }; }, methods: { restoreCustomStyleCss() { //@ts-expect-error this.$refs.cm.setCursor(0); this.customStyleCss = this.restoreCustomStyleCss; }, cearCustomStyleCss() { //@ts-expect-error this.$refs.cm.setCursor(0); this.customStyleCss = ""; }, }, }); </script>
Sorry, something went wrong.
josdejong/svelte-jsoneditor#423
refer to this issues? @logue
Update vue, yarn.
31d6312
Add range fix. (#27)
No branches or pull requests
Hello,
When I update the v-model value from another function, then I got this error:
Uncaught (in promise) RangeError: Selection points outside of document
Versions:
vue: 3.3.4
codemirror: 6.0.1
vue-codemirror6: 1.1.31
@codemirror/lang-css: 6.2.1
Maybe someone have an Idea?
The text was updated successfully, but these errors were encountered: