Skip to content

Commit

Permalink
Update docs with CKEditor configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
em411 committed Aug 18, 2021
1 parent 76f7b71 commit 677ed2b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Since FOSCKEditorBundle 2.0, to make Twig render the WYSIWYG editor, you must ad
twig:
form_themes:
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
- '@BitBagSyliusCmsPlugin/Form/ckeditor_widget.html.twig'
```
Import required config in your `config/packages/_sylius.yaml` file:
Expand Down
23 changes: 22 additions & 1 deletion doc/wysiwyg.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This plugin comes with a default [FOSCKEditorBundle](https://github.com/FriendsOfSymfony/FOSCKEditorBundle) integration.
It has also been customized to use image upload feature. Every time you upload an image in the CKEditor, a new image media
is being created.
is being created.

## General usage

Expand All @@ -12,3 +12,24 @@ Take [the BlockTranslationType](../src/Form/Type/Translation/BlockTranslationTyp
**Note:**

*In the WYSIWYG fields, you can use Twig function nesting. Read more [here](twig-functions-in-admin.md).*

## Configuration

If you want to customize any behavior of the CKEditor, you have to override one of these files: [CKEditor config](../src/Resources/config/fos_ck_editor/fos_ck_editor.yml) or [CKEditor js config](../src/Resources/views/Form/ckeditor_widget.html.twig)

**Useful links:**
- [CKEditor configuration](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html)
- [CKEditor DTD configuration](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dtd.html)


**Note:**

Remember to add your js configuration to `config/packages/twig.yaml` file:**
```yaml
# Symfony 2/3: app/config/config.yml
# Symfony 4: config/packages/twig.yaml

twig:
form_themes:
- 'path to your configuration'
```

0 comments on commit 677ed2b

Please sign in to comment.