CMS Development

xavianaxw
Member | Elite Partner
Member | Elite Partner

Achieving similar outcome with Wordpress shortcodes

Abit of an odd one, not a deal breaker but was wondering if we can achieve the following in Hubspot.

 

I am trying to replace part of my text/content that looks a little like this:

 

[shortcode]

into a custom HTML

 

<span class="special">Special</span>

I've tried tinkering around with google/re2's syntax but to no avail.

 

Was wondering if anyone has any ideas?

1 Reply 1
lscanlan
HubSpot Alumni
HubSpot Alumni

Achieving similar outcome with Wordpress shortcodes

Hi @xavianaxw,

 

I don't have anything for you that specifically works in HubSpot, although I know this has been done in the past. You could take a look into shortcode.js: https://github.com/nicinabox/shortcode.js. That's a bit older and you may need to adapt it a bit for HubSpot, but you could start there / see if it gives you any ideas.

 

If anyone else has done something similar though, feel free to chime in.

 

 - Leland

Leland Scanlan

HubSpot Developer Support
0 Upvotes