Ckeditor4: Pasting as plain text retaining format

Created on 7 Jul 2017  路  11Comments  路  Source: ckeditor/ckeditor4

Are you reporting a feature or a bug?

Bug

Provide detailed reproduction steps (if any)

  1. Create an inline editor instance
  2. Set forcePasteAsPlainText to true in the config
  3. Insert formatted text into the editor (e.g. <strong>Bold</strong> <span>My span</span>
  4. Copy formatted text and paste into the editor (or another instance of an editor)

Expected result

The pasted text should have all formatting removed and replaced with plain text

Actual result

The format of the text is retained on paste

Other details

  • Browser: Chrome, Firefox, IE, Safari
  • OS: Windows 10
  • CKEditor version: 4.7.0
  • Installed CKEditor plugins: sharedspaces, font

NOTE:
This was tested in IE but did not occur.
Pasting from external sources (e.g. Word or HTML from a page) does not exhibit the same behaviour

chrome firefox ie ios confirmed bug

Most helpful comment

@mlewand It occurs in other browsers as well. Issue updated.

All 11 comments

@beatadelura is it Chrome only (title, original report) or does it affect any other browser (labels)? In case it does please, update the title / "Other details" section accordingly.

@mlewand It occurs in other browsers as well. Issue updated.

Same problem here. Browsers: Chrome, FF, Safari. Force pasting as plain text is still working in IE only.

I wasn't able to reproduce the problem in current editor version (4.9.0).
I test it on MacOS under Chrome, Firefox, Safari and Windows 10 x64 with Edge, Chrome, Firefox.
Each of this browser paste content without formatting.
I've used this page for testing purpose. https://codepen.io/msamsel/pen/zWogdX
@JamesPreston1993, @kreatIL problem seems to be solved. Or do I missed something? If so, please provide more details how to reproduce bug.

After doing the upgrade to 4.9.0 I couldn't reproduce the problem either. I think this issue could be marked as solved.

Thanks for help @kreatIL that gives us more confidence.

Let's wait for the OP. If there's no response in our standard 2 weeks we can close the issue.

I can still reproduce it in the scenario it was logged and using the codepen provided by @msamsel

The steps to reproduce are to format the text in the editor, copy the formatted text from within the editor and paste it into to the same editor instance or a different editor instance

@JamesPreston1993 so the issue appears only when you copy content between editors or inside editor? I thought that text came from external place.

I see that wrong behaviour is possible to reproduce in such scenario on both inline and iframe editor.

@msamsel That's correct, it seems to behave as expected when copying from external sources

@JamesPreston1993 thank you for the clarification :)

Closed in #1830. Fix will be included in 4.10.0 release.

Was this page helpful?
0 / 5 - 0 ratings