How to display blog post content (paragraphs, links) with minimal fuss?

If I display the blog body using the text element, it obviously doesn’t recognize html (e.g. links in my blog post).

If I display the blog body using the html element, the links are displayed, but it obviously doesn’t recognize the paragraphs in the body - it just becomes 1 big paragraph.

I’d rather not have to use ‘p’ tags. I’m just wondering if anyone has found a clever way to deal with this (e.g. as Wordpress does)?

1 Like

This has been recently improved. Check out the below announcement.

1 Like

Thanks @paritosh.mehta19, but it doesn’t allow me to control the link text. Whether I use html (below) or BB Code, it looks something like this:

31%20AM

Yea, I guessed you were referring to this and I know it’s not ideal!

Are you trying to achieve this automatically? I mean do you expect to get the links entered automatically detected? Or are you okay with entering this manually too?

I have managed to set the desired anchor text for links in a text element using BB code. But obviously its manual and a bit tedious. If you want to see an example of how I am doing it, please let me know and I’ll share something.

1 Like

Thanks @paritosh.mehta19, the problem is that I’m pulling the content from the database, so whether I use html or bbcode, it doesn’t work. I understand that I could use bb code if I was putting the content directly into the text element, but I’m pulling from the database. Cheers, Phil

I save it with the correct syntax directly into the Database column. its tedious when saving the data, but gets the work done for now. But if this is an external database the data might not be in the format you need and so would not work. Also, my approach won’t be scalable if you have a lot of data to work with.

Oh, I got it! I had tried putting the bbcode in the database before but I had checked ‘Recognize links and emails’, which caused it to not work.

The main downside of this approach is having to hardcode the color in the database as well, but if I ever want to change the color, I can always export the database, search and replace, import. Thanks @paritosh.mehta19!

@philnauta: That’s the same way I do it. Good to know that you figured it out! Cheers.

This topic was automatically closed after 70 days. New replies are no longer allowed.