ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Link Feature (or Selection) Usability Enhancement: Handle Trailing Blanks, prevent accidental "blank formatting/linking"

Open mmichaelis opened this issue 2 years ago • 1 comments

📝 Provide a description of the improvement

If you double-click on a word, not only the word but also a possibly following blank character is selected.

This behavior follows a behavior that is the same for Microsoft Word.

But especially for the link feature, it is not desirable that upon link creation, this trailing blank is also included within the link:

See Links | CKEditor 5 Documentation:

Double-click and link:

selection state after double click

Resulting link including trailing blank:

link including trailing blank

In my opinion, any inline formatting should not include the trailing blank... but at least Microsoft Word (tested with recent Office 365) has a different opinion here:

  • On Bold, Italic, etc. formatting, always also the selected blank gets the corresponding format.
  • 👉 But: (and this is the request) When creating a link, the link will not contain the trailing blank character anymore.

Experiments with Microsoft Word show, that it is only the trailing blank ignored here. If you extend your selection to blanks around a word, only the trailing, not the leading blank, gets removed from the created link.

To sum it up: To align with Word editing experiences, I suggest changing the link feature in that way, that on trailing blank character within the selection, this character is not included in the link.

Side Note: Linking Blank Characters

Possibly interesting side note: If you just select a sequence of blank characters within Microsoft Word and create a link, the blank characters get replaced by the entered URL:

create link for blanks

And on "Ok", the result is:

blanks replaced by link

In contrast, CKEditor 5 will create "linked blanks" here. But that's another topic and (so I assume) a very rare corner case.

📃 Other details

  • Browser: Chrome
  • OS: Windows
  • CKEditor version: 41.0.0
  • Installed CKEditor plugins: Link

If you'd like to see this improvement implemented, add a 👍 reaction to this post.

mmichaelis avatar Jan 26 '24 09:01 mmichaelis

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.

CKEditorBot avatar Dec 06 '25 23:12 CKEditorBot