chmln / vue-wysiwyg

A lightweight WYSIWYG HTML editor for Vue.js
https://chmln.github.io/vue-wysiwyg/
MIT License
555 stars 134 forks source link

Uncaught ReferenceError: table is not defined #20

Closed maxrgus closed 6 years ago

maxrgus commented 6 years ago

Vuejs Webpack template Vue 2.4.2. vue-wysiwyg 1.2.7

Error at hitting the "Insert" button in the table section.

Uncaught ReferenceError: table is not defined at VueComponent.insertTable (vueWysiwyg.js?fcc0:1) at Proxy.boundFn (vue.esm.js?65d7:179) at submit (vueWysiwyg.js?fcc0:1) at HTMLFormElement.invoker (vue.esm.js?65d7:1821)

Set up:

main.js

import wysiwyg from 'vue-wysiwyg'; Vue.use(wysiwyg, {}); import 'vue-wysiwyg/dist/vueWysiwyg.css'

in component: <wysiwyg v-model="problemBody" placeholder="Describe the Problem..."></wysiwyg>

Perhaps something I'm doing wrong?

gabrielbuzziv commented 6 years ago

I have the same problem here :/

deywibkiss commented 6 years ago

The same problem

jezperp commented 6 years ago

Is this fixed? Not working for me... getting the same error as @maxrgus

gabrielbuzziv commented 6 years ago

@jezperp I changed to summernote, working much better and everything works fine.

chmln commented 6 years ago

Hello @maxrgus

Please try installing vue-wysiwyg@next from npm and let me know if that fixed your problems. I suspect this error had to do with some changes at Vue and wasn't from my part (#25).

Thank you.

chmln commented 6 years ago

@gabrielbuzziv you do realize though that vue-wysiwyg and editors such as summernote, tinymce, and ckeditor are in totally different leagues.

This is a barebones editor catering to minimalist, performance-minded users. Meanwhile, summernote and others are bloated with heavy and unnecessary dependencies, despite having larger teams (8 for summernote, a few dozens for ckeditor) working for them.

You're free to use whatever you want.

maxrgus commented 6 years ago

@chmln Thank you so much for taking the time, this indeed seemed to be the problem. Now the table appears with no errors in the console.

However, there seems to be a bug that embeds the table inside another identical table, I would love to try to take a look, but can you direct me to the branch/version that is currently at @next?

giphy

chmln commented 6 years ago

@maxrgus I can't reproduce that problem at the moment. Please try again with v1.3.2 :)