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

Paste shortcut and paste toolbar button not have the same behavior #1061

Open
desirade-fm opened this issue Jan 23, 2024 · 0 comments
Open

Comments

@desirade-fm
Copy link

Jodit Version: 4.0.5

Browser: Chrome/FF
OS: Windows
Is React App: False

Code

<h1 style="color:Tomato;">Hello World</h1>
<p style="color:DodgerBlue;">Lorem ipsum...</p>
<p style="color:MediumSeaGreen;">Ut wisi enim...</p>
<div id="editor"></div>
const editor = Jodit.make("#editor");

Expected behavior:
Use paste shortcut or paste toolbar button have the same paste behavior.

Actual behavior:
If I use the paste shortcut (ctrl+v) to paste the colored html tags (h1 and p) all the html is copied. If I use paste button I have only the text. The behavior is not the same between the two paste solutions.

Source code
I have found the source of this behavior :

const textBlob = await items[0].getType(TEXT_PLAIN);

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