How do I post a link without an embedded?

I know there is a previous thread on this, but I was hoping to get some guidance on the best way to achieve this behaviour.

I can deactivate the core/embed block, but then pasting a link in doesn’t work at all.

I have full control of the theme I am building, so I am able to take extreme action such as:

– Register block hooks in JavaScript, to modify the block editor;
– Register block hooks in PHP to modify the block output;

Can you think of any way I can achieve my desired behaviour, or is it truly impossible?

Viewing 1 replies (of 1 total)

  • Plugin Support Paal Joachim Romdahl

    (@paaljoachim)

    2 years, 9 months ago

    Hi joaquimds

    I have made this issue: https://github.com/WordPress/gutenberg/issues/21029
    Do also add a comment to it. I went ahead and added a link to your issue as well.

    Hopefully it will be fixed soon, as this is a very old issue that has not been fixed.

    One work around is in a paragraph block add some text, or I just add a dot and then paste inn a link. Then remove the text/dot. If the embed shows up on the frontend I will go back in and redo the link and leave a dot in before the link.

    I’m continually sharing webpages with friends and family via iMessage – predominantly from the Messages app on my MacBook Pro or iMac, often from my iPhone, and occasionally from my iPad. It could be a link to a limoncello recipe on allrecipes.com for Mom, a listing for a pre-CBS Strat on reverb.com for a fellow gearhead, or a YouTube video of face-licking puppies piled high on a giggling 8-yr old for my daughter. And if you’re anything like me, you probably do the same. (Well, perhaps not specifically liqueurs, guitars, and housepets.)

    What’s cool is that the Messages app does something quite handy. Because it’s smart enough to know that what you have typed or pasted in is a link to a website, it renders a thumbnail preview snippet for everyone’s viewing pleasure. But there are occasions when I want my recipient to see the actual text of the domain name. Why? Well, that’s none of your business. Just kidding!

    Here’s one example…

    Unwanted Website Preview Use Case Scenario

    My brother Tom was registering a domain name and asked for my host’s nameservers to point the new record. I get it – a little copy and paste action saves a few seconds of typing. It’s called optimizing one’s time and efficiency. No problem. So, using Messages on my Mac, I sent:

    NS1.CHAFFEESERVICES.COM
    NS2.CHAFFEESERVICES.COM

    And this is how it appeared:

    How do I post a link without an embedded?
    The blue circle is a carriage return

    Drat. What happened?

    Messages attempted to render the URL, but couldn’t because there was no site at the location – nothing to pass through HTTP. Not a huge deal because all I wanted was the string of text to print, anyway. But even that didn’t happen. Note: The blue circle in the image above is a from a carriage return in the text.

    Knowing that Apple almost always thinks of these things (they are very good at anticipating user interface needs), I figured there had to be a solution. All it took was a little intuition and a few tests.

    Test 1

    The first thing that came to mind was leading the domain name with a period (Typically referred to as a “dot”). Why? I dunno. I guess I figured that a user-accessible URL never begins with a leading dot because the hierarchy is read from right to left.

    I tested my theory:

    .NS1.CHAFFEESERVICES.COM
    .NS2.CHAFFEESERVICES.COM

    Sure enough, it worked! Well, kind of. The second entry printed with the period at the beginning:

    How do I post a link without an embedded?

    Test 2

    Maybe some sort of bracketing would do the trick. Why less- and greater-than symbols? Again, I have no idea. But this time I really mean it – I can’t even venture a guess as to why.

    <NS1.CHAFFEESERVICES.COM>
    <NS2.CHAFFEESERVICES.COM>
    How do I post a link without an embedded?

    Fail.

    Test 3

    How about starting the entire thing with one dot? Perhaps it would treat everything that followed as a string:

    .test.com
    chaffee.com
    How do I post a link without an embedded?

    Victory!

    In Summary

    If you have one or more website addresses that you would like to display as text in a Message rather than a thumbnail preview snippet thingy, simply begin the first line with a period (“dot”), and they will display as written.

    Tom: Apple is really good at thinking thru things.
    Mark: Yep. Just not telling people about it. 😊
    Tom: mhm

    You may have your own reasons for wanting to show URLs “as typed” rather than with link previews. If so, I hope this was helpful. And if you have any other tips or tricks for highjacking display methods with iMessage, let us all know in the comment section below!


    Epilogue: How the Sausage Was Made

    If for whatever strange reason you’d like to see the conversation between my brother and me as it happened in real-time, here you go. It’s presented in all it’s raw and random glory – spelling and grammatical errors included. We were far more enthused than any pair of siblings ever should be over something this trivial to most.

    If you have one or more website addresses that you would like to display as text in a Message rather than a thumbnail preview snippet thingy, simply begin the first line with a period (“dot”), and they will display as written.

    How do I turn off embeds in Discord?

    To disable the auto-embed link preview in Discord, first, open the Discord User settings. Then, navigate to the Discord “Text & Image” settings and turn off the “When posted as links to chat” and “When uploaded directly to Discord” toggle to disable the auto-embed link preview feature in Discord.

    How do I post a link on Discord without preview?

    Step 2: Under the “App Settings” section, tap “Text & Images.” Step 3: Under the “Link Preview” section, tap the toggle to the right of “Show website preview info from links pasted into chat” to stop Discord from showing website previews as you use the app.