Mar 20, 2019 5:54 PM
Hello,
For one of our projects, I need to be able to insert raw HTML inside of a HUBDB cell. When I use the "rich text" option it wraps everything inside of a <p> tag. Do I have any options?
Would using the REST API work?
Best,
Andrey
Feb 12, 2021 8:18 PM
No HTML insertion into hubDB is working for me. I think Hubspot has even blocked parseHTML in jquery. Very limiting and disappointing. Forces you to combine the db and dnd or modules and lose track of where things are.
Mar 21, 2019 2:05 PM
Hey, @theAndreyK you could try using a replace HubL filter when outputting the row in your code. So something like this:
{{ dynamic_page_hubdb_row.html|replace('<p>','')|replace('</p>','') }}
There looks to be a third parameter you might be able to use with the replace filter to target a specific count (e.g. the first <p> that is outputted if you have other paragraph tags in your code).
Mar 28, 2019 3:24 PM
Thanks for the reply Jason. It looks like if I use a regular text field and insert HTML, it will show up as HTML and only add a <div> around the content. Even better, if I use a sectioning tag like <article> it won't even add the <div>.
I'm going to need to use this right now for a project so I'll post back here to let everyone know if that ends up working or not.