Skip to content
Snippets Groups Projects
Commit 3ea34672 authored by Fabian Galinski's avatar Fabian Galinski :pouting_cat:
Browse files

[TASK] Integration of the plugins fullscreen and help. Also adapted the width

parent 7139165b
No related branches found
No related tags found
1 merge request!10Typo3v8compatibility
......@@ -299,36 +299,21 @@ class RichTextElement extends AbstractFormElement {
$backendUser = $this->getBackendUserAuthentication();
if ($this->isInFullScreenMode()) {
$width = '100%';
$height = '100%';
$paddingRight = '0px';
$editorWrapWidth = '100%';
} else {
$options = $backendUser->userTS['options.'];
$width = 610 + (isset($options['RTELargeWidthIncrement']) ? (int) $options['RTELargeWidthIncrement'] : 150);
/** @var InlineStackProcessor $inlineStackProcessor */
$inlineStackProcessor = GeneralUtility::makeInstance(InlineStackProcessor::class);
$inlineStackProcessor->initializeByGivenStructure($this->data['inlineStructure']);
$inlineStructureDepth = $inlineStackProcessor->getStructureDepth();
$width -= $inlineStructureDepth > 0 ? ($inlineStructureDepth + 1) * 12 : 0;
$widthOverride = isset($backendUser->uc['rteWidth']) && trim($backendUser->uc['rteWidth']) ?: trim($this->processedRteConfiguration['RTEWidthOverride']);
if ($widthOverride) {
if (strstr($widthOverride, '%')) {
if ($this->client['browser'] !== 'msie') {
$width = (int) $widthOverride > 0 ? (int) $widthOverride : '100%';
}
} else {
$width = (int) $widthOverride > 0 ? (int) $widthOverride : $width;
}
}
$width = strstr($width, '%') ? $width : $width . 'px';
$height = 380 + (isset($options['RTELargeHeightIncrement']) ? (int) $options['RTELargeHeightIncrement'] : 0);
$heightOverride = isset($backendUser->uc['rteHeight']) && (int) $backendUser->uc['rteHeight'] ?: (int) $this->processedRteConfiguration['RTEHeightOverride'];
$height = $heightOverride > 0 ? $heightOverride . 'px' : $height . 'px';
$paddingRight = '2';
$editorWrapWidth = '99%';
}
$rteDivStyle = 'position:relative; left:0px; top:0px; height:' . $height . '; width:' . $width . '; border: 1px solid black; padding: 2 ' . $paddingRight . ' 2 2;';
$rteDivStyle = 'position:relative; left:0px; top:0px; height:' . $height . '; width: 100%;' . '; border: 1px solid black; padding: 2 ' . $paddingRight . ' 2 2;';
$itemFormElementName = $this->data['parameterArray']['itemFormElName'];
......
......@@ -7,11 +7,11 @@ tinymce.init({
autoresize_max_height: 500,
plugins: [
'advlist autolink lists charmap hr anchor pagebreak searchreplace wordcount visualblocks visualchars code',
'nonbreaking save table directionality template paste colorpicker autoresize shy contextmenu'
'nonbreaking save table directionality template paste colorpicker autoresize shy contextmenu fullscreen help'
],
// Currently not in use typo3image
toolbar1: 'undo redo | styleselect | bold italic | typo3image typo3link unlink | ' +
'alignleft aligncenter alignright alignjustify | bullist numlist outdent indent',
'alignleft aligncenter alignright | bullist numlist outdent indent | fullscreen | help',
external_plugins: {
typo3filemanager: 'EXT:tinymce4_rte/Resources/Public/Plugins/Typo3FileManager/typo3filemanager.min.js',
shy: 'EXT:tinymce/Resources/Public/JavaScript/TinymcePlugins/shy/plugin.min.js'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment