Skip to content

Bind missing events#964

Open
live627 wants to merge 2 commits intosamclarke:masterfrom
live627:events
Open

Bind missing events#964
live627 wants to merge 2 commits intosamclarke:masterfrom
live627:events

Conversation

@live627
Copy link
Copy Markdown
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
Copy Markdown
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