In your own extension:
Add in ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['[your_ext_key]'] = 'EXT:[your_ext_key]/Configuration/Yaml/rte_ckeditor/Custom.yaml';
In this folder add a file: Custom.yaml
We have the following configuration in the Custom.yaml:
# Load default processing options
imports:
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" }
# Add configuration for the editor
# For complete documentation see http://docs.ckeditor.com/#!/api/CKEDITOR.config
editor:
config:
# enable spellchecker
defaultContentLanguage: "de"
defaultLanguage: "de"
contentsLanguage: "de"
language: "de"
scayt_autoStartup: true
scayt_sLang: "de_DE"
wsc_lang: "de_DE"
# can be "default", but a custom stylesSet can be defined here, which fits TYPO3 best.
contentsCss: "EXT:[your_ext_key]/Resources/Public/Css/Extensions/rte_ckeditor/ckeditor.min.css"
height: "500px"
resize_enabled: true
uiColor: "#EEEEEE"
#toolbarCanCollapse: true
# Samples for configuration
stylesSet:
# block level styles
#- { name: "Beispiel H2", element: "h2", styles: { color: "orange", background: "blue" } }
- { name: "Button (primary)", element: "a", attributes: { class: "btn btn-primary" } }
- { name: "Link mit Pfeil", element: "a", attributes: { class: "linkpfeil" } }
- { name: "PDF-Download", element: "a", attributes: { class: "download-pdf" } }
# Inline styles
#- { name: "Icon: Telefon", element: "span", styles: { color: "telefon" } }
format_tags: "p;h1;h2;h3;h4;h5;pre"
toolbarGroups:
- { name: document, groups: [ mode ] }
- { name: clipboard, groups: [ clipboard, undo ] }
- { name: editing, groups: [ spellchecker ] }
- { name: insert }
- { name: tools }
- { name: others }
- "/"
- { name: styles }
- { name: basicstyles, groups: [ basicstyles, align, cleanup ] }
- { name: paragraph, groups: [ list, indent, align, blocks ] }
- { name: links }
justifyClasses:
- align-left
- align-center
- align-right
- align-justify
extraPlugins:
- justify
removePlugins:
- image
removeButtons:
- Anchor
- Underline
- JustifyBlock
- Table
# Allow s and u tag
processing:
allowTags:
- s
In the file:
Configuration/TSConfig/Page/RTE.tsconfig
RTE.default.preset = [your_ext_key]