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

Issue when using Quill 2.0 (2.0.0-dev4) - ref. usage of non-existent pasteHTML function #1

Open
cbwswsolns opened this issue Nov 4, 2021 · 0 comments

Comments

@cbwswsolns
Copy link

cbwswsolns commented Nov 4, 2021

Vue.js version and component version

Vue v.2.5.0
vue-quill-editor-next v.2.0.1
Chrome browser - v.95.0.4638.54 (Official Build) (x86_64)
MacOS v.10.15.7

Reproduction Link

https://jsfiddle.net/cbwswsolns/2de91wzc/7/

Note: this fiddle is an edit of the example "CDN example page" jsfiddle given in this package README.md notes.
The edit is simply to replace the CDNs to point to quill versions 2.0.0-dev.4 and to vue-quill-editor-next v.2.0.1

Steps to reproduce

Simply hit the run button in the above fiddle and the Chrome console shows:
"TypeError: this.quill.pasteHTML is not a function"

What is Expected?

The README.md file in this package states:
"Quill editor component for Vue. Use quill 2.0."

This error should be expected when using Quill 2.0 but is not expected when using earlier 1.3.4 version (as per the fiddle example referenced in this package README.md notes).

What is actually happening?

The initialize method and watch methods in the editor.vue component of this package currently includes the following function calls:

this.quill.pasteHTML

However, since quill version 1.3.4, the pasteHTML function no longer exists under this name.

The pasteHTML function has been moved to the quill "clipboard" module and the function has been renamed to dangerouslyPasteHTML (to emphasise the danger of pasting HTML content from a source into a browser with XSS risks).
Refer to: slab/quill@v1.3.4...develop (and search for "pasteHTML" in the files changed)
Also refer to: slab/quill#981

If any other parts of the vue-quill-editor-next package have dependency on quill 2.0, I suggest modifications to use:

this.quill.clipboard.dangerouslyPasteHTML instead of this.quill.pasteHTML

@cbwswsolns cbwswsolns changed the title This package will not work with Quill 2.0 (2.0.0-dev4) when editor content is NOT null Issue when using Quill 2.0 (2.0.0-dev4) when editor content is NOT null Nov 4, 2021
@cbwswsolns cbwswsolns changed the title Issue when using Quill 2.0 (2.0.0-dev4) when editor content is NOT null Issue when using Quill 2.0 (2.0.0-dev4) - pasteHTML function moved and name changed Nov 4, 2021
@cbwswsolns cbwswsolns changed the title Issue when using Quill 2.0 (2.0.0-dev4) - pasteHTML function moved and name changed Issue when using Quill 2.0 (2.0.0-dev4) - quill pasteHTML function moved and name changed Nov 4, 2021
@cbwswsolns cbwswsolns changed the title Issue when using Quill 2.0 (2.0.0-dev4) - quill pasteHTML function moved and name changed Issue when using Quill 2.0 (2.0.0-dev4) - ref. usage of non-existent pasteHTML function Nov 4, 2021
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

1 participant