-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme for ckeditor. split config files
- Loading branch information
Showing
10 changed files
with
220 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# CK-Editor Configuration | ||
|
||
The Toolbox Bundle allows you to override and specifiy the ckeditor configuration. | ||
There are several reasons for that: | ||
|
||
- Keep the editor simple, remove unwanted dangerous elements from the ckeditor | ||
- Define custom styles via configuration | ||
- Use the same CK-Editor Layout in every wysiwyg element (Document, Emails, Objects) | ||
|
||
## CK Editor Toolbar | ||
The Toolbox Bundle already removes some (mostly dangerous) elements. Feel free to modify them according to your needs. | ||
You may use the [online toolbar configurator](https://ckeditor.com/tmp/4.5.0-beta/ckeditor/samples/toolbarconfigurator/index.html#advanced) to do that. | ||
|
||
> Info: This is the global configuration for the CK-Editor Toolbar. | ||
> If you need to provide a different configuration in objects or areas, use the object/area configuration (see below) | ||
> Info: It's possible to modify all the [CK-Editor Configuration](https://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-stylesSet) | ||
### Overriding Configuration | ||
The config node is a variableNode, so the values **doesn't get merged** with the default ones. | ||
If your going to define the `toolbox -> ckeditor -> config` node, you must provide the complete configuration. | ||
|
||
**Example** | ||
```yaml | ||
toolbox: | ||
ckeditor: | ||
# with that node all the default values from toolbox configuration are overwritten now! | ||
config: | ||
uiColor: yellow # change the ui color of the editor for example | ||
toolbar: | ||
- name: basicstyles | ||
items: | ||
- Bold | ||
- "-" | ||
- RemoveFormat | ||
- name: clipboard | ||
items: | ||
- Cut | ||
- Copy | ||
- Redo | ||
- name: editing | ||
items: | ||
- Replace | ||
- "-" | ||
- SelectAll | ||
- "/" | ||
``` | ||
### Area CK-Editor Configuration | ||
If you need to modify the toolbar configuration just for document areas, add this to your configuration: | ||
**Example** | ||
```yaml | ||
toolbox: | ||
ckeditor: | ||
area_editor: | ||
config: | ||
# this will merge the iframe element into the global toolbar configuration, if set | ||
toolbar: | ||
- name: insert | ||
items: | ||
- Iframe | ||
``` | ||
### Object CK-Editor Configuration | ||
If you need to modify the toolbar configuration just for objects, add this to your configuration: | ||
**Example** | ||
```yaml | ||
toolbox: | ||
ckeditor: | ||
object_editor: | ||
config: | ||
# this will merge the iframe element into the global toolbar configuration, if set | ||
toolbar: | ||
- name: insert | ||
items: | ||
- Iframe | ||
stylesSet: specialStyleSetForObjects # see global style sets configuration below | ||
uiColor: green | ||
|
||
``` | ||
|
||
## CK Editor Global Style Sets | ||
Define your custom styles here. | ||
|
||
**Example** | ||
```yaml | ||
toolbox: | ||
ckeditor: | ||
global_style_sets: | ||
default: | ||
- | ||
name: 'Dark Grey' | ||
element: [h1,h2,h3,h4,h5] | ||
attributes: | ||
class: 'grey-1' | ||
- | ||
name: 'Lead' | ||
element: p | ||
attributes: | ||
class: 'lead' | ||
specialStyleSetForObjects: | ||
name: 'Secret Color' | ||
element: p | ||
attributes: | ||
class: 'secret-color' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/ToolboxBundle/Resources/config/pimcore/area_restrictions.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
toolbox: | ||
disallowed_subareas: | ||
accordion: | ||
disallowed: | ||
- accordion | ||
- container | ||
- slideColumns | ||
- parallaxContainer | ||
columns: | ||
disallowed: | ||
- container | ||
- parallaxContainer | ||
slideColumns: | ||
disallowed: | ||
- slideColumns | ||
- accordion | ||
- container | ||
- parallaxContainer | ||
- columns | ||
- anchor | ||
container: | ||
disallowed: | ||
- container | ||
- parallaxContainer | ||
parallaxContainer: | ||
disallowed: | ||
- container | ||
- parallaxContainer | ||
image: | ||
disallowed: | ||
- parallaxContainer | ||
snippet: | ||
disallowed: | ||
- parallaxContainer | ||
|
||
disallowed_content_snippet_areas: | ||
- parallaxContainer | ||
- teaser | ||
- container | ||
- snippet |
5 changes: 0 additions & 5 deletions
5
...ources/config/pimcore/ckeditor/config.yml → ...config/pimcore/ckeditor/config_global.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,9 @@ | ||
imports: | ||
- { resource: areas/*.yml } | ||
- { resource: ckeditor/*.yml } | ||
- { resource: theme.yml } | ||
- { resource: area_restrictions.yml } | ||
- { resource: data_attributes.yml } | ||
- { resource: ckeditor/config.yml } | ||
- { resource: document/editables.yml } | ||
|
||
toolbox: | ||
image_thumbnails: | ||
gallery_element: 'galleryImage' | ||
gallery_lightbox: 'contentImage' | ||
gallery_thumbnail: 'galleryThumb' | ||
image_element: 'contentImage' | ||
image_lightbox: 'lightBoxImage' | ||
video_poster: 'videoPoster' | ||
video_thumbnail: 'content' | ||
teaser_element: 'standardTeaser' | ||
teaser_lightbox: 'lightBoxImage' | ||
parallax_background: 'parallaxBackground' | ||
parallax_section_background: 'parallaxSectionBackground' | ||
parallax_container_element: 'parallaxImage' | ||
download_preview_thumbnail: 'downloadPreviewImage' | ||
|
||
disallowed_subareas: | ||
accordion: | ||
disallowed: | ||
- accordion | ||
- container | ||
- slideColumns | ||
- parallaxContainer | ||
columns: | ||
disallowed: | ||
- container | ||
- parallaxContainer | ||
slideColumns: | ||
disallowed: | ||
- slideColumns | ||
- accordion | ||
- container | ||
- parallaxContainer | ||
- columns | ||
- anchor | ||
container: | ||
disallowed: | ||
- container | ||
- parallaxContainer | ||
parallaxContainer: | ||
disallowed: | ||
- container | ||
- parallaxContainer | ||
image: | ||
disallowed: | ||
- parallaxContainer | ||
snippet: | ||
disallowed: | ||
- parallaxContainer | ||
|
||
disallowed_content_snippet_areas: | ||
- parallaxContainer | ||
- teaser | ||
- container | ||
- snippet | ||
|
||
area_block_configuration: | ||
toolbar: | ||
title: Inhaltsbausteine | ||
width: 200 | ||
x: 10 | ||
y: 125 | ||
buttonWidth: 200 | ||
groups: ~ | ||
- { resource: image_thumbnails.yml } | ||
- { resource: toolbar.yml } | ||
- { resource: document/editables.yml } |
15 changes: 15 additions & 0 deletions
15
src/ToolboxBundle/Resources/config/pimcore/image_thumbnails.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
toolbox: | ||
image_thumbnails: | ||
gallery_element: 'galleryImage' | ||
gallery_lightbox: 'contentImage' | ||
gallery_thumbnail: 'galleryThumb' | ||
image_element: 'contentImage' | ||
image_lightbox: 'lightBoxImage' | ||
video_poster: 'videoPoster' | ||
video_thumbnail: 'content' | ||
teaser_element: 'standardTeaser' | ||
teaser_lightbox: 'lightBoxImage' | ||
parallax_background: 'parallaxBackground' | ||
parallax_section_background: 'parallaxSectionBackground' | ||
parallax_container_element: 'parallaxImage' | ||
download_preview_thumbnail: 'downloadPreviewImage' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
toolbox: | ||
area_block_configuration: | ||
toolbar: | ||
title: Inhaltsbausteine | ||
width: 200 | ||
x: 10 | ||
y: 125 | ||
buttonWidth: 200 | ||
groups: ~ |