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

Quill2: Consistent Initialization Event for Modules #3374

Closed
awderh opened this issue May 23, 2021 · 1 comment
Closed

Quill2: Consistent Initialization Event for Modules #3374

awderh opened this issue May 23, 2021 · 1 comment

Comments

@awderh
Copy link

awderh commented May 23, 2021

I'm requesting a consistent initialization event when the editor is created for a module I'm working on.

If Quill is init'd on a DOMElement that has existing innerHTML, then a editor-change or text-change event is fired. However, if there is no existing HTML, then an event is not fired.

I could create HTML within the DOM during module initialization (which occurs during theme.init(), but a local let html = ... variable within Quill creates ambiguity/inconsistency. So, I have the user trigger a module-specific .init() function after the editor has been initialized.

On Quill 1.X latest, this doesn't appear to be an issue.

Steps for Reproduction

  1. Visit https://jsfiddle.net/awderh/5asnev9p/23/
  2. Notice that the console does not output called on quill2

Expected behavior: Regardless of DOM content on init, trigger a text-change event or a similar event.

Actual behavior: Only text-change triggered when DOM content exists.

Platforms: Windows Firefox, Chrome, ...
Version: 2.0 (Latest per NPM)

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

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

No branches or pull requests

2 participants