TYPO3 CMS  TYPO3_6-2
DefaultLink.php
Go to the documentation of this file.
1 <?php
3 
22 
23  protected $extensionKey = 'rtehtmlarea';
24 
25  // The key of the extension that is extending htmlArea RTE
26  protected $pluginName = 'DefaultLink';
27 
28  // The name of the plugin registered by the extension
30 
31  // Path to this main locallang file of the extension relative to the extension dir.
32  protected $relativePathToSkin = 'extensions/DefaultLink/skin/htmlarea.css';
33 
34  // Path to the skin (css) file relative to the extension dir.
35  protected $htmlAreaRTE;
36 
37  // Reference to the invoking object
38  protected $thisConfig;
39 
40  // Reference to RTE PageTSConfig
41  protected $toolbar;
42 
43  // Reference to RTE toolbar array
44  protected $LOCAL_LANG;
45 
46  // Frontend language array
47  protected $pluginButtons = 'link, unlink';
48 
50  'link' => 'CreateLink',
51  'unlink' => 'UnLink'
52  );
53 
60  public function buildJavascriptConfiguration($RTEcounter) {
61  $registerRTEinJavascriptString = '';
62  $button = 'link';
63  if (in_array($button, $this->toolbar) && $this->htmlAreaRTE->is_FE()) {
64  if (!is_array($this->thisConfig['buttons.']) || !is_array($this->thisConfig['buttons.'][($button . '.')])) {
65  $registerRTEinJavascriptString .= '
66  RTEarea[' . $RTEcounter . ']["buttons"]["' . $button . '"] = new Object();';
67  }
68  $registerRTEinJavascriptString .= '
69  RTEarea[' . $RTEcounter . '].buttons.' . $button . '.stripBaseUrl = true;';
70  }
71  return $registerRTEinJavascriptString;
72  }
73 
74 }