samclarke / SCEditor

A lightweight HTML and BBCode WYSIWYG editor
http://www.sceditor.com/
Other
659 stars 188 forks source link

Bind missing events #964

Open live627 opened 4 months ago

live627 commented 4 months ago

The supported events are:

What this PR does

Adds callable events that were only accessible via "signals"

Goal

To eventually replace signals with events. I believe the concept of event listeners is easier to grasp since everything in the JS world uses them.

Question

Should we go one step further and make init() and destroy() events too?

live627 commented 4 months ago

Just noticed that those "missing" events are bound to the editor's containing div. Is that a roundabout way to use CustomEvent from the DOM?