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

ckeditor.js:5 TypeError: Cannot read properties of undefined (reading 'model') at Proxy.$_setUpEditorEvents #214

Closed
subhamghimire opened this issue May 3, 2022 · 1 comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:devops Issue to be handled by the Devops team.

Comments

@subhamghimire
Copy link

Using CKeditor in vue 3 project. I am using get and set methods in Vue 3 composition api. This might issue related to Ckeditor.
I am using this version : "@ckeditor/ckeditor5-build-classic": "^31.1.0", "@ckeditor/ckeditor5-vue": "^2.0.1",

  <div class="text-editor">
    <span class="text-md font-bold text-grey-grey">{{ name }}</span>
    <ckeditor :editor="editor" v-model="value"> white </ckeditor>
  </div>
</template>

<script lang="ts">
import { defineComponent, computed } from "vue";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import CKEditor from "@ckeditor/ckeditor5-vue";

export default defineComponent({
  props: {
    name: String,
    modelValue: String,
  },
  components: {
    ckeditor: CKEditor.component,
  },
  emits: ["update:modelValue"],
  setup(props, context) {
    return {
      editor: ClassicEditor,
      value: computed({
        get() {
          return props.modelValue;
        },
        set(value) {
          context.emit("update:modelValue", value);
        },
      }),
    };
  },
});
</script>
@pomek
Copy link
Member

pomek commented May 3, 2022

DUP of #203.

@pomek pomek closed this as completed May 3, 2022
@pomek pomek added resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:devops Issue to be handled by the Devops team. labels May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. squad:devops Issue to be handled by the Devops team.
Projects
None yet
Development

No branches or pull requests

2 participants