The Toolbox Bundle allows you to override and specify the wysiwyg configuration. There are several reasons for that:
- Keep the editor simple, remove unwanted dangerous elements from the wysiwyg
- Define custom styles via configuration
- Use the same editor layout in every wysiwyg element (Document, Emails, Objects)
Important
Depending on the installed editor bundle, toolbox automatically enables the corresponding extension configuration!
Checkout the available toolbar buttons.
Tip
Info: This is the global configuration for the TinyMCE-Editor Toolbar. If you need to provide a different configuration in objects or areas, use the object/area configuration (see below)
Example
toolbox:
wysiwyg_editor:
config:
block_formats: 'Paragraph=p; Header 1=h1; Header 2=h2; Header 3=h3'
style_formats:
-
title : 'Example'
inline : 'span'
classes : 'example'
selector: 'a'
toolbar2: 'blocks | styles'
Important
If your extending style formats, you also have to extend the html sanitize otherwise you're applied data will be removed after persisting!
If you only need to modify the toolbar configuration for document areas, add this to your configuration:
Example
toolbox:
wysiwyg_editor:
area_editor:
config:
# his will change the toolbar2 only for document editables editors
toolbar2: 'blocks'
If you only need to modify the toolbar configuration for objects, add this to your configuration:
Note
The object configuration does not respect different toolbox context environments at the moment. Objects are not restricted to any sites by nature which makes any context-binding quite impossible.
Example
toolbox:
wysiwyg_editor:
object_editor:
config:
# this will change the toolbar2 only for object editors
toolbar2: 'blocks'
Toolbox provides some additional Editor Plugins
Add a link to allow user to disable Google Analytics tracking. There is also a frontend Javascript Plugin.
toolbox:
wysiwyg_editor:
config:
toolbar2: 'tb_goo_link_button'
Checkout the available toolbar buttons.
Tip
Info: This is the global configuration for the Quill-Editor Toolbar. If you need to provide a different configuration in objects or areas, use the object/area configuration (see below)
Caution
Because pimcore only uses a simple Object.assign()
method to merge the configuration,
you have to pass the full configuration (even if you only want to change the toolbar config)
Example
toolbox:
wysiwyg_editor:
config:
modules:
table: false
table-better:
language: 'en_US'
menus: [ 'column', 'row', 'merge', 'table', 'cell', 'wrap', 'delete' ]
toolbarTable: true
keyboard:
bindings: QuillTableBetter.keyboardBindings
history:
delay: 700
maxStack: 200
userOnly: true
toolbar:
container: [
[ { header: [ 1, 2, false ] } ],
[{ 'size': ['small', false, 'large', 'huge'] }], # custom dropdown
[ 'bold' ],
[ { align: [ ] } ],
[ { list: 'ordered' } ],
[ 'link', 'table-better' ],
[ 'clean' ],
]
Important
If your extending style formats (In this example the "size" dropdown), you also have to extend the html sanitize otherwise you're applied data will be removed after persisting!
If you only need to modify the toolbar configuration for document areas, add this to your configuration:
Example
toolbox:
wysiwyg_editor:
area_editor:
config:
# his will change the modules only for document editables editors
modules: [...]
If you only need to modify the toolbar configuration for objects, add this to your configuration:
Note
The object configuration does not respect different toolbox context environments at the moment. Objects are not restricted to any sites by nature which makes any context-binding quite impossible.
Example
toolbox:
wysiwyg_editor:
object_editor:
config:
# this will change the modules only for object editors
modules: 'blocks'
Currently no plugins available.