Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind missing events #964

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Bind missing events #964

wants to merge 2 commits into from

Conversation

live627
Copy link
Collaborator

@live627 live627 commented May 8, 2024

The supported events are:

  • 'keyup`
  • 'keydown`
  • 'Keypress`
  • 'blur`
  • 'focus`
  • 'input`
  • 'nodechanged` - When the current node containing the selection changes in WYSIWYG mode
  • 'contextmenu`
  • 'selectionchanged`
  • 'valuechanged`

What this PR does

Adds callable events that were only accessible via "signals"

  • pasteraw
  • paste
  • pastehtml

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?

@github-actions github-actions bot added the lib label May 8, 2024
@live627
Copy link
Collaborator Author

live627 commented May 8, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant