Skip to content

Commit

Permalink
Render trix-editor only for summernote classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayvented committed Dec 14, 2023
1 parent 9da0fac commit 6605f2b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions templates/Form/tailwind_3_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
{%- endblock checkbox_row -%}

{% block textarea_widget %}
<div class="trix-wrapper">
<trix-editor input="{{ id }}"></trix-editor>
</div>
<div class="hidden">{{ form_widget(form) }}</div>
{% if form.vars.attr.class is defined and 'summernote' in form.vars.attr.class %}
<div class="trix-wrapper">
<trix-editor input="{{ id }}"></trix-editor>
</div>
<div class="hidden">{{ form_widget(form) }}</div>
{% else %}
{{ form_widget(form) }}
{% endif %}
{% endblock %}

{% block form_label -%}
Expand Down

0 comments on commit 6605f2b

Please sign in to comment.