Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

done readme changes for cakephp-3 #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 14 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,14 @@
The purpose of placing [Froala WYSIWYG Editor](https://www.froala.com/wysiwyg-editor) in a plugin is to keep it separate from a themed view, the regular webroot or the app in general, which makes it easier to update and overall follows the idea of keeping the code clean and modular.

## Installation
To use Froala WYSIWYG Editor you need to clone git repository:
To use Froala WYSIWYG Editor you need to

git clone git://github.com/froala/wysiwyg-cake.git Plugin/Froala
Open terminal/command prompt (windows)
type

composer require froala/wysiwyg-cake

Or if your CakePHP application is setup as a git repository, you can add it as a submodule:

git submodule add git://github.com/froala/wysiwyg-cake.git Plugin/Froala

Or
open terminal/command prompt (windows)
type composer require froala/wysiwyg-cake

Alternatively, you can download an archive from the [master branch on Github](https://github.com/froala/wysiwyg-cake/archive/master.zip) and extract the contents to `Froala plugin`.
Alternatively, you can download an archive from the [master branch on Github](https://github.com/froala/wysiwyg-cake/archive/master.zip) and extract the contents to `vendor/Froala/wysiwyg-cake`.

Make sure that you load the plugin routes by adding to your bootstrap file(bootstrap.php) in config folder:

Expand Down Expand Up @@ -68,19 +63,19 @@ class AppController extends Controller
```
In the view page (template)
add
```
<div id="froala-editor" class="row">
</div>
```
```php
<?= $this->Froala->plugin() ?>
<?= $this->Froala->editor('#froala-editor'');?>
```

This is a simple init example with no options for the Froala Editor.
Include the below statement in your view template to integrate the plugins in your editor

```php
$this->Froala->plugin();
$this->Froala->editor('selector');
Open `Application.php` and add:
```
$this->addPlugin('Froala');
```

This will instruct Froala to convert the matched element on the page to Froala editor.

A complete list of [Froala configuration options](https://www.froala.com/wysiwyg-editor/docs/options) are on the website.

Expand Down