ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.51k stars 3.7k forks source link

Keep format after the entire formatted text was deleted #1937

Open minhtranite opened 5 years ago

minhtranite commented 5 years ago

Is this a bug report or feature request? (choose one)

🆕 Feature request

💻 Version of CKEditor

It is a custom build from latest version.

📋 Steps to reproduce

  1. Select some words and change format (bold, color...).
  2. Delete there words.

✅ Expected result

Keep wrap element and format until content empty and press delete one more time. If continue typing new content will use current format.

❎ Actual result

Element and all format are gone.

📃 Other details that might be useful

This feature work almost like gmail editor.

Reinmar commented 5 years ago

In other words, you'd like the format to be preserved even when the entire text that had it was just deleted?

I've just checked that Gmail does it (because Chrome does it natively and Gmail uses nearly native contentEditable). Google Docs does it too. CKEditor 4, TinyMCE, Pages don't do it – they behave like CKEditor 5.

I'm curious about what Word does.

This is a possible change in the behaviour. Perhaps it's even fairly easy to do without changing CKEditor 5's source code. But we'd need to thoroughly analyse this (it's implications) before shipping such a change.

costibotez commented 3 years ago

Hi, @Reinmar Can you plz specify me the easy solution to do this without change the CKEditor 5's source code? Thank you.

crypto-dump commented 3 years ago

Hi, @Reinmar I've checked this bug on TinyMCE and it's working quite well. It would be really helpful for clients if we solve this bug. You mentioned that this is possible change. Can you please point us exactly what you mean the easy approach?

CKEditorBot commented 1 year ago

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

joannazinsli commented 1 year ago

Seems like maybe instead of no activity in the past year you've actually made improvements. We recently upgraded to version 39 and this behavior is supported (on selecting and replacing text, the formatting is maintained). 🥳

CKEditorBot commented 1 week ago

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.