Skip to content

vue-quill-editor #488

@georginklv

Description

@georginklv

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",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions