Hi @dobradovic,
thanks for the informations. I’ve did something similar a few days ago for my company and the most easiest way would be not to use a rich-text since it requires that the user has to apply the “modal-box-opener” in the source-code view in the rich-text. If you do this by yourself or a colleague who is familiar with html it’s ok. A better solution would be to implement a button or similar which will be always displayed at the same position(e.g after your rich-text). By doing so the user don’t need to know HTML and doesn’t require a manual how to “activate” the modal-box functionality.
It’s up to you 
Here’s my code(just a snippet from the whole module) for inspiration:
{# Modalbox activation begin #}
<a class="btn btn-secondary" data-toggle="modal" data-target="#{{ module.right_col.button_name|replace(' ','-')|replace('_','-') }}">{{ module.right_col.buttontext }}</a>
{# Modalbox activation end #}
...
{#Modalbox begin #}
<div class="modal fade" id="{{ module.right_col.button_name|replace(' ','-')|replace('_','-') }}" tabindex="-1" role="dialog" aria-labelledby="{{ module.right_col.button_name|replace(' ','-')|replace('_','-') }}" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
{# Modalbox content#}
</div>
</div>
</div>
</div>
{# Modalbox end #}
{% require_js %}
<script>
$('#{{ module.right_column.button_name|replace(' ','-')|replace('_','-') }}').modal();
</script>
{% end_require_js %}
I’m using:
- button name (regular text)
- buttontext(regular text)
If you’re using a repeater function(for-loops) you should add your modalbox function to the repeater group. The code could look something like this:
{% for item in tabs %}
{# Modalbox activation begin #}
<a class="btn btn-secondary" data-toggle="modal" data-target="#{{ item.right_col.button_name|replace(' ','-')|replace('_','-') }}">{{ item.right_col.buttontext }}</a>
{# Modalbox activation end #}
{% endfor %}
...
{% for item in tabs %}
{#Modalbox begin #}
<div class="modal fade" id="{{ item.right_col.button_name|replace(' ','-')|replace('_','-') }}" tabindex="-1" role="dialog" aria-labelledby="{{ item.right_col.button_name|replace(' ','-')|replace('_','-') }}" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
{# Modalbox content#}
</div>
</div>
</div>
</div>
{# Modalbox end #}
{% for item in tabs %}
{% require_js %}
<script>
$('#{{ item.right_column.button_name|replace(' ','-')|replace('_','-') }}').modal();
</script>
{% end_require_js %}
{% for item in tabs %}
note: You don’t need multiple for loops at each part if you put everything inside one col. But I recomend to split it so that the modal box and the JS are at the very bottom of your HTML+Hubl section - this will make debugging easier.
Also: note that my code shows “module.right_col.XY” this is because I’ve grouped everything in my module into several columns and called them accoringly. This is optional but it will make the creation of new content easier since it’s structured.
best,
Anton