{% if globalStyleSets is defined and globalStyleSets is iterable %} {% for stylesSetName, stylesSetData in globalStyleSets %} if(CKEDITOR.stylesSet.get('{{ stylesSetName }}') === null) { CKEDITOR.stylesSet.add('{{ stylesSetName }}', {{ stylesSetData|json_encode|raw }}); } else { console.warn('toolbox: ckeditor style set "{{ stylesSetName }}" already has been set. did you forget to add the config? usage: pimcore_wysiwyg("text", {"customConfig":toolbox_get_ckeditor_config_path()})'); } {% endfor %} {% endif %} CKEDITOR.editorConfig = function( config ) { {% if config is iterable %} {% for configName, configData in config %} config.{{ configName }} = {{ configData|json_encode|raw }}; {% endfor %} {% endif %} };