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

Style-attributes from pasted paragraphs are applied to new paragraphs inserted before or after #4759

Open
SKPFCW opened this issue Mar 15, 2024 · 0 comments

Comments

@SKPFCW
Copy link

SKPFCW commented Mar 15, 2024

I have a problem dealing with text that I paste into the editor via the clipboard when the text to be pasted comes from a web page and contains style attributes.

If I have loaded a document in the editor and insert a paragraph copied from a website that has style attributes, then these will be adopted by the editor. This behavior is as expected and correct.

But if I press the Enter key after pasting from the clipboard to continue working with a new paragraph, then the style attributes of the paragraph inserted via the clipboard are adopted for this new paragraph. It doesn't matter if the new paragraph is inserted before or after the pasted one.
This may lead to problems when setting formatting through the editor, as the information in the style attributes overwrites the formatting information that is assigned by CSS classes, for example. I consider this behavior to be wrong.

Is there an option that prevents new paragraphs from adopting the style attributes of the previous paragraph or how can I solve the problem in another way?

See the fiddle: https://jsfiddle.net/9s5uao1t/

Thanks in advance,
Robert

Editor version.

4.1.4

OS.

Windows 10 + 11

Browser.

Edge 122.0.2365.80
Chrome 122.0.6261.113

Recording.
Video_2024-03-15_133202.mp4
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