templates/includes/partials/_wysiwyg.html.twig line 1

Open in your IDE?
  1. {#
  2. usage:
  3. {% include('includes/partials/_wysiwyg.html.twig' with {
  4.     'fieldName':'wysiwyg',
  5.     'defaultWysiwyg': "optioneel, wordt gebruikt in template en in admin als er geen tekst is gevuld.",
  6.     'defaultWysiwygInfo' : "optioneel, wordt gebruikt in admin als placeholde tekst, wordt niet gebruikt in template"}) %}
  7. #}
  8. {% set fieldName = fieldName ?? "wysiwyg" %}
  9. <div class="default-content-styling">
  10.     {% if editmode %}
  11.         {{ pimcore_wysiwyg(fieldName, { placeholder: (defaultWysiwygInfo ?? defaultWysiwyg ?? "") | raw } ) }}
  12.     {% else %}
  13.         {{ ( pimcore_wysiwyg(fieldName).frontend() ?: (defaultWysiwyg ?? "") ) | raw }}
  14.     {% endif %}
  15. </div>