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

Placing cursor and clicking Add Link should make the whole word a link #9183

Closed
noisysocks opened this issue Aug 20, 2018 · 2 comments
Closed
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Enhancement A suggestion for improvement.

Comments

@noisysocks
Copy link
Member

In the Classic Editor, placing your cursor in the middle of a word and clicking Add Link makes the entire word a link:

classic

In Gutenberg, however, the URL is inserted as a link in the middle of the word:

gutenberg

We should match the Classic Editor behaviour as it is a nicer UX.

Props to @azaozz for noticing this in #8807.

@noisysocks noisysocks added [Type] Enhancement A suggestion for improvement. [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels Aug 20, 2018
@ellatrix
Copy link
Member

I'm going to close this issue as the behaviour is inconsistent with across editors and it seems hard to make it work for all languages. In the old editor, we relied on the browser to format text, which is no longer the case.

Google Docs, CKEditor, Draft.js, Medium, Slate.js, Quill.js, all lack this feature. Some other editors do have this feature, probably relying on some native API.

Lastly, I do prefer to keep it explicit. You select some text, you format it, and only the selected text becomes formatted.

@ellatrix
Copy link
Member

Not as easy, but you can continue to use double click to select a word. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants