Skip to content

Instantly share code, notes, and snippets.

@cepheiVV
Last active March 15, 2022 11:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cepheiVV/2ca1923c7b50db5e36e61b57c85673f0 to your computer and use it in GitHub Desktop.
Save cepheiVV/2ca1923c7b50db5e36e61b57c85673f0 to your computer and use it in GitHub Desktop.
Add RTL Text direction for e.g. Arabic language support in CKEditor for TYPO3
# 1
# ---------------------------------------------
#
# Add tsconfig to load the custom RTE config:
`RTE.default.preset = Custom`
# 2
# ---------------------------------------------
#
# Add the yaml config
# EXT:{template}/Configuration/RTE/Custom.yaml
#
# the essential part for the RTL direction:
#
# "bidi"
# editor.toolbarGroups
# { name: paragraph, groups: [list, indent, blocks, align, bidi] }
#
#
# editor.toolbarGroups.extraPlugins
# - bidi
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" }
editor:
config:
format_tags: "p;h1;h2;h3;h4;h5;pre"
toolbarGroups:
- { name: styles, groups: [styles, format] }
- { name: basicstyles, groups: [basicstyles] }
- { name: paragraph, groups: [list, indent, blocks, align, bidi] }
- { name: links, groups: [links] }
- { name: clipboard, groups: [clipboard, cleanup, undo] }
- { name: editing, groups: [spellchecker] }
- { name: insert, groups: [insert] }
- { name: tools, groups: [table, specialchar, insertcharacters] }
- { name: document, groups: [mode] }
justifyClasses:
- text-left
- text-center
- text-right
- text-justify
extraPlugins:
- justify
- bidi
removePlugins:
- image
removeButtons:
- Anchor
- Underline
- Strike
- Styles
# 3
# ---------------------------------------------
# Load the Custom config
# EXT:{template}/ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['Custom'] = 'EXT:{template}/Configuration/RTE/Custom.yaml';
# 4
# ---------------------------------------------
# Clear TYPO3 cache and reload the backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment