Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions Configuration/RTE/DeeplWritePreset.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# This file is only an example and should help to implement the DeepL write plugin to customized RTE configurations.
# The configuration below is only short-handed and not full ready usable.
editor:
config:
importModules:
- { module: '@web-vision/deepl-write/deeplwrite-plugin.js', exports: [ 'Deeplwrite' ] }
toolbar:
items:
- bold
- italic
- '|'
- clipboard
- undo
- redo
- '|'
- deeplwrite
37 changes: 37 additions & 0 deletions Configuration/RTE/Default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
editor:
config:
importModules:
- { module: '@web-vision/deepl-write/deeplwrite-plugin.js', exports: [ 'Deeplwrite' ] }
toolbar:
items:
- style
- heading
# grouping separator
- '|'
- bold
- italic
- subscript
- superscript
- softhyphen
- '|'
- bulletedList
- numberedList
- blockQuote
- alignment
- '|'
- findAndReplace
- link
- '|'
- removeFormat
- undo
- redo
- '|'
- insertTable
- '|'
- specialCharacters
- horizontalLine
- sourceEditing
- '|'
- deeplwrite
imports:
- { resource: 'EXT:rte_ckeditor/Configuration/RTE/Default.yaml' }
59 changes: 59 additions & 0 deletions Configuration/RTE/Full.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
imports:
- { resource: 'EXT:rte_ckeditor/Configuration/RTE/Full.yaml' }

editor:
config:
importModules:
- { module: '@web-vision/deepl-write/deeplwrite-plugin.js', exports: [ 'Deeplwrite' ] }
toolbar:
items:
- removeFormat
- undo
- redo
# grouping separator
- '|'
- findAndReplace
- link
- '|'
- insertTable
- tableColumn
- tableRow
- mergeTableCells
- TableProperties
- TableCellProperties
- '|'
- selectAll
- '|'
- sourceEditing
- showBlocks
- horizontalLine
# line break
- '-'
- bold
- italic
- underline
- strikethrough
- subscript
- superscript
- softhyphen
- '|'
- bulletedList
- numberedList
- blockQuote
- indent
- outdent
- alignment
- '|'
- specialCharacters
- '-'
- style
- heading
- fontFamily
- fontBackgroundColor
- fontColor
- fontSize
- textPartLanguage
- highlight
- highlight:greenMarker
- '|'
- deeplwrite
17 changes: 17 additions & 0 deletions Configuration/RTE/Minimal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
imports:
- { resource: 'EXT:rte_ckeditor/Configuration/RTE/Minimal.yaml' }

editor:
config:
importModules:
- { module: '@web-vision/deepl-write/deeplwrite-plugin.js', exports: [ 'Deeplwrite' ] }
toolbar:
items:
- bold
- italic
- '|'
- clipboard
- undo
- redo
- '|'
- deeplwrite
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5",
"saschaegerer/phpstan-typo3": "^1.9",
"typo3/cms-rte-ckeditor": "^12.4 || ^13.4",
"typo3/testing-framework": "^8.2.7"
},
"license": "GPL-2.0-or-later",
Expand Down Expand Up @@ -60,6 +61,7 @@
}
},
"suggest": {
"web-vision/deepltranslate-core": "*"
"web-vision/deepltranslate-core": "*",
"typo3/cms-rte-ckeditor": "Allows Additional RTE feature optimizing text"
}
}
1 change: 1 addition & 0 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
'install' => '*',
'enable_translated_content' => '*',
'deepltranslate_core' => '*',
'rte_ckeditor' => '12.4.0-13.4.99',
],
],
];
25 changes: 22 additions & 3 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,28 @@
(static function (): void {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['deeplWrite'] =
WriteHook::class;

$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['deeplwrite']
= 'EXT:deepl_write/Configuration/RTE/DeeplWritePreset.yaml';
// Register the presets
// override default presets from EXT:rte_ckeditor
// by using them as import and add `deeplwrite`
// respect overrides by other extensions beside EXT:rte_ckeditor
if (
empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'])
|| $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] === 'EXT:rte_ckeditor/Configuration/RTE/Default.yaml'
) {
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:deepl_write/Configuration/RTE/Default.yaml';
}
if (
empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['minimal'])
|| $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['minimal'] === 'EXT:rte_ckeditor/Configuration/RTE/Minimal.yaml'
) {
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['minimal'] = 'EXT:deepl_write/Configuration/RTE/Minimal.yaml';
}
if (
empty($GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['full'])
|| $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['full'] === 'EXT:rte_ckeditor/Configuration/RTE/Full.yaml'
) {
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['full'] = 'EXT:deepl_write/Configuration/RTE/Full.yaml';
}

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'][1750182029]
= PageRendererHook::class . '->renderPreProcess';
Expand Down