2 namespace TYPO3\CMS\Rtehtmlarea\Extension;
47 'spellcheck' =>
'SpellCheck'
65 return parent::main($configuration)
68 $this->configuration[
'language'],
81 $button =
'spellcheck';
83 $spellCheckerMode = isset(
$GLOBALS[
'BE_USER']->userTS[
'options.'][
'HTMLAreaPspellMode']) ? trim(
$GLOBALS[
'BE_USER']->userTS[
'options.'][
'HTMLAreaPspellMode']) :
'normal';
84 if (!in_array($spellCheckerMode, $this->spellCheckerModes)) {
85 $spellCheckerMode =
'normal';
88 $enablePersonalDicts = $this->configuration[
'thisConfig'][
'buttons.'][$button .
'.'][
'enablePersonalDictionaries'] && !empty(
$GLOBALS[
'BE_USER']->userTS[
'options.'][
'enablePersonalDicts']);
89 if (in_array($button, $this->toolbar)) {
90 if (!is_array($this->configuration[
'thisConfig'][
'buttons.']) || !is_array($this->configuration[
'thisConfig'][
'buttons.'][($button .
'.')])) {
91 $jsArray[] =
'RTEarea[editornumber].buttons.' . $button .
' = new Object();';
93 $jsArray[] =
'RTEarea[editornumber].buttons.' . $button .
'.contentTypo3Language = "' . $this->configuration[
'contentTypo3Language'] .
'";';
94 $jsArray[] =
'RTEarea[editornumber].buttons.' . $button .
'.contentISOLanguage = "' . $this->configuration[
'contentISOLanguage'] .
'";';
95 $jsArray[] =
'RTEarea[editornumber].buttons.' . $button .
'.spellCheckerMode = "' . $spellCheckerMode .
'";';
96 $jsArray[] =
'RTEarea[editornumber].buttons.' . $button .
'.enablePersonalDicts = ' . ($enablePersonalDicts ?
'true' :
'false') .
';';
97 $jsArray[] =
'RTEarea[editornumber].buttons.' . $button .
'.path = "' . ($this->
isFrontend() || $this->
isFrontendEditActive() ? (
$GLOBALS[
'TSFE']->absRefPrefix ?
$GLOBALS[
'TSFE']->absRefPrefix :
'') .
'index.php?eID=rtehtmlarea_spellchecker' : BackendUtility::getAjaxUrl(
'rtehtmlarea_spellchecker')) .
'";';
99 return implode(LF, $jsArray);