ankurk91 / vue-trumbowyg

Vue.js component for Trumbowyg WYSIWYG editor :memo:
https://ankurk91.github.io/vue-trumbowyg/
MIT License
236 stars 35 forks source link

why are events seperated with a dash #36

Closed depuits closed 4 years ago

depuits commented 4 years ago

I'm submitting a ... (check one with "x")

[ ] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[x] Other, documentation issue

Tell about your platform

Current behavior

To subscribe to events you have to use the plain js event but separate the prefix and event with a dash.

Expected behavior

I'm not sure if this is intended and/or has a technical reason, but it would make more sense if the events had the same name. So if you go look in the documentation it would be the same.

Otherwise I would suggest adding a note in the readme to differentiate this difference more clearly. Now the readme only refers to the plain js events and later on shows an example from which you can deduce that you need to add the dash.

ankurk91 commented 4 years ago

I followed vue.js documentation to name the events. https://vuejs.org/v2/guide/components-custom-events.html#Event-Names

I will add a note about native vs vue events

depuits commented 4 years ago

That's a good reason but because the event name are already in lowercase it wasn't really necessary to use the kebab-case. Because of compatibility is would be best to just update the documentation to make it clear for new users. Keep up the great work :)

ankurk91 commented 4 years ago

Should be closed with v3.5.0