Skip to content

"TypeError: Class constructor Node cannot be invoked without 'new' " in Nuxt after adding TodoList, TodoItem #310

Open
@shahriar350

Description

@shahriar350

After adding TodoList and TodoItem in nuxt project. it shows an error named "TypeError: Class constructor Node cannot be invoked without 'new'"
my code:

<template>
  <ClientOnly>
    <!-- Use the component in the right place of the template -->
    <tiptap-vuetify @keydown="passEvent" v-model="content" :extensions="extensions"/>

    <template #placeholder>
      Loading...
    </template>
  </ClientOnly>
</template>

<script>
// import the component and the necessary extensions
import {
  TiptapVuetify,
  Heading,
  Bold,
  Italic,
  Strike,
  Underline,
  Code,
  Image,
  Paragraph,
  BulletList,
  OrderedList,
  ListItem,
  Link,
  Blockquote,
  HardBreak,
  HorizontalRule,
  History,
  TodoList,
  TodoItem
} from 'tiptap-vuetify'

export default {
  name: 'editor',
  // specify TiptapVuetify component in "components"
  components: { TiptapVuetify },
  data: () => ({
    // declare extensions you want to use
    extensions: [
      History,
      Blockquote,
      Link,
      Underline,
      Strike,
      Italic,
      Image,
      ListItem,
      BulletList,
      OrderedList,
      [
        Heading,
        {
          options: {
            levels: [1, 2, 3]
          }
        }
      ],
      Bold,
      Link,
      Code,
      HorizontalRule,
      Paragraph,
      HardBreak,
      TodoItem,
      TodoList,

    ],
    // starting editor's content
    content: ``,
  }),
  methods: {
    passEvent(){
      console.log('asf')
      this.$emit("changeHtml",this.content)
    }
  }
}
</script>

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