ckeditor4 icon indicating copy to clipboard operation
ckeditor4 copied to clipboard

Styles are not preserved when typing text on the end of styled line after changing font style

Open f1ames opened this issue 7 years ago • 4 comments

Are you reporting a feature or a bug?

Bug

Check if the issue is already reported

None.

Provide detailed reproduction steps (if any)

The easiest way is to follow the test scenario in /tests/plugins/font/manual/reapplystyles, however it can be easily reproduced on http://sdk.ckeditor.com/samples/fullpreset.html.

  1. Go to http://sdk.ckeditor.com/samples/fullpreset.html.
  2. Replace editor content with <p><span style="font-family:Georgia,serif"><span style="font-size:24px"><strong><em>This is styled text</em></strong></span></span></p>.
  3. Place cursor on the end of the line.
    • Here you should notice that style drop-downs does not reflect text styling.
  4. Change font size or font family.
  5. Type something.

Expected result

Typed text is styled same as the text before with only one changed styled (font size/family).

Actual result

Typed text is only styled with one selected style (font size/family).

Other details

If step 4. Change font size or font family. is skipped and text is typed without any changes it works fine.

  • Browser: Edge (Microsoft EdgeHTML 14.14393; Microsoft EdgeHTML 14.14393)
  • OS: Windows 10
  • CKEditor version: 4.7.1
  • Installed CKEditor plugins: Full preset

f1ames avatar Jul 25 '17 13:07 f1ames

Also reproducible in IE11.

f1ames avatar Jul 31 '17 06:07 f1ames

CKEditor is an awesome tool, thank you! It would be highly appreciated when this behaviour would be changed and the style would be kept the same when making a new paragraph. the current behaviour resets style and font size when making a new paragraph.

Spitzbua avatar Dec 19 '17 09:12 Spitzbua

I can confirm this is also present in Firefox! I may check out the sources and have a look, if i can fix it myself, but i wont guarantee anything.

dtamm avatar Sep 06 '18 13:09 dtamm

Confirmed, existing in Chrome. My client gets very upset when this happens. Please see about a fix. Thank you.

bjshumway avatar Mar 27 '19 20:03 bjshumway