CMS Development

Aaaaandrei
Participant

Using the rich text tag inside a custom template

Résolue

Hi,

 

I'm using the design manager to build a modular email template with easily customisable modules for our team to quickly change. I'm using tags with predefined content so it can stay the same in case it doesn't have to be changed. The issue I'm facing is that, while in content creator, whenever I'm trying to edit a module (like the white text block below fist CTA) that breaks the email layout. 

 

I copied over and html file with styling done in the <head> and then included the text in white background in a rich text tag, just like this: 

 

{% widget_block rich_text "right_column" overrideable=True, label='Right Column' %}
{% widget_attribute "html" %}
<!--code goes here-->
{% end_widget_attribute %}
{% end_widget_block %}

 

Here's a screenshot of how the email is supposed to look like when rendered correctly, in the live preview of the deisgn manager. 

How the email is supposed to look like.PNG

 

And here is a screenshot of how the email breaks upon editing the rich text module inside the content creator. 

Email looks broken in the content creator.PNG

 

Does this have to do with the code inside the rich text tag?

Or the styling in the <head>?

Or maybe this is a hubspot issue? 

What would be an alternative for this?

 

Cheers,

Andrei

 

 

0 Votes
1 Solution acceptée
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Using the rich text tag inside a custom template

Résolue

@Aaaaandrei,

it only happens when you edit the text in the rich text editor?

i am guessing that the problem is there.  how are you incorporating these modules?

are there any closing tags in it that would prematurely close something else?

when i build my email templates, i use custom modules, then copy the module snippet and add to my email template.  roughly like this:

<table>
  <tr>
     <td>
        {% module "module_154360243717279" module_id="1596258" label="Content" %}
     </td>
  </tr>
</table>

 

Voir la solution dans l'envoi d'origine

2 Réponses
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

Using the rich text tag inside a custom template

Résolue

@Aaaaandrei,

it only happens when you edit the text in the rich text editor?

i am guessing that the problem is there.  how are you incorporating these modules?

are there any closing tags in it that would prematurely close something else?

when i build my email templates, i use custom modules, then copy the module snippet and add to my email template.  roughly like this:

<table>
  <tr>
     <td>
        {% module "module_154360243717279" module_id="1596258" label="Content" %}
     </td>
  </tr>
</table>

 

Aaaaandrei
Participant

Using the rich text tag inside a custom template

Résolue

Hi @dennisedson thanks for your reply. 

 

Yes the issue only occurs when changing the text within the rich text module. 

Thanks for the tip, I'll try using custom modules instead of tags and see if that solves the issue!

 

Andrei

 

0 Votes