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

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

Open
shahriar350 opened this issue Dec 2, 2021 · 3 comments

Comments

@shahriar350
Copy link

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>
@maximiliancw
Copy link

I'm also experiencing this error exclusively when trying to use TodoItem and TodoList extensions. @iliyaZelenko any ideas what might cause this?

package.json:

"nuxt": "^2.15.7",
"tiptap-vuetify": "^2.24.0",
"vuetify": "^2.5.5"

@MalekMohamed-dev
Copy link

Same here even without nuxt

@Marbemoreno
Copy link

I finally use this tables support
#20 (comment)

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

4 participants