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

Clipboard data of 'text/plain' are pasted as html? #1012

Closed
hata6502 opened this issue Jan 15, 2020 · 2 comments
Closed

Clipboard data of 'text/plain' are pasted as html? #1012

hata6502 opened this issue Jan 15, 2020 · 2 comments

Comments

@hata6502
Copy link
Contributor

Example, paste the following plain text data

<b>bold</b>

EditorJS displays

bold

I'll write more detail soon. 😃

@hata6502 hata6502 changed the title Paste data of 'text/plain' are operated as html? Clipboard data of 'text/plain' are pasted as html? Jan 15, 2020
@hata6502
Copy link
Contributor Author

  1. Copy <b>bold</b> as text/plain:

Screenshot from 2020-01-15 23-02-08

  1. and watch dataTransfer by console.log:

Screenshot from 2020-01-15 23-03-18
(src/components/modules/paste.ts)

  1. <b>bold</b> is got as text/plain:

Screenshot from 2020-01-15 23-03-59

  1. but, <b>bold</b> is pasted as text/html:

Screenshot from 2020-01-15 23-04-15

@hata6502
Copy link
Contributor Author

hata6502 commented Jan 28, 2020

I think text/plain data should be pasted as text/plain, not text/html.

For example, this matter prevents writing HTML learning article.
It may also prevent making own Raw HTML block.

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