<{% if __SELF__.fixture %}{{ __SELF__.fixture }}{% else %}div{% endif %}
    {% if __SELF__.fixture %}data-fixture data-ce-tag="p"{% else %}data-editable{% endif %}
    data-component="{{ __SELF__ }}::onSave"
    data-file="{{ __SELF__.file }}"
    data-tools="{{ __SELF__.tools }}"
    {% if __SELF__.class %}class="{{ __SELF__.class }}"{% endif %}>
    {{ __SELF__.content|raw }}
</{% if __SELF__.fixture %}{{ __SELF__.fixture }}{% else %}div{% endif %}>

{% if __SELF__.renderCount == 1 %}
    {% put scripts %}
    <script type="text/javascript">
    /* CONTENT EDITOR SCRIPT START */
    ContentTools.StylePalette.add([
        {% for style in __SELF__.palettes %}
            new ContentTools.Style('{{ style.name ? style.name : style.class }}', '{{ style.class }}', {{ style.allowed_tags|json_encode()|raw }}),
        {% endfor %}
    ]);
    editor.toolbox().tools([
                                [
                                {% for value in __SELF__.buttons %}
                                    '{{ value }}',
                                {% endfor %}
                                ],
                                [
                                    'undo',
                                    'redo',
                                    'remove'
                                ]
                            ]);
    /* CONTENT EDITOR SCRIPT END */
    </script>
    {% endput %}
    {% put styles  %}
        <link rel="stylesheet" href="/contenteditor/styles">
    {% endput %}
{% endif %}
