Describe the bug
Whenever I'm trying to add a custom view, I get an error dom.hasAttribute is not a function
Steps to Reproduce Example
Expected behavior
Should work just like the example iframe embed https://tiptap.scrumpy.io/embeds
Environment
please provide a codesandbox
curious I am having the same issue locally. I found this ticket, I setup a codesandbox: https://codesandbox.io/embed/tiptap-test-jq43u
and it works just fine there... will review package.json
@magpiedigital I solved by adding a local vue.config.js file with the following:
module.exports = {
runtimeCompiler: true
};
see here: https://cli.vuejs.org/config/#runtimecompiler
got the info above from this: https://github.com/vuejs/vue-cli/issues/2754
i'm assuming this would necessary be for local dev only?
@dustingibbs 's solution is workable. And in NuxtJs, you can do that through the following:
nuxt.config.js
build: {
extend(config) {
config.resolve.alias['vue'] = 'vue/dist/vue.common'
}
}
Confirmed! I had the exact same issue and setting runtimeCompiler: true fixed it.
I fixed the issue by importing the view from its own video.vue file with a <template lang="html"></template> section. Webpack will pre-compile the template this way without needing the runtimeCompiler setting. You can update the example today to work correctly without waiting for v2 release. I can do the pull request for it, if you would like me to - just write a message (one of the maintainers). I can document the issue in the PR as well.
Most helpful comment
@magpiedigital I solved by adding a local
vue.config.jsfile with the following:see here: https://cli.vuejs.org/config/#runtimecompiler
got the info above from this: https://github.com/vuejs/vue-cli/issues/2754
i'm assuming this would necessary be for local dev only?