chmln / vue-wysiwyg

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

issue headline/image/link etc. #25

Closed nawalnew closed 6 years ago

nawalnew commented 6 years ago

Hello, I have an issue when selecting something else than headline. When I click on Link than the same dropdown appears a s Headline "h1, h2, h3".

I don't know where the bug is. Even when I try to hide the "headings" module, it appears.

Some advice?

My main.js import wysiwyg from "vue-wysiwyg"; import "vue-wysiwyg/dist/vueWysiwyg.css"; Vue.use(wysiwyg, { hideModules: { headings: true } }); // config is optional. more below

invmatt commented 6 years ago

Having the same issue. In addition to this when selecting a heading the following error appears:

vueWysiwyg.js?5768:1 Uncaught TypeError: Cannot read property 'focus' of undefined
    at VueComponent.exec (vueWysiwyg.js?5768:1)
    at r.boundFn (vue.runtime.esm.js?ff9b:185)
    at r.l.emitEvent (vueWysiwyg.js?5768:1)
    at r.l.emit (vueWysiwyg.js?5768:1)
    at VueComponent.insertHeading (vueWysiwyg.js?5768:1)
    at boundFn (vue.runtime.esm.js?ff9b:186)
    at invoker (vue.runtime.esm.js?ff9b:1933)
    at HTMLButtonElement.fn._withTask.fn._withTask (vue.runtime.esm.js?ff9b:1768)
rodrigoAbril commented 6 years ago

Here is a demo of the bug https://codesandbox.io/embed/jn0ovr2p9y

to replicate it just try adding a table

rodrigoAbril commented 6 years ago

@invmatt @nawalnew if you upgrade vue to today's vue@2.5.3 release the problem is fixed

invmatt commented 6 years ago

@rodrigoAbril Confirmed. Updating has solved the problem. Thanks for the quick reply.

rodrigoAbril commented 6 years ago

well the issue is gone but now when you want to add a table you get this error:

ReferenceError table is not defined VueComponent.insertTable...

chmln commented 6 years ago

Looks like changes in Vue are causing some errors. Perhaps I could try rebuilding the library against the latest version.

nawalnew commented 6 years ago

Same here, most issues fixed with update. But cant create table -.-

chmln commented 6 years ago

The version on master is now running against latest Vue without problems. There will also be UX improvements and hopefully a fix for the link module.

Thanks all for your patience 👍

chmln commented 6 years ago

Hi all,

I've published a new version under vue-wysiwyg@next at npm. This version includes a fix for the hyperlink module, rewritten table module, usability improvements, and is built against the latest version of vue (2.5.8).

Please try it out and let me know if all the problems are fixed.

Thank you

nawalnew commented 6 years ago

Thank you @chmln , It works better with all functionality.

I have just one Issue with multiple Instances of the editor and the tables.

Do you have an Idea how to solve this that I can use multiple Instances of the editor on one page? :)

bildschirmfoto 2017-11-24 um 10 10 51
chmln commented 6 years ago

@nawalnew Yes, multiple instances will be available by next release :)