You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Option to use text link instead of auto embed. #15102
Is your feature request related to a problem? Please describe.
Adding links. If an link goes to another WordPress site we will see an auto embed such as this:
A mix of auto embeds and text links.
Describe the solution you'd like
I would like the option to include an auto embed OR a text link. As some links above are automatically embedded showing an article preview while other links just show a text link.
By adding code from the above tutorial it forces the link dialog box to open for the links that were auto embedded. I can then select to convert the auto embeds to regular text links. One should not need to add the code to turn off auto embeds.
Based on these discussions, we propose to add a block transform to transform embed blocks to paragraph blocks but we should create <a> tags as content of the paragraph blocks to avoid the auto-embed to trigger in the frontend.
Hello Jorge. @jorgefilipecosta
Would this issue be something that you might be able to tackle?
Adding a link should have consistency. When a link is suddenly embedded and looks different then other links then that can create frustration.
When a link wants to embed itself so that it shows different then a standard text link then the default placeholder box should show up asking if one wants to embed the link.
I will also add in some design folks. @mapk@kjellr
The paste-a-link-to-embed functionality here is the same as other embed blocks, so I think the block transform to paragraph makes sense as a first step here.
With #14776, the Undo action can now be used to cancel an automated transform (e.g. when a user types ## at the beginning of a line, Undo can now cancel the automatic conversion to a Heading block).
This leads me to ask: in this issue, instead of adding explicit transforms, shouldn't we extend this UX pattern so that Undo can also "revert" the addition of an embed and just leave the untouched URL? /cc @ellatrix
Reacted by Paal Joachim Romdahl and Kjell Reigstad
Cross-posting the content from a duplicated issue #16159:
Is your feature request related to a problem? Please describe.
I often will paste a URL into the editor while I'm working on a draft for a post. My intent is not to create an embed, but just to save that URL in my notes so that I can later use it as a link in a paragraph.
When I paste it in, though, it automatically gets turned into an embed, even if the oEmbed process fails (which seems to be at least half the time for WP posts). There's no way to transform it back to the raw URL, so I have to right-click to copy the url, then remove the Embed block, then add some arbitrary character to the start of a new line, then paste the link again (because the link is only transformed when it's on a line by itself).
I could avoid that by adding that arbitrary character before I paste the link in the first place, but I always forget to do that, because I naturally don't expect the editor to do something contrary to my intent, even though I've known about the automatic oEmbed feature forever, and even agree that it's very useful when I'm intending to embed something. The problem is that, when I'm pasting in a URL, my intent is to save it as a note much more often than when my intent is to embed it.
Describe the solution you'd like
I don't know if there's a way to solve the underlying problem (the editor incorrectly assumes that my intent is always to create an embed), but we could at least provide an easy way to recover from that, by having a toolbar button to transform embeds to their raw URL, similar to how you can transform a paragraph to a heading.
A snackbar notice is going to be easily missed until/unless everyone is 'trained' to know that's where to look for messages. Also 'undo' implies that the user did something wrong, which is not the case here. In this case, a better idea would be to have a 'hoverable' action.
For example, on Helpscout, if I paste in a link it automatically makes a link. If I hover over it, it lets me chose 'edit' or 'unlink' -- this tells me
The default is to link
I can change this by direct action
That makes it more clear to everyone that it's not 'wrong' (which is what undo implies) but just a choice.
A snackbar notice is going to be easily missed until/unless everyone is 'trained' to know that's where to look for messages.
I agree that there is an important drawback there. That kind of interaction is foreign to WordPress.
However, it's still noteworthy that many important applications out there are using this model: Gmail allows undoing deletions and other motions via identical "snack bars"; Slack now notifies the user after markdown-style content is pasted, offering to convert it to rich text.
This doesn't mean WordPress needs to follow suit, but they are relevant examples.
Also 'undo' implies that the user did something wrong
This one I'd argue against, for two main reasons:
This has been a behaviour in the block editor for a while, especially in automatic text transformations (e.g. type - in a new line and you'll get a fresh List block, but undoing will result in a Paragraph that opens with a literal hyphen).
It's the same model as in the "standard" word processor model (MS Word and the like), where any automatic transformation can be undone after the fact. This is important to mention, because this word processor model is often cited as an example of what the established practice — and thus the common user's expectation — is. Again, this isn't a sufficient argument, but it should inform how we think about the block editor.
For example, on Helpscout, if I paste in a link it automatically makes a link. If I hover over it, it lets me chose 'edit' or 'unlink' -- this tells me
If it requires hovering, what makes this feature discoverable? Could we apply that to Gutenberg?
EDIT:
Link -> Can it embed? -> If yes (and does it create a WordPress embed?) -> Add a placeholder asking if the user wants to embed or convert to text link.
Link -> Can it embed? -> If no -> Automatically add a text link.
Reasons: The user is in control of how a link is seen on the backend and frontend. #17413
Activity
[-]Add option to link embed to use or not use auto embed[/-][+]Option to use text link instead of auto embed.[/+]youknowriad commentedon Apr 22, 2019
Thanks for opening the issue, this was discussed during the triage session today https://wordpress.slack.com/archives/C02QB2JS7/p1555939888308300
Based on these discussions, we propose to add a block transform to transform embed blocks to paragraph blocks but we should create
<a>tags as content of the paragraph blocks to avoid the auto-embed to trigger in the frontend.paaljoachim commentedon Sep 9, 2019
Hello Jorge. @jorgefilipecosta
Would this issue be something that you might be able to tackle?
Adding a link should have consistency. When a link is suddenly embedded and looks different then other links then that can create frustration.
When a link wants to embed itself so that it shows different then a standard text link then the default placeholder box should show up asking if one wants to embed the link.
I will also add in some design folks.
@mapk @kjellr
kjellr commentedon Sep 9, 2019
The paste-a-link-to-embed functionality here is the same as other embed blocks, so I think the block transform to paragraph makes sense as a first step here.
mcsf commentedon Sep 23, 2019
With #14776, the Undo action can now be used to cancel an automated transform (e.g. when a user types
##at the beginning of a line, Undo can now cancel the automatic conversion to a Heading block).This leads me to ask: in this issue, instead of adding explicit transforms, shouldn't we extend this UX pattern so that Undo can also "revert" the addition of an embed and just leave the untouched URL? /cc @ellatrix
kjellr commentedon Sep 27, 2019
That sounds reasonable. I'm not sure how discoverable it will be, but I do think it makes senses to do.
gziolo commentedon Nov 20, 2019
Cross-linking related requests from the Gutenberg plugin forum:
gziolo commentedon Nov 20, 2019
Cross-posting the content from a duplicated issue #16159:
paaljoachim commentedon Jan 13, 2020
https://core.trac.wordpress.org/ticket/49185#ticket
mcsf commentedon Jan 13, 2020
Could we combine the undo behaviour with a timely snackbar notice? "So and so happened. Press Meta + Z to Undo."
paaljoachim commentedon Mar 19, 2020
It would be great with some feedback on this issue, so we can move it onward in finding a good solution.
paaljoachim commentedon Mar 19, 2020
I went and made a bug report showing how embedding works in Gutenberg 7.7.1:
#21029
Suggesting an easy fix.
desaiuditd commentedon Apr 5, 2020
I've updated #17413. It may solve this issue.
Ipstenu commentedon Apr 17, 2020
A snackbar notice is going to be easily missed until/unless everyone is 'trained' to know that's where to look for messages. Also 'undo' implies that the user did something wrong, which is not the case here. In this case, a better idea would be to have a 'hoverable' action.
For example, on Helpscout, if I paste in a link it automatically makes a link. If I hover over it, it lets me chose 'edit' or 'unlink' -- this tells me
That makes it more clear to everyone that it's not 'wrong' (which is what undo implies) but just a choice.
mcsf commentedon Apr 17, 2020
Thanks for weighing in.
I agree that there is an important drawback there. That kind of interaction is foreign to WordPress.
However, it's still noteworthy that many important applications out there are using this model: Gmail allows undoing deletions and other motions via identical "snack bars"; Slack now notifies the user after markdown-style content is pasted, offering to convert it to rich text.
This doesn't mean WordPress needs to follow suit, but they are relevant examples.
This one I'd argue against, for two main reasons:
-in a new line and you'll get a fresh List block, but undoing will result in a Paragraph that opens with a literal hyphen).mcsf commentedon Apr 17, 2020
If it requires hovering, what makes this feature discoverable? Could we apply that to Gutenberg?
Ipstenu commentedon Apr 19, 2020
Oh I promise you, having ‘undo’ work like it does has resulted in a lot of “what did I do wrong/bad!?” from users
paaljoachim commentedon Apr 20, 2020
So the process should be...
EDIT:
Link -> Can it embed? -> If yes (and does it create a WordPress embed?) -> Add a placeholder asking if the user wants to embed or convert to text link.
Link -> Can it embed? -> If no -> Automatically add a text link.
Reasons: The user is in control of how a link is seen on the backend and frontend.
#17413