Skip to content

Commit 677ed2b

Browse files
committed
Update docs with CKEditor configuration
1 parent 76f7b71 commit 677ed2b

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

doc/installation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Since FOSCKEditorBundle 2.0, to make Twig render the WYSIWYG editor, you must ad
2929
twig:
3030
form_themes:
3131
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
32+
- '@BitBagSyliusCmsPlugin/Form/ckeditor_widget.html.twig'
3233
```
3334
3435
Import required config in your `config/packages/_sylius.yaml` file:

doc/wysiwyg.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

77
## General usage
88

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

1414
*In the WYSIWYG fields, you can use Twig function nesting. Read more [here](twig-functions-in-admin.md).*
15+
16+
## Configuration
17+
18+
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)
19+
20+
**Useful links:**
21+
- [CKEditor configuration](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html)
22+
- [CKEditor DTD configuration](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dtd.html)
23+
24+
25+
**Note:**
26+
27+
Remember to add your js configuration to `config/packages/twig.yaml` file:**
28+
```yaml
29+
# Symfony 2/3: app/config/config.yml
30+
# Symfony 4: config/packages/twig.yaml
31+
32+
twig:
33+
form_themes:
34+
- 'path to your configuration'
35+
```

0 commit comments

Comments
 (0)