* Added feature #8349: htmlArea RTE: Clean paste feature with three options
* Fixed bug #16327: JS error after feature #16257: Rewrite stylesheets parsing functions (Thanks to Andreas Kiessling)
+ * Added feature #16344: htmlArea RTE: New options to configure RTE size/resize
2010-11-09 Jeff Segars <jeff@webempoweredchurch.org>
2010-11-10 Stanislas Rolland <typo3@sjbr.ca>
* Added feature #8349: htmlArea RTE: Clean paste feature with three options
- * Fixed bug #16327: JS error after feature #16257: Rewrite stylesheets parsing functions (Thanks to Andreas Kiessling ).
+ * Fixed bug #16327: JS error after feature #16257: Rewrite stylesheets parsing functions (Thanks to Andreas Kiessling)
+ * Added feature #16344: htmlArea RTE: New options to configure RTE size/resize
2010-11-08 Stanislas Rolland <typo3@sjbr.ca>
$RTEHeight = isset($BE_USER->userTS['options.']['RTESmallHeight']) ? $BE_USER->userTS['options.']['RTESmallHeight'] : '380';
$RTEWidth = $RTEWidth + ($this->TCEform->docLarge ? (isset($BE_USER->userTS['options.']['RTELargeWidthIncrement']) ? $BE_USER->userTS['options.']['RTELargeWidthIncrement'] : '150') : 0);
$RTEWidth -= ($inline->getStructureDepth() > 0 ? ($inline->getStructureDepth()+1)*$inline->getLevelMargin() : 0);
- if (isset($this->thisConfig['RTEWidthOverride'])) {
- if (strstr($this->thisConfig['RTEWidthOverride'], '%')) {
+ $RTEWidthOverride = (is_object($GLOBALS['BE_USER']) && isset($GLOBALS['BE_USER']->uc['rteWidth']) && trim($GLOBALS['BE_USER']->uc['rteWidth'])) ? trim($GLOBALS['BE_USER']->uc['rteWidth']) : trim($this->thisConfig['RTEWidthOverride']);
+ if ($RTEWidthOverride) {
+ if (strstr($RTEWidthOverride, '%')) {
if ($this->client['browser'] != 'msie') {
- $RTEWidth = (intval($this->thisConfig['RTEWidthOverride']) > 0) ? $this->thisConfig['RTEWidthOverride'] : '100%';
+ $RTEWidth = (intval($RTEWidthOverride) > 0) ? $RTEWidthOverride : '100%';
}
} else {
- $RTEWidth = (intval($this->thisConfig['RTEWidthOverride']) > 0) ? intval($this->thisConfig['RTEWidthOverride']) : $RTEWidth;
+ $RTEWidth = (intval($RTEWidthOverride) > 0) ? intval($RTEWidthOverride) : $RTEWidth;
}
}
$RTEWidth = strstr($RTEWidth, '%') ? $RTEWidth : $RTEWidth . 'px';
$RTEHeight = $RTEHeight + ($this->TCEform->docLarge ? (isset($BE_USER->userTS['options.']['RTELargeHeightIncrement']) ? $BE_USER->userTS['options.']['RTELargeHeightIncrement'] : 0) : 0);
- $RTEHeightOverride = intval($this->thisConfig['RTEHeightOverride']);
+ $RTEHeightOverride = (is_object($GLOBALS['BE_USER']) && isset($GLOBALS['BE_USER']->uc['rteHeight']) && intval($GLOBALS['BE_USER']->uc['rteHeight'])) ? intval($GLOBALS['BE_USER']->uc['rteHeight']) : intval($this->thisConfig['RTEHeightOverride']);
$RTEHeight = ($RTEHeightOverride > 0) ? $RTEHeightOverride : $RTEHeight;
$editorWrapWidth = '99%';
$editorWrapHeight = '100%';
RTEarea[editornumber].deleted = false;
RTEarea[editornumber].textAreaId = "' . $textAreaId . '";
RTEarea[editornumber].id = "RTEarea" + editornumber;
- RTEarea[editornumber].RTEWidthOverride = "' . trim($this->thisConfig['RTEWidthOverride']) . '";
- RTEarea[editornumber].RTEHeightOverride = "' . trim($this->thisConfig['RTEHeightOverride']) . '";
+ RTEarea[editornumber].RTEWidthOverride = "' . ((is_object($GLOBALS['BE_USER']) && isset($GLOBALS['BE_USER']->uc['rteWidth']) && trim($GLOBALS['BE_USER']->uc['rteWidth'])) ? trim($GLOBALS['BE_USER']->uc['rteWidth']) : trim($this->thisConfig['RTEWidthOverride'])) . '";
+ RTEarea[editornumber].RTEHeightOverride = "' . ((is_object($GLOBALS['BE_USER']) && isset($GLOBALS['BE_USER']->uc['rteHeight']) && intval($GLOBALS['BE_USER']->uc['rteHeight'])) ? intval($GLOBALS['BE_USER']->uc['rteHeight']) : intval($this->thisConfig['RTEHeightOverride'])) . '";
+ RTEarea[editornumber].resizable = ' . ((is_object($GLOBALS['BE_USER']) && isset($GLOBALS['BE_USER']->uc['rteResize']) && $GLOBALS['BE_USER']->uc['rteResize']) ? 'true' : (trim($this->thisConfig['rteResize']) ? 'true' : 'false')) . ';
+ RTEarea[editornumber].maxHeight = "' . ((is_object($GLOBALS['BE_USER']) && isset($GLOBALS['BE_USER']->uc['rteMaxHeight']) && intval($GLOBALS['BE_USER']->uc['rteMaxHeight'])) ? trim($GLOBALS['BE_USER']->uc['rteMaxHeight']) : (intval($this->thisConfig['rteMaxHeight']) ? intval($this->thisConfig['rteMaxHeight']) : '2000')) . '";
RTEarea[editornumber].fullScreen = ' . ($this->fullScreen ? 'true' : 'false') . ';
RTEarea[editornumber].showStatusBar = ' . (trim($this->thisConfig['showStatusBar'])?'true':'false') . ';
RTEarea[editornumber].enableWordClean = ' . (trim($this->thisConfig['enableWordClean'])?'true':'false') . ';
t3lib_extMgm::allowTableOnStandardPages('tx_rtehtmlarea_acronym');
// Add contextual help files
+ t3lib_extMgm::addLLrefForTCAdescr('xEXT_' . $_EXTKEY . '_General', 'EXT:' . $_EXTKEY . '/locallang_csh.xml');
foreach ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins'] as $pluginName => $config) {
if ($config['contextHelpFile']) {
t3lib_extMgm::addLLrefForTCAdescr('xEXT_' . $_EXTKEY . '_' . $pluginName, $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins'][$pluginName]['contextHelpFile']);
$GLOBALS['TYPO3_USER_SETTINGS']['columns'] = array_merge(
$GLOBALS['TYPO3_USER_SETTINGS']['columns'],
array(
+ 'rteWidth' => array(
+ 'type' => 'text',
+ 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteWidth',
+ 'csh' => 'xEXT_rtehtmlarea_General:rteWidth',
+ ),
+ 'rteHeight' => array(
+ 'type' => 'text',
+ 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteHeight',
+ 'csh' => 'xEXT_rtehtmlarea_General:rteHeight',
+ ),
+ 'rteResize' => array(
+ 'type' => 'check',
+ 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteResize',
+ 'csh' => 'xEXT_rtehtmlarea_General:rteResize',
+ ),
+ 'rteMaxHeight' => array(
+ 'type' => 'text',
+ 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteMaxHeight',
+ 'csh' => 'xEXT_rtehtmlarea_General:rteMaxHeight',
+ ),
'rteCleanPasteBehaviour' => array(
'type' => 'select',
'label' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xml:rteCleanPasteBehaviour',
),
)
);
- $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] .= ',--div--;LLL:EXT:rtehtmlarea/locallang.xml:rteSettings,rteResize,rteMaxHeight,rteCleanPasteBehaviour';
+ $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] .= ',--div--;LLL:EXT:rtehtmlarea/locallang.xml:rteSettings,rteWidth,rteHeight,rteResize,rteMaxHeight,rteCleanPasteBehaviour';
}
?>
\ No newline at end of file
this.documentType = '<!DOCTYPE html\r'
+ ' PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r'
+ ' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r';
- this.resizable = TYPO3.settings.textareaResize;
- this.maxHeight = TYPO3.settings.textareaMaxHeight;
// Hold the configuration of buttons and hot keys registered by plugins
this.buttonsConfig = {};
this.hotKeyList = {};
<label index="No font">No font</label>
<label index="No size">No font size</label>
<label index="rteSettings">Rich Text Editor</label>
+ <label index="rteWidth">Width of the RTE in pixels or percentage</label>
+ <label index="rteHeight">Height of the RTE in pixels</label>
<label index="rteResize">Make RTE resizable</label>
<label index="rteMaxHeight">Maximal height of resizable RTE in pixels</label>
</languageKey>
--- /dev/null
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+ <meta type="array">
+ <description>CSH for htmlArea RTE</description>
+ <type>CSH</type>
+ <csh_table>xEXT_rtehtmlarea_General</csh_table>
+ </meta>
+ <data type="array">
+ <languageKey index="default" type="array">
+ <label index=".alttitle">htmlArea RTE</label>
+ <label index=".description">htmlArea RTE is a free, open-source, ExtJS-based editor for <textarea> fields featuring tight integration with TYPO3.</label>
+ <label index=".details">htmlArea RTE supports the following browsers: Firefox 1.5+, SeaMonkey 1.0+, Safari 3.0.4+, Google Chrome 1.0+ and Opera 9.62+ on any platform, and Internet Explorer 6.0+ on Windows.</label>
+ <label index=".seeAlso">xEXT_rtehtmlarea_General:beUserSettings,xEXT_rtehtmlarea_PlainText,xEXT_rtehtmlarea_RemoveFormat</label>
+ <label index="beUserSettings.alttitle">BE User settings</label>
+ <label index="beUserSettings.description">BE User settings let you specify some options of the RTE.</label>
+ <label index="beUserSettings.seeAlso">xEXT_rtehtmlarea_General:rteWidth,xEXT_rtehtmlarea_General:rteHeight,xEXT_rtehtmlarea_General:rteResize,xEXT_rtehtmlarea_General:rteMaxHeight,xEXT_rtehtmlarea_PlainText:behaviour,_MOD_user_setup</label>
+ <label index="rteWidth.alttitle">Default width of the RTE in px or %</label>
+ <label index="rteWidth.description">This option lets you specify the initial width of the RTE.</label>
+ <label index="rteWidth.details">The option specifies the width of the RTE when it is initially displayed. The width may be specified as a fixed number of pixels or as a percentage.</label>
+ <label index="rteHeight.alttitle">Default height of the RTE in px</label>
+ <label index="rteHeight.description">This option lets you specify the initial height of the RTE.</label>
+ <label index="rteHeight.details">The option specifies the height of the RTE when it is initially displayed. The height of the RTE must be specified as a fixed number of pixels not as a percentage.
+The value you set should allow sufficient height for the tool bar, the editing area and the status bar of the RTE.</label>
+ <label index="rteResize.alttitle">Make RTE resizable</label>
+ <label index="rteResize.description">This option will make RTE-enabled fields resizable. A resize handle will appear at the bottom right corner of the RTE.</label>
+ <label index="rteMaxHeight.alttitle">Maximal height of resizable RTE in pixels</label>
+ <label index="rteMaxHeight.description">The value you set should allow sufficient height for the tool bar, the editing area and the status bar of the RTE. Default value is 2000.</label>
+ </languageKey>
+ </data>
+</T3locallang>
$this->TCEform->additionalJS_pre['rtehtmlarea-loadJScode'] = $this->wrapCDATA($this->loadJScode($this->TCEform->RTEcounter));
}
$this->TCEform->additionalJS_initial = $this->loadJSfiles($this->TCEform->RTEcounter);
- $resizableSettings = array(
- 'textareaResize' => true,
- 'textareaMaxHeight' => '600'
- );
- $pageRenderer->addInlineSettingArray('', $resizableSettings);
if ($GLOBALS['TSFE']->isINTincScript()) {
$GLOBALS['TSFE']->additionalHeaderData['rtehtmlarea'] = $pageRenderer->render();
}