<commit_before>Getting started with IvoryCKEditorBundle
========================================

.. toctree::
    :hidden:

    installation
    usage/index

Overview
--------

The bundle integrates `CKEditor`_ into `Symfony`_ via the `Form Component`_. It
automatically registers a new type called ``ckeditor`` which can be fully
configured. This type extends the `textarea`_ one, meaning all textarea options
are available.

Here, an example where we customize the `CKEditor config`_:

.. code-block:: php

    // Symfony 2.8 and previous versions
    $builder->add('field', 'ckeditor', array(
        'config' => array(
            'uiColor' => '#ffffff',
            //...
        ),
    ));

    // Symfony 3.0 and newer versions
    use Ivory\CKEditorBundle\Form\Type\CKEditorType;

    $builder->add('field', CKEditorType::class, array(
        'config' => array(
            'uiColor' => '#ffffff',
            //...
        ),
    ));

Installation
------------
<commit_msg>[Doc] Refine code block according to Symfony version<commit_after>Getting started with IvoryCKEditorBundle
========================================

.. toctree::
    :hidden:

    installation
    usage/index

Overview
--------

The bundle integrates `CKEditor`_ into `Symfony`_ via the `Form Component`_. It
automatically registers a new type called ``ckeditor`` which can be fully
configured. This type extends the `textarea`_ one, meaning all textarea options
are available.

Here, an example where we customize the `CKEditor config`_:

.. code-block:: php

    // Symfony 2.7 and previous versions
    $builder->add('field', 'ckeditor', array(
        'config' => array(
            'uiColor' => '#ffffff',
            //...
        ),
    ));

    // Symfony 2.8 and newer versions
    use Ivory\CKEditorBundle\Form\Type\CKEditorType;

    $builder->add('field', CKEditorType::class, array(
        'config' => array(
            'uiColor' => '#ffffff',
            //...
        ),
    ));

.. note::

    If you're using PHP < 5.5 and Symfony 2.8+, you must rely on
    ``Ivory\CKEditorBundle\Form\Type\CKEditorType`` instead of
    ``CKEditorType::class`` as this constant does not exist.

Installation
------------

{'fraction_non_alphanumeric': 0.16983695652173914, 'fraction_numerical': 0.005434782608695652, 'mean_word_length': 2.586038961038961, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 15, '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': '2450329', 'n_tokens_mistral': 647, 'n_tokens_neox': 608, 'n_words': 194}