Skip to content
New issue

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

vue-quill-editor #488

Open
georginklv opened this issue Oct 5, 2023 · 0 comments
Open

vue-quill-editor #488

georginklv opened this issue Oct 5, 2023 · 0 comments

Comments

@georginklv
Copy link

georginklv commented Oct 5, 2023

Describe the bug

I am trying to get the cursor coordinates to be able to add some text but when i am trying to use getSelection i got this error : Uncaught (in promise) TypeError: Cannot read properties of null (reading 'getSelection')

`

<QuillEditor ref="quill" :options="editorOption" v-model:content="payload.body" contentType="html" />

<script lang="ts" setup>
  import { QuillEditor } from '@vueup/vue-quill';
  import '@vueup/vue-quill/dist/vue-quill.snow.css';

  const props = defineProps({
    type: {
      type: String,
      required: true
    },
    id: {
      type: Number
    }
  });
  const emit = defineEmits(['update:payload', 'loading'])
  const currentRoute = useRoute();

  const quill = ref(null)
  console.log(quill.value);
  
  const selection = quill.value.getSelection();

`

System Info

"@vueup/vue-quill": "^1.2.0",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant