Hi guys, I have a question is about the modules functionality.
When I create a page template and use
{% dnd_module path='@hubspot/rich_text', html='... my custom html here ...' %}
there to insert some editable sections I have a lovely possibility to edit contents 'in-place' with handy toolbar in the top and that is just beautiful.
But since my goal is to have these editable sections reusable, I tried to put them into modules. There I see that 'dnd_module/module is disabled in this context'; and when I put my custom html into a module's field and use a kind of
{% rich_text html="{{ module.content }}" %}
definition, it provides only editing of text via small external editor in the left sidebar. Also, content styles are stripped there, disimproving overall experience.
So please could you give me a hint on if that possible to implement such an editing like in page template, but within a reusable module?
all modules that are in the @hubspot-folder(root level of the design-tools) aren't editable. You have to options:
clone &modify them
create a custom module to fit your specific needs
In the cloned version (or custom module) you can set the default content. If you plan to re-use the same content multiple times you should think of a global custom module. The benefit is that the content will stay the same accross all module instances. So if you change it in one place, it will be updated automatically in every instance on every page this particular module is used.
Also a tipp: If you clone a module or create a custom module and don't want people to use the default "version" of a HS default module, you can hide/exclude them by editing the theme.json or template.html file and therefore create a better user experience
all modules that are in the @hubspot-folder(root level of the design-tools) aren't editable. You have to options:
clone &modify them
create a custom module to fit your specific needs
In the cloned version (or custom module) you can set the default content. If you plan to re-use the same content multiple times you should think of a global custom module. The benefit is that the content will stay the same accross all module instances. So if you change it in one place, it will be updated automatically in every instance on every page this particular module is used.
Also a tipp: If you clone a module or create a custom module and don't want people to use the default "version" of a HS default module, you can hide/exclude them by editing the theme.json or template.html file and therefore create a better user experience