53 'link' =>
'CreateLink',
57 public function main($parentObject) {
58 $enabled = parent::main($parentObject);
60 return $enabled && !$this->thisConfig[
'buttons.'][
'link.'][
'TYPO3Browser.'][
'disabled'];
70 $registerRTEinJavascriptString =
'';
72 if (in_array($button, $this->toolbar)) {
73 if (!is_array($this->thisConfig[
'buttons.']) || !is_array($this->thisConfig[
'buttons.'][($button .
'.')])) {
74 $registerRTEinJavascriptString .=
' 75 RTEarea[' . $RTEcounter .
'].buttons.' . $button .
' = new Object();';
77 $registerRTEinJavascriptString .=
' 79 if ($this->htmlAreaRTE->is_FE()) {
80 $RTEProperties = $this->htmlAreaRTE->RTEsetup;
82 $RTEProperties = $this->htmlAreaRTE->RTEsetup[
'properties'];
84 if (is_array($RTEProperties[
'classesAnchor.'])) {
85 $registerRTEinJavascriptString .=
' 86 RTEarea[' . $RTEcounter .
'].buttons.' . $button .
'.classesAnchorUrl = "' . $this->htmlAreaRTE->writeTemporaryFile(
'', (
'classesAnchor_' . $this->htmlAreaRTE->contentLanguageUid),
'js', $this->buildJSClassesAnchorArray(), TRUE) .
'";';
88 $registerRTEinJavascriptString .=
' 91 return $registerRTEinJavascriptString;
101 $JSClassesAnchorArray .=
'HTMLArea.classesAnchorSetup = [ ' . LF;
102 $classesAnchorIndex = 0;
103 foreach ($this->htmlAreaRTE->RTEsetup[
'properties'][
'classesAnchor.'] as $label => $conf) {
104 if (is_array($conf) && $conf[
'class']) {
105 $JSClassesAnchorArray .= ($classesAnchorIndex++ ?
',' :
'') .
' { ' . LF;
107 $JSClassesAnchorArray .= ($index++ ?
',' :
'') .
'name : "' . str_replace(
'"',
'', str_replace(
'\'',
'', $conf[
'class'])) .
'"' . LF;
109 $JSClassesAnchorArray .= ($index++ ?
',' :
'') .
'type : "' . str_replace(
'"',
'', str_replace(
'\'',
'', $conf[
'type'])) .
'"' . LF;
111 if (trim(str_replace(
'\'',
'', str_replace(
'"',
'', $conf[
'image'])))) {
112 $JSClassesAnchorArray .= ($index++ ?
',' :
'') .
'image : "' . $this->htmlAreaRTE->siteURL . \
TYPO3\CMS\Core\Utility\
GeneralUtility::resolveBackPath((TYPO3_mainDir . $this->htmlAreaRTE->getFullFileName(trim(str_replace(
'\'',
'', str_replace(
'"',
'', $conf[
'image'])))))) .
'"' . LF;
114 $JSClassesAnchorArray .= ($index++ ?
',' :
'') .
'addIconAfterLink : ' . ($conf[
'addIconAfterLink'] ?
'true' :
'false') . LF;
115 if (trim($conf[
'altText'])) {
116 $string = $this->htmlAreaRTE->getLLContent(trim($conf[
'altText']));
117 $JSClassesAnchorArray .= ($index++ ?
',' :
'') .
'altText : ' . str_replace(
'"',
'\\"', str_replace(
'\\\'',
'\'', $string)) . LF;
119 if (trim($conf[
'titleText'])) {
120 $string = $this->htmlAreaRTE->getLLContent(trim($conf[
'titleText']));
121 $JSClassesAnchorArray .= ($index++ ?
',' :
'') .
'titleText : ' . str_replace(
'"',
'\\"', str_replace(
'\\\'',
'\'', $string)) . LF;
123 if (trim($conf[
'target'])) {
124 $JSClassesAnchorArray .= ($index++ ?
',' :
'') .
'target : "' . trim($conf[
'target']) .
'"' . LF;
126 $JSClassesAnchorArray .=
'}' . LF;
129 $JSClassesAnchorArray .=
'];' . LF;
130 return $JSClassesAnchorArray;
141 if (!in_array(
'link', $show)) {
$relativePathToLocallangFile
buildJavascriptConfiguration($RTEcounter)
static quoteJSvalue($value)
buildJSClassesAnchorArray()
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static getModuleUrl($moduleName, $urlParameters=array(), $backPathOverride=FALSE, $returnAbsoluteUrl=FALSE)
$convertToolbarForHtmlAreaArray
applyToolbarConstraints($show)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static resolveBackPath($pathStr)