[GUIDE] Text formatting in community posts

Hi Don -

If you add a link, it gets interpreted and shows up a preview box.

Never mind - I don't know why it shows either ...

For example:

https://www.amazon.com/Hubitat-Elevation-Home-Automation-Hub/dp/B07D19VVTX/

https://www.amazon.com/Hubitat-Elevation-Home-Automation-Hub/dp/B07D19VVTX/

Then again, maybe not - because it isn't showing up now ....

1 Like

I can see my post. Let me try again

2 Likes

image

I have seen these boxes on a lot of posts. Looks nice.
Is there something built into community hubitat com or is it HTML or something else?

1 Like

When it does work.. I has to be a link on a line by itself.. But I have noticed it doesn’t seem to work on all links

1 Like
1 Like

Bryan,
Thanks for the info - I can't see the Onebox in the preview - So I will use this reply as a test

Link from the Onebox page:

https://www.amazon.com/Amazon-Echo-Dot-Portable-Bluetooth-Speaker-with-Alexa-Black/dp/B01DFKC2SO

A share link from Amazon
https://www.amazon.com/dp/B081FF9G2K/ref=cm_sw_r_sms_c_api_i_Qf0IEbZQ2JY33

2 Likes

Troubleshooting

If Onebox is not working as expected, please check the following:

  • Test your site by pasting the link into iFramely ; check that the target is using correct OpenGraph or oEmbed meta tags for content. And remember the description text is required in Discourse!
  • Verify that the onebox request to the target website has not been blocked by user-agent . Some WordPress hosts frequently block “unknown” user agents.

The iFramely link above will make a HTML iframe if things are not working
I think I have it now -

2 Likes

Still No Joy - Back to the docs...

1 Like

I give up
I have tried every thing I can think of
No Joy
Any body know the secret handshake? :cry: :confused:

1 Like

You need to only post the first part of your Amazon link. If you use anything after the "part number" so to speak, it will not work.

This is wrong https://www.amazon.com/dp/B081FF9G2K/ref=cm_sw_r_sms_c_api_i_Qf0IEbZQ2JY33

This is correct
https://www.amazon.com/dp/B081FF9G2K

https://www.amazon.com/dp/B081FF9G2K

2 Likes

That is much easier, but just for reference, you can also do strike through like this...

<s>Text you want strike through

It won't show here because I marked it as preformatted text so you could see what I've done.
This will strike all texts from <s> forward. To set an end point you use </s>

So to strike just a section, you can use <s>Section of text you want strike through</s> to limit it.

2 Likes

There has got to be something that I am missing.
Is there anything that I have to sign-up for or download???
Is there something built into community.hubitat.com that does the transformation?

This is a test - Dimmer - Copied from the you sent - and displayed - Cashed?
https://www.amazon.com/dp/B081FF9G2K


This is a test - Shelly 1
https://www.amazon.com/dp/B07YLRX7P2
https://www.amazon.com/dp/B07YLRX7P2

This is a test - Shelly PM
https://www.amazon.com/dp/B07RQ4F4WH

1 Like

Nope, just copy the link from Amazon on its own line.

1 Like

Why didn't the Shelly 1 get a box in my last post? It worked on the iFramely test page.
Is Onebox just buggy?

1 Like

It did, I see both Shelly links in boxes in your post above... One green and one orange one.

1 Like

See the link in between the green and orange boxes,
There is supposed to be 3 boxes.
A blue Shelly 1 just shows a link instead of a box.

I really don't mean to beat a dead horse - but if I am doing something wrong, that I can fix, I would like to make it work reliably. I do appreciate your time on this.

.

1 Like

Question - how do you make collapsible text sections in discourse? I tried googling it, but never figured it out. :confused:

For example, the "Here's the flow" part of this message:

Like this:
[details="Secret"]
Hidden text
[/details]

Secret

Hidden text

4 Likes

You can get to the same place as the markup indicated by @bcopeland by:

  1. Selecting text
  2. Clicking on the gear icon
  3. Selecting "Hide details"
5 Likes

Thanks - both of you!!!

1 Like