50 'fontstyle' =>
'FontName',
51 'fontsize' =>
'FontSize' 56 'Arial' =>
'Arial,sans-serif',
57 'Arial Black' =>
'\'Arial Black\
',sans-serif',
58 'Verdana' =>
'Verdana,Arial,sans-serif',
59 'Times New Roman' =>
'\'Times New Roman\
',Times,serif',
60 'Garamond' =>
'Garamond',
61 'Lucida Handwriting' =>
'\'Lucida Handwriting\
'',
62 'Courier' =>
'Courier',
63 'Webdings' =>
'Webdings',
64 'Wingdings' =>
'Wingdings' 67 'Extra small' =>
'8px',
68 'Very small' =>
'9px',
72 'Very large' =>
'24px',
73 'Extra large' =>
'32px' 79 public function main($parentObject) {
80 $enabled = parent::main($parentObject) &&
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXTCONF'][
'rtehtmlarea'][
'allowStyleAttribute'];
81 if ($this->htmlAreaRTE->is_FE()) {
82 $this->RTEProperties = $this->htmlAreaRTE->RTEsetup;
84 $this->RTEProperties = $this->htmlAreaRTE->RTEsetup[
'properties'];
96 $registerRTEinJavascriptString =
'';
99 foreach ($pluginButtonsArray as $buttonId) {
100 if (in_array($buttonId, $this->toolbar)) {
104 return $registerRTEinJavascriptString;
115 $configureRTEInJavascriptString =
'';
119 if (is_array($this->thisConfig[
'buttons.']) && is_array($this->thisConfig[
'buttons.'][$buttonId .
'.'])) {
120 if ($this->thisConfig[
'buttons.'][$buttonId .
'.'][
'removeItems']) {
121 $hideItems = $this->thisConfig[
'buttons.'][$buttonId .
'.'][
'removeItems'];
123 if ($this->thisConfig[
'buttons.'][$buttonId .
'.'][
'addItems']) {
129 if ($this->htmlAreaRTE->is_FE()) {
130 $items[
'none'] = array(
$GLOBALS[
'TSFE']->getLLL($buttonId ==
'fontstyle' ?
'Default font' :
'Default size', $this->LOCAL_LANG),
'none');
132 $items[
'none'] = array(
$GLOBALS[
'LANG']->getLL($buttonId ==
'fontstyle' ?
'Default font' :
'Default size'),
'none');
135 if ($hideItems !=
'*') {
137 foreach ($this->defaultFont[$buttonId] as $name => $value) {
139 if ($this->htmlAreaRTE->is_FE()) {
140 $label =
$GLOBALS[
'TSFE']->getLLL($name, $this->LOCAL_LANG);
142 $label =
$GLOBALS[
'LANG']->getLL($name);
147 $items[$name] = array($label, $this->htmlAreaRTE->cleanList($value));
153 if (is_array($this->RTEProperties[$buttonId ==
'fontstyle' ?
'fonts.' :
'fontSizes.'])) {
154 foreach ($this->RTEProperties[$buttonId ==
'fontstyle' ?
'fonts.' :
'fontSizes.'] as $name => $conf) {
155 $name = substr($name, 0, -1);
156 if (in_array($name, $addItems)) {
157 $label = $this->htmlAreaRTE->getPageConfigLabel($conf[
'name'], 0);
158 $items[$name] = array($label, $this->htmlAreaRTE->cleanList($conf[
'value']));
163 if ($this->thisConfig[
'buttons.'][$buttonId .
'.'][
'defaultItem'] && $items[$this->thisConfig[
'buttons.'][$buttonId .
'.'][
'defaultItem']]) {
164 $items[
'none'] = array($items[$this->thisConfig[
'buttons.'][$buttonId .
'.'][
'defaultItem']][0],
'none');
165 unset($items[$this->thisConfig[
'buttons.'][$buttonId .
'.'][
'defaultItem']]);
168 $itemsJSArray = array();
169 foreach ($items as $name => $option) {
170 $itemsJSArray[] = array(
'text' => $option[0],
'value' => $option[1]);
172 if ($this->htmlAreaRTE->is_FE()) {
173 $GLOBALS[
'TSFE']->csConvObj->convArray($itemsJSArray, $this->htmlAreaRTE->OutputCharset,
'utf-8');
175 $itemsJSArray = json_encode(array(
'options' => $itemsJSArray));
177 if (!is_array($this->thisConfig[
'buttons.']) || !is_array($this->thisConfig[
'buttons.'][($buttonId .
'.')])) {
178 $configureRTEInJavascriptString .=
' 179 RTEarea[' . $RTEcounter .
'].buttons.' . $buttonId .
' = new Object();';
181 $configureRTEInJavascriptString .=
' 182 RTEarea[' . $RTEcounter .
'].buttons.' . $buttonId .
'.dataUrl = "' . ($this->htmlAreaRTE->is_FE() &&
$GLOBALS[
'TSFE']->absRefPrefix ?
$GLOBALS[
'TSFE']->absRefPrefix :
'') . $this->htmlAreaRTE->writeTemporaryFile(
'', ($buttonId .
'_' . $this->htmlAreaRTE->contentLanguageUid),
'js', $itemsJSArray) .
'";';
183 return $configureRTEInJavascriptString;
buildJavascriptConfiguration($RTEcounter)
$relativePathToLocallangFile
buildJSFontItemsConfig($RTEcounter, $buttonId)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
$convertToolbarForHtmlAreaArray
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static inList($list, $item)