Skip to content

Commit

Permalink
Rewrite doc using RestructuredText
Browse files Browse the repository at this point in the history
  • Loading branch information
GeLoLabs committed Feb 21, 2016
1 parent f6db629 commit 1346916
Show file tree
Hide file tree
Showing 25 changed files with 734 additions and 610 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:

install:
- composer self-update
- if [[ "$TRAVIS_PHP_VERSION" == "5.3.3" ]]; then composer config disable-tls true; fi
- composer require --no-update symfony/framework-bundle:${SYMFONY_VERSION}
- composer require --no-update symfony/form:${SYMFONY_VERSION}
- composer require --dev --no-update symfony/phpunit-bridge:${SYMFONY_PHPUNIT_BRIDGE_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011-2015 Eric GELOEN
Copyright (c) 2011-2016 Eric GELOEN

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@
[![License](https://poser.pugx.org/egeloen/ckeditor-bundle/license.svg)](https://packagist.org/packages/egeloen/ckeditor-bundle)

The bundle provides a [CKEditor](http://ckeditor.com/) integration for your Symfony2 Project. It automatically registers
the new `ckeditor` form type which can be easily configured.
the new `ckeditor` form type which can be easily as well as highly configured.

## Documentation

1. [Installation](/Resources/doc/installation.md)
2. [Usage](/Resources/doc/usage.md)
3. [Configuration](/Resources/doc/configuration.md) (Optional)
4. [File Browse/Upload](/Resources/doc/file_browse_upload.md) (Optional)
Please, read the [official documentation](/Resources/doc/index.rst).

## Testing

Expand Down
115 changes: 0 additions & 115 deletions Resources/doc/configuration.md

This file was deleted.

123 changes: 0 additions & 123 deletions Resources/doc/file_browse_upload.md

This file was deleted.

51 changes: 51 additions & 0 deletions Resources/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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 easily as well as highly 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
$builder->add('field', 'ckeditor', array(
'config' => array(
'uiColor' => '#ffffff',
//...
),
));
.. note::

As of Symfony 2.8, the second argument of ``$builder->add()`` accepts the fully qualified class name of the
form type and it becomes mandatory to use it in Symfony 3.0. Depending on your Symfony versions, you should replace
the ``ckeditor`` parameter by ``Ivory\CKEditorBundle\Form\Type\CKEditorType`` or by ``CKEditorType::class`` if your
project relies on PHP 5.5+.

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

To install the bundle, please, read the :doc:`Installation documentation<installation>`.

Usage
-----

If you want to learn more, this documentation covers the following use cases:

.. include:: usage/index.rst.inc

.. _`CKEditor`: http://ckeditor.com/
.. _`Symfony`: http://symfony.com/
.. _`Form Component`: http://symfony.com/doc/current/book/forms.html
.. _`textarea`: http://symfony.com/doc/current/reference/forms/types/textarea.html
.. _`CKEditor config`: http://docs.ckeditor.com/#!/api/CKEDITOR.config
27 changes: 0 additions & 27 deletions Resources/doc/installation.md

This file was deleted.

40 changes: 40 additions & 0 deletions Resources/doc/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Installation
============

Download the Bundle
-------------------

Require the bundle in your ``composer.json`` file:

.. code-block:: bash
$ composer require egeloen/ckeditor-bundle
Register the Bundle
-------------------

Then, update your ``app/AppKernel.php``:

.. code-block:: php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
// ...
);
// ...
}
}
Install the Assets
------------------

Once, you have registered the bundle, you need to install the assets in the web directory:

.. code-block:: bash
$ php app/console assets:install web

0 comments on commit 1346916

Please sign in to comment.