-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Pasting HTML fails #1445
Comments
Could be Ubuntu specific too? Firefox on Mac works fine for me. |
I've just tried on Windows 10, and Firefox fails there too (Chrome works fine). I don't have a Mac to test on. To be clear, it's important to have the actual HTML above as what is presented as HTML in the clipboard. So, if you copy and paste the code I provided in my issue direct from your web browser, the HTML that pastes into quill will (at least on Ubuntu and Windows) be the HTML that GitHub uses to display the "HTML", not the HTML itself (and so works fine even in Firefox on Ubuntu). If you first paste it into a text editor and then copy/paste that into quill, there is no alternative GitHub html there, and so it pastes the HTML we intended. Alternatively, copy directly from the title under the video on the youtube page - I've disabled all addons in Firefox on Ubuntu and Windows, if someone else has FF on one of those to check it's not something specific to me that would be great! |
I can reproduce by copying it as HTML not as a string:
Tested with Firefox 53 on Windows 7 |
When manually pasting certain HTML, the paste fails with "TypeError : n.value is not a function" and the pasted HTML remains in the hidden ql-clipboard div. I discovered this when trying to copy in titles (not videos) from beneath videos on Youtube.
Steps for Reproduction
Visit quilljs.com
copy paste the following HTML anywhere into the quill editor on the front page
<h1 class="watch-title-container"><span id="eow-title" class="watch-title" dir="ltr" title="Brian Beckman: Don't fear the Monad">Brian Beckman: Don't fear the Monad</span></h1>
Expected behavior:
The pasted text appears where it is pasted
Actual behavior:
Nothing appears. Inspecting the DOM shows the pasted HTML inside the hidden ql-clipboard div.
Platforms:
Firefox 53.0 on Ubuntu 16.10
Note: It works as expected on Chrome 58.0 on Ubuntu 16.10, so seems Firefox specific
Version:
1.2.4 locally and whatever version is on quilljs.com front page.
The text was updated successfully, but these errors were encountered: