<commit_before><script type="text/javascript" src="{{ CKEDITOR_JS_URL }}"></script>

<style type="text/css">
    span.cke_skin_kama { border: none !important; }
    div[id*='cke_id_'] { margin-left: 107px; }
</style>

<script type="text/javascript">
		{% block config %}
    CKEDITOR.config.width = '787';
    CKEDITOR.config.height= '300';
    CKEDITOR.config.toolbar = [
			{% block toolbar %}['Maximize','-','Format','-','Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','NumberedList','BulletedList','-','Anchor', 'Link','Unlink','-','Source']{% endblock %}
    ];
		{% endblock %}

    (function($){
        contentblock_init_handlers.push(function(){
            $('.order-machine textarea.item-richtext, #frontend_editor textarea.item-richtext').each(function(){
                feincms_richtext_add_ckeditor(this);
            });

            contentblock_move_handlers.poorify.push(function(item) {
                item.find('textarea.item-richtext').each(feincms_richtext_remove_ckeditor);
            });
            contentblock_move_handlers.richify.push(function(item) {
                item.find('textarea.item-richtext').each(feincms_richtext_add_ckeditor);
            });
        });
    })(feincms.jQuery);

    function feincms_richtext_remove_ckeditor(field) {
        var id = field ? field.id : this.id;
        if (id in CKEDITOR.instances) {
            CKEDITOR.instances[id].destroy();
        }
    }

    function feincms_richtext_add_ckeditor(field) {
        var id = field ? field.id : this.id;
        if (!(id in CKEDITOR.instances)) {
            CKEDITOR.replace(id);<commit_msg>When adding the format_tags option ordering is crucial. Add commented example to simplify configuration<commit_after><script type="text/javascript" src="{{ CKEDITOR_JS_URL }}"></script>

<style type="text/css">
    span.cke_skin_kama { border: none !important; }
    div[id*='cke_id_'] { margin-left: 107px; }
</style>

<script type="text/javascript">
		{% block config %}
    CKEDITOR.config.width = '787';
    CKEDITOR.config.height= '300';
    // CKEDITOR.config.format_tags = 'p;h1;h2;h3;h4;pre';
    CKEDITOR.config.toolbar = [
			{% block toolbar %}['Maximize','-','Format','-','Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','NumberedList','BulletedList','-','Anchor', 'Link','Unlink','-','Source']{% endblock %}
    ];
		{% endblock %}

    (function($){
        contentblock_init_handlers.push(function(){
            $('.order-machine textarea.item-richtext, #frontend_editor textarea.item-richtext').each(function(){
                feincms_richtext_add_ckeditor(this);
            });

            contentblock_move_handlers.poorify.push(function(item) {
                item.find('textarea.item-richtext').each(feincms_richtext_remove_ckeditor);
            });
            contentblock_move_handlers.richify.push(function(item) {
                item.find('textarea.item-richtext').each(feincms_richtext_add_ckeditor);
            });
        });
    })(feincms.jQuery);

    function feincms_richtext_remove_ckeditor(field) {
        var id = field ? field.id : this.id;
        if (id in CKEDITOR.instances) {
            CKEDITOR.instances[id].destroy();
        }
    }

    function feincms_richtext_add_ckeditor(field) {
        var id = field ? field.id : this.id;
        if (!(id in CKEDITOR.instances)) {
            CKEDITOR.replace(id);
{'fraction_non_alphanumeric': 0.16598480420806547, 'fraction_numerical': 0.006428988895382817, 'mean_word_length': 3.1092436974789917, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7318766', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1080, 'n_words': 146}