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

Not working with Nuxt #152

Closed
bdrtsky opened this issue Jan 3, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@bdrtsky
Copy link

commented Jan 3, 2019

I have Duplicate use of selection JSON ID cell on first page load and then render function or template not defined in component: anonymous errors

<template>
  <div>
    <editor-menu-bar :editor="editor">
      <div slot-scope="{ commands, isActive }">
        <button :class="{ 'is-active': isActive.bold() }" @click="commands.bold">
          Bold
        </button>
       <!--  <button :class="{ 'is-active': isActive.heading({ level: 2 }) }" @click="commands.heading({ level: 2 })">
          H2
        </button> -->
      </div>
    </editor-menu-bar>
    <editor-content :editor="editor" />
  </div>
</template>

<script>
import { Editor, EditorMenuBar, EditorContent } from 'tiptap'
import {
  Bold
} from 'tiptap-extensions'

export default {
  components: {
    EditorMenuBar,
    EditorContent,
  },
  data() {
    return {
      editor: new Editor({
        extensions: [
          new Bold()
        ],
        content: '<p>This is just a boring paragraph</p>',
      }),
    }
  },
  mounted() {
    //
  },
  beforeDestroy() {
    this.editor.destroy()
  }
}
</script>

What is wrong? It's pretty confusing that there's no Docs for such complex package.

@bdrtsky

This comment has been minimized.

Copy link
Author

commented Jan 3, 2019

The fix is here - #131

@bdrtsky bdrtsky closed this Jan 3, 2019

@rendisimamora

This comment has been minimized.

Copy link

commented Jun 20, 2019

The fix is here - #131

Work for me. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.