You've already forked joomla_test
first commit
This commit is contained in:
275
plugins/editors/codemirror/codemirror.php
Normal file
275
plugins/editors/codemirror/codemirror.php
Normal file
@ -0,0 +1,275 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Editors.codemirror
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* CodeMirror Editor Plugin.
|
||||
*
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Editors.codemirror
|
||||
* @since 1.6
|
||||
*/
|
||||
class PlgEditorCodemirror extends JPlugin
|
||||
{
|
||||
/**
|
||||
* Base path for editor files
|
||||
*/
|
||||
protected $_basePath = 'media/editors/codemirror/';
|
||||
|
||||
/**
|
||||
* Initialises the Editor.
|
||||
*
|
||||
* @return string JavaScript Initialization string.
|
||||
*/
|
||||
public function onInit()
|
||||
{
|
||||
JHtml::_('behavior.framework');
|
||||
$uncompressed = JFactory::getApplication()->getCfg('debug') ? '-uncompressed' : '';
|
||||
JHtml::_('script', $this->_basePath . 'js/codemirror' . $uncompressed . '.js', false, false, false, false);
|
||||
JHtml::_('stylesheet', $this->_basePath . 'css/codemirror.css');
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy editor content to form field.
|
||||
*
|
||||
* @param string $id The id of the editor field.
|
||||
*
|
||||
* @return string Javascript
|
||||
*/
|
||||
public function onSave($id)
|
||||
{
|
||||
return "document.getElementById('$id').value = Joomla.editors.instances['$id'].getCode();\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the editor content.
|
||||
*
|
||||
* @param string $id The id of the editor field.
|
||||
*
|
||||
* @return string Javascript
|
||||
*/
|
||||
public function onGetContent($id)
|
||||
{
|
||||
return "Joomla.editors.instances['$id'].getCode();\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the editor content.
|
||||
*
|
||||
* @param string $id The id of the editor field.
|
||||
* @param string $content The content to set.
|
||||
*
|
||||
* @return string Javascript
|
||||
*/
|
||||
public function onSetContent($id, $content)
|
||||
{
|
||||
return "Joomla.editors.instances['$id'].setCode($content);\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the editor specific insert method.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function onGetInsertMethod()
|
||||
{
|
||||
static $done = false;
|
||||
|
||||
// Do this only once.
|
||||
if (!$done)
|
||||
{
|
||||
$done = true;
|
||||
$doc = JFactory::getDocument();
|
||||
$js = "\tfunction jInsertEditorText(text, editor)
|
||||
{
|
||||
Joomla.editors.instances[editor].replaceSelection(text);\n
|
||||
}";
|
||||
$doc->addScriptDeclaration($js);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the editor area.
|
||||
*
|
||||
* @param string $name The control name.
|
||||
* @param string $content The contents of the text area.
|
||||
* @param string $width The width of the text area (px or %).
|
||||
* @param string $height The height of the text area (px or %).
|
||||
* @param integer $col The number of columns for the textarea.
|
||||
* @param integer $row The number of rows for the textarea.
|
||||
* @param boolean $buttons True and the editor buttons will be displayed.
|
||||
* @param string $id An optional ID for the textarea (note: since 1.6). If not supplied the name is used.
|
||||
* @param string $asset The object asset
|
||||
* @param object $author The author.
|
||||
* @param array $params Associative array of editor parameters.
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
public function onDisplay($name, $content, $width, $height, $col, $row, $buttons = true, $id = null, $asset = null, $author = null, $params = array())
|
||||
{
|
||||
if (empty($id))
|
||||
{
|
||||
$id = $name;
|
||||
}
|
||||
|
||||
// Only add "px" to width and height if they are not given as a percentage
|
||||
if (is_numeric($width))
|
||||
{
|
||||
$width .= 'px';
|
||||
}
|
||||
|
||||
if (is_numeric($height))
|
||||
{
|
||||
$height .= 'px';
|
||||
}
|
||||
|
||||
// Must pass the field id to the buttons in this editor.
|
||||
$buttons = $this->_displayButtons($id, $buttons, $asset, $author);
|
||||
|
||||
$compressed = JFactory::getApplication()->getCfg('debug') ? '-uncompressed' : '';
|
||||
|
||||
// Default syntax
|
||||
$parserFile = 'parsexml.js';
|
||||
$styleSheet = array('xmlcolors.css');
|
||||
|
||||
// Look if we need special syntax coloring.
|
||||
$syntax = JFactory::getApplication()->getUserState('editor.source.syntax');
|
||||
|
||||
if ($syntax)
|
||||
{
|
||||
switch ($syntax)
|
||||
{
|
||||
case 'css':
|
||||
$parserFile = 'parsecss.js';
|
||||
$styleSheet = array('csscolors.css');
|
||||
break;
|
||||
|
||||
case 'js':
|
||||
$parserFile = array('tokenizejavascript.js', 'parsejavascript.js');
|
||||
$styleSheet = array('jscolors.css');
|
||||
break;
|
||||
|
||||
case 'html':
|
||||
$parserFile = array('parsexml.js', 'parsecss.js', 'tokenizejavascript.js', 'parsejavascript.js', 'parsehtmlmixed.js');
|
||||
$styleSheet = array('xmlcolors.css', 'jscolors.css', 'csscolors.css');
|
||||
break;
|
||||
|
||||
case 'php':
|
||||
$parserFile = array('parsexml.js', 'parsecss.js', 'tokenizejavascript.js', 'parsejavascript.js', 'tokenizephp.js', 'parsephp.js', 'parsephphtmlmixed.js');
|
||||
$styleSheet = array('xmlcolors.css', 'jscolors.css', 'csscolors.css', 'phpcolors.css');
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($styleSheet as &$style)
|
||||
{
|
||||
$style = JUri::root(true) . '/' . $this->_basePath . 'css/' . $style;
|
||||
}
|
||||
|
||||
$options = new stdClass;
|
||||
|
||||
$options->basefiles = array('basefiles' . $compressed . '.js');
|
||||
$options->path = JUri::root(true) . '/' . $this->_basePath . 'js/';
|
||||
$options->parserfile = $parserFile;
|
||||
$options->stylesheet = $styleSheet;
|
||||
$options->height = $height;
|
||||
$options->width = $width;
|
||||
$options->continuousScanning = 500;
|
||||
|
||||
if ($this->params->get('linenumbers', 0))
|
||||
{
|
||||
$options->lineNumbers = true;
|
||||
$options->textWrapping = false;
|
||||
}
|
||||
|
||||
if ($this->params->get('tabmode', '') == 'shift')
|
||||
{
|
||||
$options->tabMode = 'shift';
|
||||
}
|
||||
|
||||
$html = array();
|
||||
$html[] = "<textarea name=\"$name\" id=\"$id\" cols=\"$col\" rows=\"$row\">$content</textarea>";
|
||||
$html[] = $buttons;
|
||||
$html[] = '<script type="text/javascript">';
|
||||
$html[] = '(function() {';
|
||||
$html[] = 'var editor = CodeMirror.fromTextArea("' . $id . '", ' . json_encode($options) . ');';
|
||||
$html[] = 'Joomla.editors.instances[\'' . $id . '\'] = editor;';
|
||||
$html[] = '})()';
|
||||
$html[] = '</script>';
|
||||
|
||||
return implode("\n", $html);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the editor buttons.
|
||||
*
|
||||
* @param string $name Name of the button
|
||||
* @param mixed $buttons [array with button objects | boolean true to display buttons]
|
||||
* @param string $asset The object asset
|
||||
* @param object $author The author.
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
protected function _displayButtons($name, $buttons, $asset, $author)
|
||||
{
|
||||
// Load modal popup behavior
|
||||
JHtml::_('behavior.modal', 'a.modal-button');
|
||||
|
||||
$args['name'] = $name;
|
||||
$args['event'] = 'onGetInsertMethod';
|
||||
|
||||
$html = array();
|
||||
$results[] = $this->update($args);
|
||||
|
||||
foreach ($results as $result)
|
||||
{
|
||||
if (is_string($result) && trim($result))
|
||||
{
|
||||
$html[] = $result;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($buttons) || (is_bool($buttons) && $buttons))
|
||||
{
|
||||
$results = $this->_subject->getButtons($name, $buttons, $asset, $author);
|
||||
|
||||
// This will allow plugins to attach buttons or change the behavior on the fly using AJAX
|
||||
$html[] = '<div id="editor-xtd-buttons">';
|
||||
$html[] = '<div class="btn-toolbar">';
|
||||
|
||||
foreach ($results as $button)
|
||||
{
|
||||
// Results should be an object
|
||||
if ($button->get('name'))
|
||||
{
|
||||
$modal = ($button->get('modal')) ? 'class="modal-button btn"' : null;
|
||||
$href = ($button->get('link')) ? ' class="btn" href="' . JUri::base() . $button->get('link') . '"' : null;
|
||||
$onclick = ($button->get('onclick')) ? 'onclick="' . $button->get('onclick') . '"' : null;
|
||||
$title = ($button->get('title')) ? $button->get('title') : $button->get('text');
|
||||
$html[] = '<a ' . $modal . ' title="' . $title . '" ' . $href . ' ' . $onclick . ' rel="' . $button->get('options') . '">';
|
||||
$html[] = '<i class="icon-' . $button->get('name') . '"></i> ';
|
||||
$html[] = $button->get('text') . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
$html[] = '</div>';
|
||||
$html[] = '</div>';
|
||||
}
|
||||
|
||||
return implode("\n", $html);
|
||||
}
|
||||
}
|
45
plugins/editors/codemirror/codemirror.xml
Normal file
45
plugins/editors/codemirror/codemirror.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3.1" type="plugin" group="editors">
|
||||
<name>plg_editors_codemirror</name>
|
||||
<version>1.0</version>
|
||||
<creationDate>28 March 2011</creationDate>
|
||||
<author>Marijn Haverbeke</author>
|
||||
<authorEmail>N/A</authorEmail>
|
||||
<authorUrl></authorUrl>
|
||||
<copyright></copyright>
|
||||
<license></license>
|
||||
<description>PLG_CODEMIRROR_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename plugin="codemirror">codemirror.php</filename>
|
||||
<filename>index.html</filename> </files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.plg_editors_codemirror.ini</language>
|
||||
<language tag="en-GB">en-GB.plg_editors_codemirror.sys.ini</language>
|
||||
</languages>
|
||||
<config>
|
||||
<fields name="params">
|
||||
|
||||
<fieldset name="basic">
|
||||
<field name="linenumbers" type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
description="PLG_CODEMIRROR_FIELD_LINENUMBERS_DESC"
|
||||
label="PLG_CODEMIRROR_FIELD_LINENUMBERS_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="tabmode" type="list"
|
||||
default="indent"
|
||||
description="PLG_CODEMIRROR_FIELD_TABMODE_DESC"
|
||||
label="PLG_CODEMIRROR_FIELD_TABMODE_LABEL"
|
||||
>
|
||||
<option value="indent">PLG_CODEMIRROR_FIELD_VALUE_TABMODE_INDENT</option>
|
||||
<option value="shift">PLG_CODEMIRROR_FIELD_VALUE_TABMODE_SHIFT</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
1
plugins/editors/codemirror/index.html
Normal file
1
plugins/editors/codemirror/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
plugins/editors/index.html
Normal file
1
plugins/editors/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
1
plugins/editors/none/index.html
Normal file
1
plugins/editors/none/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
215
plugins/editors/none/none.php
Normal file
215
plugins/editors/none/none.php
Normal file
@ -0,0 +1,215 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Editors.none
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Plain Textarea Editor Plugin
|
||||
*
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Editors.none
|
||||
* @since 1.5
|
||||
*/
|
||||
class PlgEditorNone extends JPlugin
|
||||
{
|
||||
/**
|
||||
* Method to handle the onInitEditor event.
|
||||
* - Initialises the Editor
|
||||
*
|
||||
* @return string JavaScript Initialization string
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function onInit()
|
||||
{
|
||||
$txt = "<script type=\"text/javascript\">
|
||||
function insertAtCursor(myField, myValue)
|
||||
{
|
||||
if (document.selection)
|
||||
{
|
||||
// IE support
|
||||
myField.focus();
|
||||
sel = document.selection.createRange();
|
||||
sel.text = myValue;
|
||||
} else if (myField.selectionStart || myField.selectionStart == '0')
|
||||
{
|
||||
// MOZILLA/NETSCAPE support
|
||||
var startPos = myField.selectionStart;
|
||||
var endPos = myField.selectionEnd;
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
+ myValue
|
||||
+ myField.value.substring(endPos, myField.value.length);
|
||||
} else {
|
||||
myField.value += myValue;
|
||||
}
|
||||
}
|
||||
</script>";
|
||||
|
||||
return $txt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy editor content to form field.
|
||||
*
|
||||
* Not applicable in this editor.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function onSave()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the editor content.
|
||||
*
|
||||
* @param string $id The id of the editor field.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function onGetContent($id)
|
||||
{
|
||||
return "document.getElementById('$id').value;\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the editor content.
|
||||
*
|
||||
* @param string $id The id of the editor field.
|
||||
* @param string $html The content to set.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function onSetContent($id, $html)
|
||||
{
|
||||
return "document.getElementById('$id').value = $html;\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $id The id of the editor field
|
||||
*
|
||||
* @return boolean returns true when complete
|
||||
*/
|
||||
public function onGetInsertMethod($id)
|
||||
{
|
||||
static $done = false;
|
||||
|
||||
// Do this only once.
|
||||
if (!$done)
|
||||
{
|
||||
$doc = JFactory::getDocument();
|
||||
$js = "\tfunction jInsertEditorText(text, editor)
|
||||
{
|
||||
insertAtCursor(document.getElementById(editor), text);
|
||||
}";
|
||||
$doc->addScriptDeclaration($js);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the editor area.
|
||||
*
|
||||
* @param string $name The control name.
|
||||
* @param string $content The contents of the text area.
|
||||
* @param string $width The width of the text area (px or %).
|
||||
* @param string $height The height of the text area (px or %).
|
||||
* @param integer $col The number of columns for the textarea.
|
||||
* @param integer $row The number of rows for the textarea.
|
||||
* @param boolean $buttons True and the editor buttons will be displayed.
|
||||
* @param string $id An optional ID for the textarea (note: since 1.6). If not supplied the name is used.
|
||||
* @param string $asset The object asset
|
||||
* @param object $author The author.
|
||||
* @param array $params Associative array of editor parameters.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function onDisplay($name, $content, $width, $height, $col, $row, $buttons = true, $id = null, $asset = null, $author = null, $params = array())
|
||||
{
|
||||
if (empty($id))
|
||||
{
|
||||
$id = $name;
|
||||
}
|
||||
|
||||
// Only add "px" to width and height if they are not given as a percentage
|
||||
if (is_numeric($width))
|
||||
{
|
||||
$width .= 'px';
|
||||
}
|
||||
|
||||
if (is_numeric($height))
|
||||
{
|
||||
$height .= 'px';
|
||||
}
|
||||
|
||||
$buttons = $this->_displayButtons($id, $buttons, $asset, $author);
|
||||
$editor = "<textarea name=\"$name\" id=\"$id\" cols=\"$col\" rows=\"$row\" style=\"width: $width; height: $height;\">$content</textarea>" . $buttons;
|
||||
|
||||
return $editor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the editor buttons.
|
||||
*
|
||||
* @param string $name The control name.
|
||||
* @param mixed $buttons [array with button objects | boolean true to display buttons]
|
||||
* @param string $asset The object asset
|
||||
* @param object $author The author.
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
public function _displayButtons($name, $buttons, $asset, $author)
|
||||
{
|
||||
// Load modal popup behavior
|
||||
JHtml::_('behavior.modal', 'a.modal-button');
|
||||
|
||||
$args['name'] = $name;
|
||||
$args['event'] = 'onGetInsertMethod';
|
||||
|
||||
$return = '';
|
||||
$results[] = $this->update($args);
|
||||
|
||||
foreach ($results as $result)
|
||||
{
|
||||
if (is_string($result) && trim($result))
|
||||
{
|
||||
$return .= $result;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($buttons) || (is_bool($buttons) && $buttons))
|
||||
{
|
||||
$results = $this->_subject->getButtons($name, $buttons, $asset, $author);
|
||||
|
||||
// This will allow plugins to attach buttons or change the behavior on the fly using AJAX
|
||||
$return .= "\n<div id=\"editor-xtd-buttons\" class=\"btn-toolbar pull-left\">\n";
|
||||
$return .= "\n<div class=\"btn-toolbar\">\n";
|
||||
|
||||
foreach ($results as $button)
|
||||
{
|
||||
// Results should be an object
|
||||
if ($button->get('name'))
|
||||
{
|
||||
$modal = ($button->get('modal')) ? 'class="modal-button btn"' : null;
|
||||
$href = ($button->get('link')) ? 'class="btn" href="' . JUri::base() . $button->get('link') . '"' : null;
|
||||
$onclick = ($button->get('onclick')) ? 'onclick="' . $button->get('onclick') . '"' : null;
|
||||
$title = ($button->get('title')) ? $button->get('title') : $button->get('text');
|
||||
$return .= "<a " . $modal . " title=\"" . $title . "\" " . $href . " " . $onclick . " rel=\"" . $button->get('options') . "\"><i class=\"icon-" . $button->get('name') . "\"></i> " . $button->get('text') . "</a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$return .= "</div>\n";
|
||||
$return .= "</div>\n";
|
||||
$return .= "<div class=\"clearfix\"></div>\n";
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
19
plugins/editors/none/none.xml
Normal file
19
plugins/editors/none/none.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3.1" type="plugin" group="editors">
|
||||
<name>plg_editors_none</name>
|
||||
<version>3.0.0</version>
|
||||
<creationDate>August 2004</creationDate>
|
||||
<author></author>
|
||||
<authorEmail>N/A</authorEmail>
|
||||
<authorUrl></authorUrl>
|
||||
<copyright></copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<description>PLG_NONE_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename plugin="none">none.php</filename>
|
||||
<filename>index.html</filename> </files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.plg_editors_none.ini</language>
|
||||
<language tag="en-GB">en-GB.plg_editors_none.sys.ini</language>
|
||||
</languages>
|
||||
</extension>
|
1
plugins/editors/tinymce/index.html
Normal file
1
plugins/editors/tinymce/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
823
plugins/editors/tinymce/tinymce.php
Normal file
823
plugins/editors/tinymce/tinymce.php
Normal file
@ -0,0 +1,823 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Editors.tinymce
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* TinyMCE Editor Plugin
|
||||
*
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Editors.tinymce
|
||||
* @since 1.5
|
||||
*/
|
||||
class PlgEditorTinymce extends JPlugin
|
||||
{
|
||||
/**
|
||||
* Base path for editor files
|
||||
*/
|
||||
protected $_basePath = 'media/editors/tinymce/jscripts/tiny_mce';
|
||||
|
||||
/**
|
||||
* Load the language file on instantiation.
|
||||
*
|
||||
* @var boolean
|
||||
* @since 3.1
|
||||
*/
|
||||
protected $autoloadLanguage = true;
|
||||
|
||||
/**
|
||||
* Initialises the Editor.
|
||||
*
|
||||
* @return string JavaScript Initialization string
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
public function onInit()
|
||||
{
|
||||
$language = JFactory::getLanguage();
|
||||
|
||||
$mode = (int) $this->params->get('mode', 1);
|
||||
$theme = array('simple', 'advanced', 'advanced');
|
||||
$skin = $this->params->get('skin', '0');
|
||||
|
||||
switch ($skin)
|
||||
{
|
||||
case '3':
|
||||
$skin = 'skin : "o2k7", skin_variant : "black",';
|
||||
break;
|
||||
|
||||
case '2':
|
||||
$skin = 'skin : "o2k7", skin_variant : "silver",';
|
||||
break;
|
||||
|
||||
case '1':
|
||||
$skin = 'skin : "o2k7",';
|
||||
break;
|
||||
case '0':
|
||||
default:
|
||||
$skin = 'skin : "default",';
|
||||
}
|
||||
|
||||
$entity_encoding = $this->params->def('entity_encoding', 'raw');
|
||||
|
||||
$langMode = $this->params->def('lang_mode', 0);
|
||||
$langPrefix = $this->params->def('lang_code', 'en');
|
||||
|
||||
if ($langMode)
|
||||
{
|
||||
$langPrefix = substr($language->getTag(), 0, strpos($language->getTag(), '-'));
|
||||
}
|
||||
|
||||
$text_direction = 'ltr';
|
||||
|
||||
if ($language->isRTL())
|
||||
{
|
||||
$text_direction = 'rtl';
|
||||
}
|
||||
|
||||
$use_content_css = $this->params->def('content_css', 1);
|
||||
$content_css_custom = $this->params->def('content_css_custom', '');
|
||||
|
||||
/*
|
||||
* Lets get the default template for the site application
|
||||
*/
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select('template')
|
||||
->from('#__template_styles')
|
||||
->where('client_id=0 AND home=' . $db->quote('1'));
|
||||
|
||||
$db->setQuery($query);
|
||||
$template = $db->loadResult();
|
||||
|
||||
$content_css = '';
|
||||
|
||||
$templates_path = JPATH_SITE . '/templates';
|
||||
|
||||
// Loading of css file for 'styles' dropdown
|
||||
if ( $content_css_custom )
|
||||
{
|
||||
// If URL, just pass it to $content_css
|
||||
if (strpos($content_css_custom, 'http') !== false)
|
||||
{
|
||||
$content_css = 'content_css : "' . $content_css_custom . '",';
|
||||
}
|
||||
// If it is not a URL, assume it is a file name in the current template folder
|
||||
else
|
||||
{
|
||||
$content_css = 'content_css : "' . JUri::root() . 'templates/' . $template . '/css/' . $content_css_custom . '",';
|
||||
|
||||
// Issue warning notice if the file is not found (but pass name to $content_css anyway to avoid TinyMCE error
|
||||
if (!file_exists($templates_path . '/' . $template . '/css/' . $content_css_custom))
|
||||
{
|
||||
$msg = sprintf(JText::_('PLG_TINY_ERR_CUSTOMCSSFILENOTPRESENT'), $content_css_custom);
|
||||
JError::raiseNotice('SOME_ERROR_CODE', $msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Process when use_content_css is Yes and no custom file given
|
||||
if ($use_content_css)
|
||||
{
|
||||
// First check templates folder for default template
|
||||
// if no editor.css file in templates folder, check system template folder
|
||||
if (!file_exists($templates_path . '/' . $template . '/css/editor.css'))
|
||||
{
|
||||
// If no editor.css file in system folder, show alert
|
||||
if (!file_exists($templates_path . '/system/css/editor.css'))
|
||||
{
|
||||
JError::raiseNotice('SOME_ERROR_CODE', JText::_('PLG_TINY_ERR_EDITORCSSFILENOTPRESENT'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$content_css = 'content_css : "' . JUri::root() . 'templates/system/css/editor.css",';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$content_css = 'content_css : "' . JUri::root() . 'templates/' . $template . '/css/editor.css",';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$relative_urls = $this->params->def('relative_urls', '1');
|
||||
|
||||
if ($relative_urls)
|
||||
{
|
||||
// Relative
|
||||
$relative_urls = "true";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Absolute
|
||||
$relative_urls = "false";
|
||||
}
|
||||
|
||||
$newlines = $this->params->def('newlines', 0);
|
||||
|
||||
if ($newlines)
|
||||
{
|
||||
// br
|
||||
$forcenewline = "force_br_newlines : true, force_p_newlines : false, forced_root_block : '',";
|
||||
}
|
||||
else
|
||||
{
|
||||
// p
|
||||
$forcenewline = "force_br_newlines : false, force_p_newlines : true, forced_root_block : 'p',";
|
||||
}
|
||||
|
||||
$invalid_elements = $this->params->def('invalid_elements', 'script,applet,iframe');
|
||||
$extended_elements = $this->params->def('extended_elements', '');
|
||||
|
||||
// theme_advanced_* settings
|
||||
$toolbar = $this->params->def('toolbar', 'top');
|
||||
$toolbar_align = $this->params->def('toolbar_align', 'left');
|
||||
$html_height = $this->params->def('html_height', '550');
|
||||
$html_width = $this->params->def('html_width', '750');
|
||||
$resizing = $this->params->def('resizing', 'true');
|
||||
$resize_horizontal = $this->params->def('resize_horizontal', 'false');
|
||||
|
||||
if ($this->params->get('element_path', 1))
|
||||
{
|
||||
$element_path = 'theme_advanced_statusbar_location : "bottom", theme_advanced_path : true';
|
||||
}
|
||||
else
|
||||
{
|
||||
$element_path = 'theme_advanced_statusbar_location : "none", theme_advanced_path : false';
|
||||
}
|
||||
|
||||
$buttons1_add_before = $buttons1_add = array();
|
||||
$buttons2_add_before = $buttons2_add = array();
|
||||
$buttons3_add_before = $buttons3_add = array();
|
||||
$buttons4 = array();
|
||||
$plugins = array();
|
||||
|
||||
if ($extended_elements != "")
|
||||
{
|
||||
$elements = explode(',', $extended_elements);
|
||||
}
|
||||
|
||||
// Initial values for buttons
|
||||
array_push($buttons4, 'cut', 'copy', 'paste');
|
||||
// array_push($buttons4,'|');
|
||||
|
||||
// Plugins
|
||||
|
||||
// Fonts
|
||||
$fonts = $this->params->def('fonts', 1);
|
||||
|
||||
if ($fonts)
|
||||
{
|
||||
$buttons1_add[] = 'fontselect,fontsizeselect';
|
||||
}
|
||||
|
||||
// Paste
|
||||
$paste = $this->params->def('paste', 1);
|
||||
|
||||
if ($paste)
|
||||
{
|
||||
$plugins[] = 'paste';
|
||||
$buttons4[] = 'pastetext';
|
||||
$buttons4[] = 'pasteword';
|
||||
$buttons4[] = 'selectall,|';
|
||||
}
|
||||
|
||||
// Search & replace
|
||||
$searchreplace = $this->params->def('searchreplace', 1);
|
||||
|
||||
if ($searchreplace)
|
||||
{
|
||||
$plugins[] = 'searchreplace';
|
||||
$buttons2_add_before[] = 'search,replace,|';
|
||||
}
|
||||
|
||||
// Insert date and/or time plugin
|
||||
$insertdate = $this->params->def('insertdate', 1);
|
||||
$format_date = $this->params->def('format_date', '%Y-%m-%d');
|
||||
$inserttime = $this->params->def('inserttime', 1);
|
||||
$format_time = $this->params->def('format_time', '%H:%M:%S');
|
||||
|
||||
if ($insertdate or $inserttime)
|
||||
{
|
||||
$plugins[] = 'insertdatetime';
|
||||
|
||||
if ($insertdate)
|
||||
{
|
||||
$buttons2_add[] = 'insertdate';
|
||||
}
|
||||
|
||||
if ($inserttime)
|
||||
{
|
||||
$buttons2_add[] = 'inserttime';
|
||||
}
|
||||
}
|
||||
|
||||
// Colors
|
||||
$colors = $this->params->def('colors', 1);
|
||||
|
||||
if ($colors)
|
||||
{
|
||||
$buttons2_add[] = 'forecolor,backcolor';
|
||||
}
|
||||
|
||||
// Table
|
||||
$table = $this->params->def('table', 1);
|
||||
|
||||
if ($table)
|
||||
{
|
||||
$plugins[] = 'table';
|
||||
$buttons3_add_before[] = 'tablecontrols';
|
||||
}
|
||||
|
||||
// Emotions
|
||||
$smilies = $this->params->def('smilies', 1);
|
||||
|
||||
if ($smilies)
|
||||
{
|
||||
$plugins[] = 'emotions';
|
||||
$buttons3_add[] = 'emotions';
|
||||
}
|
||||
|
||||
// Media plugin
|
||||
$media = $this->params->def('media', 1);
|
||||
|
||||
if ($media)
|
||||
{
|
||||
$plugins[] = 'media';
|
||||
$buttons3_add[] = 'media';
|
||||
}
|
||||
|
||||
// Horizontal line
|
||||
$hr = $this->params->def('hr', 1);
|
||||
|
||||
if ($hr)
|
||||
{
|
||||
$plugins[] = 'advhr';
|
||||
$elements[] = 'hr[id|title|alt|class|width|size|noshade|style]';
|
||||
$buttons3_add[] = 'advhr';
|
||||
}
|
||||
else
|
||||
{
|
||||
$elements[] = 'hr[id|class|title|alt]';
|
||||
}
|
||||
|
||||
// RTL/LTR buttons
|
||||
$directionality = $this->params->def('directionality', 1);
|
||||
|
||||
if ($directionality)
|
||||
{
|
||||
$plugins[] = 'directionality';
|
||||
$buttons3_add[] = 'ltr,rtl';
|
||||
}
|
||||
|
||||
// Fullscreen
|
||||
$fullscreen = $this->params->def('fullscreen', 1);
|
||||
|
||||
if ($fullscreen)
|
||||
{
|
||||
$plugins[] = 'fullscreen';
|
||||
$buttons2_add[] = 'fullscreen';
|
||||
}
|
||||
|
||||
// Layer
|
||||
$layer = $this->params->def('layer', 1);
|
||||
|
||||
if ($layer)
|
||||
{
|
||||
$plugins[] = 'layer';
|
||||
$buttons4[] = 'insertlayer';
|
||||
$buttons4[] = 'moveforward';
|
||||
$buttons4[] = 'movebackward';
|
||||
$buttons4[] = 'absolute';
|
||||
}
|
||||
|
||||
// Style
|
||||
$style = $this->params->def('style', 1);
|
||||
|
||||
if ($style)
|
||||
{
|
||||
$plugins[] = 'style';
|
||||
$buttons4[] = 'styleprops';
|
||||
}
|
||||
|
||||
// XHTMLxtras
|
||||
$xhtmlxtras = $this->params->def('xhtmlxtras', 1);
|
||||
|
||||
if ($xhtmlxtras)
|
||||
{
|
||||
$plugins[] = 'xhtmlxtras';
|
||||
$buttons4[] = 'cite,abbr,acronym,ins,del,attribs';
|
||||
}
|
||||
|
||||
// Visualchars
|
||||
$visualchars = $this->params->def('visualchars', 1);
|
||||
|
||||
if ($visualchars)
|
||||
{
|
||||
$plugins[] = 'visualchars';
|
||||
$buttons4[] = 'visualchars';
|
||||
}
|
||||
|
||||
// Visualblocks
|
||||
$visualblocks = $this->params->def('visualblocks', 1);
|
||||
|
||||
if ($visualblocks)
|
||||
{
|
||||
$plugins[] = 'visualblocks';
|
||||
$buttons4[] = 'visualblocks';
|
||||
}
|
||||
|
||||
// Non-breaking
|
||||
$nonbreaking = $this->params->def('nonbreaking', 1);
|
||||
|
||||
if ($nonbreaking)
|
||||
{
|
||||
$plugins[] = 'nonbreaking';
|
||||
$buttons4[] = 'nonbreaking';
|
||||
}
|
||||
|
||||
// Blockquote
|
||||
$blockquote = $this->params->def('blockquote', 1);
|
||||
|
||||
if ($blockquote)
|
||||
{
|
||||
$buttons4[] = 'blockquote';
|
||||
}
|
||||
|
||||
// Wordcount
|
||||
$wordcount = $this->params->def('wordcount', 1);
|
||||
|
||||
if ($wordcount)
|
||||
{
|
||||
$plugins[] = 'wordcount';
|
||||
}
|
||||
|
||||
// Template
|
||||
$template = $this->params->def('template', 1);
|
||||
|
||||
if ($template)
|
||||
{
|
||||
$plugins[] = 'template';
|
||||
$buttons4[] = 'template';
|
||||
}
|
||||
|
||||
// Advimage
|
||||
$advimage = $this->params->def('advimage', 1);
|
||||
|
||||
if ($advimage)
|
||||
{
|
||||
$plugins[] = 'advimage';
|
||||
$elements[] = 'img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style]';
|
||||
}
|
||||
|
||||
// Advlink
|
||||
$advlink = $this->params->def('advlink', 1);
|
||||
|
||||
if ($advlink)
|
||||
{
|
||||
$plugins[] = 'advlink';
|
||||
$elements[] = 'a[id|class|name|href|hreflang|target|title|onclick|rel|style]';
|
||||
}
|
||||
|
||||
// Advlist
|
||||
$advlist = $this->params->def('advlist', 1);
|
||||
|
||||
if ($advlist)
|
||||
{
|
||||
$plugins[] = 'advlist';
|
||||
}
|
||||
|
||||
// Autosave
|
||||
$autosave = $this->params->def('autosave', 1);
|
||||
|
||||
if ($autosave)
|
||||
{
|
||||
$plugins[] = 'autosave';
|
||||
}
|
||||
|
||||
// Context menu
|
||||
$contextmenu = $this->params->def('contextmenu', 1);
|
||||
|
||||
if ($contextmenu)
|
||||
{
|
||||
$plugins[] = 'contextmenu';
|
||||
}
|
||||
|
||||
// Inline popups
|
||||
$inlinepopups = $this->params->def('inlinepopups', 1);
|
||||
|
||||
if ($inlinepopups)
|
||||
{
|
||||
$plugins[] = 'inlinepopups';
|
||||
$dialog_type = 'dialog_type : "modal",';
|
||||
}
|
||||
else
|
||||
{
|
||||
$dialog_type = "";
|
||||
}
|
||||
|
||||
$custom_plugin = $this->params->def('custom_plugin', '');
|
||||
|
||||
if ($custom_plugin != "")
|
||||
{
|
||||
$plugins[] = $custom_plugin;
|
||||
}
|
||||
|
||||
$custom_button = $this->params->def('custom_button', '');
|
||||
|
||||
if ($custom_button != "")
|
||||
{
|
||||
$buttons4[] = $custom_button;
|
||||
}
|
||||
|
||||
// Prepare config variables
|
||||
$buttons1_add_before = implode(',', $buttons1_add_before);
|
||||
$buttons2_add_before = implode(',', $buttons2_add_before);
|
||||
$buttons3_add_before = implode(',', $buttons3_add_before);
|
||||
$buttons1_add = implode(',', $buttons1_add);
|
||||
$buttons2_add = implode(',', $buttons2_add);
|
||||
$buttons3_add = implode(',', $buttons3_add);
|
||||
$buttons4 = implode(',', $buttons4);
|
||||
$plugins = implode(',', $plugins);
|
||||
$elements = implode(',', $elements);
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 0: /* Simple mode*/
|
||||
$load = "\t<script type=\"text/javascript\" src=\"" .
|
||||
JUri::root() . $this->_basePath .
|
||||
"/tiny_mce.js\"></script>\n";
|
||||
|
||||
$return = $load .
|
||||
"\t<script type=\"text/javascript\">
|
||||
tinyMCE.init({
|
||||
// General
|
||||
directionality: \"$text_direction\",
|
||||
editor_selector : \"mce_editable\",
|
||||
language : \"" . $langPrefix . "\",
|
||||
mode : \"specific_textareas\",
|
||||
$skin
|
||||
theme : \"$theme[$mode]\",
|
||||
// Cleanup/Output
|
||||
inline_styles : true,
|
||||
gecko_spellcheck : true,
|
||||
entity_encoding : \"$entity_encoding\",
|
||||
$forcenewline
|
||||
// URL
|
||||
relative_urls : $relative_urls,
|
||||
remove_script_host : false,
|
||||
// Layout
|
||||
$content_css
|
||||
document_base_url : \"" . JUri::root() . "\"
|
||||
});
|
||||
</script>";
|
||||
break;
|
||||
|
||||
case 1: /* Advanced mode*/
|
||||
$load = "\t<script type=\"text/javascript\" src=\"" .
|
||||
JUri::root() . $this->_basePath .
|
||||
"/tiny_mce.js\"></script>\n";
|
||||
|
||||
$return = $load .
|
||||
"\t<script type=\"text/javascript\">
|
||||
tinyMCE.init({
|
||||
// General
|
||||
directionality: \"$text_direction\",
|
||||
editor_selector : \"mce_editable\",
|
||||
language : \"" . $langPrefix . "\",
|
||||
mode : \"specific_textareas\",
|
||||
$skin
|
||||
theme : \"$theme[$mode]\",
|
||||
// Cleanup/Output
|
||||
inline_styles : true,
|
||||
gecko_spellcheck : true,
|
||||
entity_encoding : \"$entity_encoding\",
|
||||
extended_valid_elements : \"$elements\",
|
||||
$forcenewline
|
||||
invalid_elements : \"$invalid_elements\",
|
||||
// URL
|
||||
relative_urls : $relative_urls,
|
||||
remove_script_host : false,
|
||||
document_base_url : \"" . JUri::root() . "\",
|
||||
// Layout
|
||||
$content_css
|
||||
// Advanced theme
|
||||
theme_advanced_toolbar_location : \"$toolbar\",
|
||||
theme_advanced_toolbar_align : \"$toolbar_align\",
|
||||
theme_advanced_source_editor_height : \"$html_height\",
|
||||
theme_advanced_source_editor_width : \"$html_width\",
|
||||
theme_advanced_resizing : $resizing,
|
||||
theme_advanced_resize_horizontal : $resize_horizontal,
|
||||
$element_path
|
||||
});
|
||||
</script>";
|
||||
break;
|
||||
|
||||
case 2: /* Extended mode*/
|
||||
$load = "\t<script type=\"text/javascript\" src=\"" .
|
||||
JUri::root() . $this->_basePath .
|
||||
"/tiny_mce.js\"></script>\n";
|
||||
|
||||
$return = $load .
|
||||
"\t<script type=\"text/javascript\">
|
||||
tinyMCE.init({
|
||||
// General
|
||||
$dialog_type
|
||||
directionality: \"$text_direction\",
|
||||
editor_selector : \"mce_editable\",
|
||||
language : \"" . $langPrefix . "\",
|
||||
mode : \"specific_textareas\",
|
||||
plugins : \"$plugins\",
|
||||
$skin
|
||||
theme : \"$theme[$mode]\",
|
||||
// Cleanup/Output
|
||||
inline_styles : true,
|
||||
gecko_spellcheck : true,
|
||||
entity_encoding : \"$entity_encoding\",
|
||||
extended_valid_elements : \"$elements\",
|
||||
$forcenewline
|
||||
invalid_elements : \"$invalid_elements\",
|
||||
// URL
|
||||
relative_urls : $relative_urls,
|
||||
remove_script_host : false,
|
||||
document_base_url : \"" . JUri::root() . "\",
|
||||
//Templates
|
||||
template_external_list_url : \"" . JUri::root() . "media/editors/tinymce/templates/template_list.js\",
|
||||
// Layout
|
||||
$content_css
|
||||
// Advanced theme
|
||||
theme_advanced_toolbar_location : \"$toolbar\",
|
||||
theme_advanced_toolbar_align : \"$toolbar_align\",
|
||||
theme_advanced_source_editor_height : \"$html_height\",
|
||||
theme_advanced_source_editor_width : \"$html_width\",
|
||||
theme_advanced_resizing : $resizing,
|
||||
theme_advanced_resize_horizontal : $resize_horizontal,
|
||||
$element_path,
|
||||
theme_advanced_buttons1_add_before : \"$buttons1_add_before\",
|
||||
theme_advanced_buttons2_add_before : \"$buttons2_add_before\",
|
||||
theme_advanced_buttons3_add_before : \"$buttons3_add_before\",
|
||||
theme_advanced_buttons1_add : \"$buttons1_add\",
|
||||
theme_advanced_buttons2_add : \"$buttons2_add\",
|
||||
theme_advanced_buttons3_add : \"$buttons3_add\",
|
||||
theme_advanced_buttons4 : \"$buttons4\",
|
||||
plugin_insertdate_dateFormat : \"$format_date\",
|
||||
plugin_insertdate_timeFormat : \"$format_time\",
|
||||
fullscreen_settings : {
|
||||
theme_advanced_path_location : \"top\"
|
||||
}
|
||||
});
|
||||
</script>";
|
||||
break;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* TinyMCE WYSIWYG Editor - get the editor content
|
||||
*
|
||||
* @param string $editor The name of the editor
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function onGetContent($editor)
|
||||
{
|
||||
return 'tinyMCE.get(\'' . $editor . '\').getContent();';
|
||||
}
|
||||
|
||||
/**
|
||||
* TinyMCE WYSIWYG Editor - set the editor content
|
||||
*
|
||||
* @param string $editor The name of the editor
|
||||
* @param string $html HTML code to set as the content for the editor
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function onSetContent($editor, $html)
|
||||
{
|
||||
return 'tinyMCE.get(\'' . $editor . '\').setContent(' . $html . ');';
|
||||
}
|
||||
|
||||
/**
|
||||
* TinyMCE WYSIWYG Editor - copy editor content to form field
|
||||
*
|
||||
* @param string $editor The name of the editor
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function onSave($editor)
|
||||
{
|
||||
return 'if (tinyMCE.get("' . $editor . '").isHidden()) {tinyMCE.get("' . $editor . '").show()}; tinyMCE.get("' . $editor . '").save();';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function onGetInsertMethod($name)
|
||||
{
|
||||
$doc = JFactory::getDocument();
|
||||
|
||||
$js = "
|
||||
function isBrowserIE()
|
||||
{
|
||||
return navigator.appName==\"Microsoft Internet Explorer\";
|
||||
}
|
||||
|
||||
function jInsertEditorText( text, editor )
|
||||
{
|
||||
if (isBrowserIE())
|
||||
{
|
||||
if (window.parent.tinyMCE)
|
||||
{
|
||||
window.parent.tinyMCE.selectedInstance.selection.moveToBookmark(window.parent.global_ie_bookmark);
|
||||
}
|
||||
}
|
||||
tinyMCE.execInstanceCommand(editor, 'mceInsertContent',false,text);
|
||||
}
|
||||
|
||||
var global_ie_bookmark = false;
|
||||
|
||||
function IeCursorFix()
|
||||
{
|
||||
if (isBrowserIE())
|
||||
{
|
||||
tinyMCE.execCommand('mceInsertContent', false, '');
|
||||
global_ie_bookmark = tinyMCE.activeEditor.selection.getBookmark(false);
|
||||
}
|
||||
return true;
|
||||
}";
|
||||
|
||||
$doc->addScriptDeclaration($js);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the editor area.
|
||||
*
|
||||
* @param string $name The control name.
|
||||
* @param string $content The contents of the text area.
|
||||
* @param string $width The width of the text area (px or %).
|
||||
* @param string $height The height of the text area (px or %).
|
||||
* @param integer $col The number of columns for the textarea.
|
||||
* @param integer $row The number of rows for the textarea.
|
||||
* @param boolean $buttons True and the editor buttons will be displayed.
|
||||
* @param string $id An optional ID for the textarea (note: since 1.6). If not supplied the name is used.
|
||||
* @param string $asset The object asset
|
||||
* @param object $author The author.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function onDisplay($name, $content, $width, $height, $col, $row, $buttons = true, $id = null, $asset = null, $author = null)
|
||||
{
|
||||
if (empty($id))
|
||||
{
|
||||
$id = $name;
|
||||
}
|
||||
|
||||
// Only add "px" to width and height if they are not given as a percentage
|
||||
if (is_numeric($width))
|
||||
{
|
||||
$width .= 'px';
|
||||
}
|
||||
|
||||
if (is_numeric($height))
|
||||
{
|
||||
$height .= 'px';
|
||||
}
|
||||
|
||||
$editor = '<textarea name="' . $name . '" id="' . $id .'" cols="' . $col .'" rows="' . $row . '" style="width: ' . $width . '; height:' . $height . ';" class="mce_editable">' . $content . "</textarea>\n" .
|
||||
$this->_displayButtons($id, $buttons, $asset, $author) .
|
||||
$this->_toogleButton($id);
|
||||
|
||||
return $editor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the editor buttons.
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $buttons [array with button objects | boolean true to display buttons]
|
||||
* @param string $asset
|
||||
* @param string $author
|
||||
*
|
||||
* @return string HTML
|
||||
*/
|
||||
private function _displayButtons($name, $buttons, $asset, $author)
|
||||
{
|
||||
// Load modal popup behavior
|
||||
JHtml::_('behavior.modal', 'a.modal-button');
|
||||
|
||||
$args['name'] = $name;
|
||||
$args['event'] = 'onGetInsertMethod';
|
||||
|
||||
$return = '';
|
||||
$results[] = $this->update($args);
|
||||
|
||||
foreach ($results as $result)
|
||||
{
|
||||
if (is_string($result) && trim($result))
|
||||
{
|
||||
$return .= $result;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($buttons) || (is_bool($buttons) && $buttons))
|
||||
{
|
||||
$results = $this->_subject->getButtons($name, $buttons, $asset, $author);
|
||||
|
||||
/*
|
||||
* This will allow plugins to attach buttons or change the behavior on the fly using AJAX
|
||||
*/
|
||||
$return .= "\n<div id=\"editor-xtd-buttons\" class=\"btn-toolbar pull-left\">\n";
|
||||
$return .= "\n<div class=\"btn-toolbar\">\n";
|
||||
|
||||
foreach ($results as $button)
|
||||
{
|
||||
/*
|
||||
* Results should be an object
|
||||
*/
|
||||
if ( $button->get('name') )
|
||||
{
|
||||
$class = ($button->get('class')) ? $button->get('class') : null;
|
||||
$class .= ($button->get('modal')) ? ' modal-button' : null;
|
||||
$href = ($button->get('link')) ? ' href="'.JUri::base().$button->get('link').'"' : null;
|
||||
$onclick = ($button->get('onclick')) ? ' onclick="'.$button->get('onclick').'"' : ' onclick="IeCursorFix(); return false;"';
|
||||
$title = ($button->get('title')) ? $button->get('title') : $button->get('text');
|
||||
$return .= '<a class="' . $class . '" title="' . $title . '"' . $href . $onclick . ' rel="' . $button->get('options')
|
||||
. '"><i class="icon-' . $button->get('name'). '"></i> ' . $button->get('text') . "</a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$return .= "</div>\n";
|
||||
$return .= "</div>\n";
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function _toogleButton($name)
|
||||
{
|
||||
$return = '';
|
||||
$return .= "\n<div class=\"toggle-editor btn-toolbar pull-right\">\n";
|
||||
$return .= "<div class=\"btn-group\"><a class=\"btn\" href=\"#\" onclick=\"tinyMCE.execCommand('mceToggleEditor', false, '" . $name . "');return false;\" title=\"" . JText::_('PLG_TINY_BUTTON_TOGGLE_EDITOR') . '"><i class="icon-eye"></i> ' . JText::_('PLG_TINY_BUTTON_TOGGLE_EDITOR') . "</a></div>";
|
||||
$return .= "</div>\n";
|
||||
|
||||
$return .= "<div class=\"clearfix\"></div>\n";
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
517
plugins/editors/tinymce/tinymce.xml
Normal file
517
plugins/editors/tinymce/tinymce.xml
Normal file
@ -0,0 +1,517 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3.1" type="plugin" group="editors" method="upgrade">
|
||||
<name>plg_editors_tinymce</name>
|
||||
<version>3.5.6</version>
|
||||
<creationDate>2005-2012</creationDate>
|
||||
<author>Moxiecode Systems AB</author>
|
||||
<authorEmail>N/A</authorEmail>
|
||||
<authorUrl>tinymce.moxiecode.com/</authorUrl>
|
||||
<copyright>Moxiecode Systems AB</copyright>
|
||||
<license>LGPL</license>
|
||||
<description>PLG_TINY_XML_DESCRIPTION</description>
|
||||
<files>
|
||||
<filename plugin="tinymce">tinymce.php</filename>
|
||||
<filename>index.html</filename> </files>
|
||||
<languages>
|
||||
<language tag="en-GB">en-GB.plg_editors_tinymce.ini</language>
|
||||
<language tag="en-GB">en-GB.plg_editors_tinymce.sys.ini</language>
|
||||
</languages>
|
||||
<config>
|
||||
<fields name="params">
|
||||
|
||||
<fieldset name="basic">
|
||||
<field name="mode" type="list"
|
||||
default="2"
|
||||
description="PLG_TINY_FIELD_FUNCTIONALITY_DESC"
|
||||
label="PLG_TINY_FIELD_FUNCTIONALITY_LABEL"
|
||||
>
|
||||
<option value="0">PLG_TINY_FIELD_VALUE_SIMPLE</option>
|
||||
<option value="1">PLG_TINY_FIELD_VALUE_ADVANCED</option>
|
||||
<option value="2">PLG_TINY_FIELD_VALUE_EXTENDED</option>
|
||||
</field>
|
||||
|
||||
<field name="skin" type="list"
|
||||
default="0"
|
||||
description="PLG_TINY_FIELD_SKIN_DESC"
|
||||
label="PLG_TINY_FIELD_SKIN_LABEL"
|
||||
>
|
||||
<option value="0">PLG_TINY_FIELD_VALUE_DEFAULT</option>
|
||||
<option value="1">PLG_TINY_FIELD_VALUE_BLUE</option>
|
||||
<option value="2">PLG_TINY_FIELD_VALUE_SILVER</option>
|
||||
<option value="3">PLG_TINY_FIELD_VALUE_BLACK</option>
|
||||
</field>
|
||||
|
||||
<field name="spacer1" type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field name="entity_encoding" type="list"
|
||||
default="raw"
|
||||
description="PLG_TINY_FIELD_ENCODING_DESC"
|
||||
label="PLG_TINY_FIELD_ENCODING_LABEL"
|
||||
>
|
||||
<option value="named">PLG_TINY_FIELD_VALUE_NAMED</option>
|
||||
<option value="numeric">PLG_TINY_FIELD_VALUE_NUMERIC</option>
|
||||
<option value="raw">PLG_TINY_FIELD_VALUE_RAW</option>
|
||||
</field>
|
||||
|
||||
<field name="spacer2" type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field name="lang_mode" type="radio"
|
||||
class="btn-group"
|
||||
default="0"
|
||||
description="PLG_TINY_FIELD_LANGSELECT_DESC"
|
||||
label="PLG_TINY_FIELD_LANGSELECT_LABEL"
|
||||
>
|
||||
<option value="0">JNo</option>
|
||||
<option value="1">JYes</option>
|
||||
</field>
|
||||
|
||||
<field name="lang_code" type="text"
|
||||
default="en"
|
||||
description="PLG_TINY_FIELD_LANGCODE_DESC"
|
||||
label="PLG_TINY_FIELD_LANGCODE_LABEL"
|
||||
size="2"
|
||||
/>
|
||||
|
||||
<field name="text_direction" type="list"
|
||||
default="ltr"
|
||||
description="PLG_TINY_FIELD_DIRECTION_DESC"
|
||||
label="PLG_TINY_FIELD_DIRECTION_LABEL"
|
||||
>
|
||||
<option value="ltr">PLG_TINY_FIELD_VALUE_LTR</option>
|
||||
<option value="rtl">PLG_TINY_FIELD_VALUE_RTL</option>
|
||||
</field>
|
||||
|
||||
<field name="spacer3" type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field name="content_css" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_CSS_DESC"
|
||||
label="PLG_TINY_FIELD_CSS_LABEL"
|
||||
>
|
||||
<option value="0">JNo</option>
|
||||
<option value="1">JYes</option>
|
||||
</field>
|
||||
|
||||
<field name="content_css_custom" type="text"
|
||||
size="30"
|
||||
description="PLG_TINY_FIELD_CUSTOM_CSS_DESC"
|
||||
label="PLG_TINY_FIELD_CUSTOM_CSS_LABEL"
|
||||
/>
|
||||
|
||||
<field name="spacer4" type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field name="relative_urls" type="list"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_URLS_DESC"
|
||||
label="PLG_TINY_FIELD_URLS_LABEL"
|
||||
>
|
||||
<option value="0">PLG_TINY_FIELD_VALUE_ABSOLUTE</option>
|
||||
<option value="1">PLG_TINY_FIELD_VALUE_RELATIVE</option>
|
||||
</field>
|
||||
|
||||
<field name="newlines" type="list"
|
||||
default="0"
|
||||
description="PLG_TINY_FIELD_NEWLINES_DESC"
|
||||
label="PLG_TINY_FIELD_NEWLINES_LABEL"
|
||||
>
|
||||
<option value="1">PLG_TINY_FIELD_VALUE_BR</option>
|
||||
<option value="0">PLG_TINY_FIELD_VALUE_P</option>
|
||||
</field>
|
||||
|
||||
<field name="invalid_elements" type="textarea"
|
||||
cols="30"
|
||||
default="script,applet,iframe"
|
||||
description="PLG_TINY_FIELD_PROHIBITED_DESC"
|
||||
label="PLG_TINY_FIELD_PROHIBITED_LABEL"
|
||||
rows="2"
|
||||
/>
|
||||
|
||||
<field name="extended_elements" type="textarea"
|
||||
cols="30"
|
||||
description="PLG_TINY_FIELD_ELEMENTS_DESC"
|
||||
label="PLG_TINY_FIELD_ELEMENTS_LABEL"
|
||||
rows="2"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="advanced"
|
||||
label="PLG_TINY_FIELD_LABEL_ADVANCEDPARAMS"
|
||||
>
|
||||
|
||||
<field name="toolbar" type="radio"
|
||||
class="btn-group"
|
||||
default="top"
|
||||
description="PLG_TINY_FIELD_TOOLBAR_DESC"
|
||||
label="PLG_TINY_FIELD_TOOLBAR_LABEL"
|
||||
>
|
||||
<option value="top">PLG_TINY_FIELD_VALUE_TOP</option>
|
||||
<option value="bottom">PLG_TINY_FIELD_VALUE_BOTTOM</option>
|
||||
</field>
|
||||
|
||||
<field name="toolbar_align" type="list"
|
||||
default="left"
|
||||
description="PLG_TINY_FIELD_TOOLBAR_ALIGN_DESC"
|
||||
label="PLG_TINY_FIELD_TOOLBAR_ALIGN_LABEL"
|
||||
>
|
||||
<option value="left">PLG_TINY_FIELD_VALUE_LEFT</option>
|
||||
<option value="center">PLG_TINY_FIELD_VALUE_CENTER</option>
|
||||
<option value="right">PLG_TINY_FIELD_VALUE_RIGHT</option>
|
||||
</field>
|
||||
|
||||
<field name="html_height" type="text"
|
||||
default="550"
|
||||
description="PLG_TINY_FIELD_HTMLHEIGHT_DESC"
|
||||
label="PLG_TINY_FIELD_HTMLHEIGHT_LABEL"
|
||||
/>
|
||||
|
||||
<field name="html_width" type="text"
|
||||
default="750"
|
||||
description="PLG_TINY_FIELD_HTMLWIDTH_DESC"
|
||||
label="PLG_TINY_FIELD_HTMLWIDTH_LABEL"
|
||||
/>
|
||||
|
||||
<field name="resizing" type="radio"
|
||||
class="btn-group"
|
||||
default="true"
|
||||
description="PLG_TINY_FIELD_RESIZING_DESC"
|
||||
label="PLG_TINY_FIELD_RESIZING_LABEL"
|
||||
>
|
||||
<option value="false">JOFF</option>
|
||||
<option value="true">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="resize_horizontal" type="radio"
|
||||
class="btn-group"
|
||||
default="false"
|
||||
description="PLG_TINY_FIELD_RESIZE_HORIZONTAL_DESC"
|
||||
label="PLG_TINY_FIELD_RESIZE_HORIZONTAL_LABEL"
|
||||
>
|
||||
<option value="false">JOFF</option>
|
||||
<option value="true">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="element_path" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_PATH_DESC"
|
||||
label="PLG_TINY_FIELD_PATH_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="spacer" type="spacer" class="text"
|
||||
label="PLG_TINY_FIELD_NAME_EXTENDED_LABEL"
|
||||
/>
|
||||
|
||||
<field name="fonts" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_FONTS_DESC"
|
||||
label="PLG_TINY_FIELD_FONTS_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="paste" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_PASTE_DESC"
|
||||
label="PLG_TINY_FIELD_PASTE_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="searchreplace" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_SEARCH-REPLACE_DESC"
|
||||
label="PLG_TINY_FIELD_SEARCH-REPLACE_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="insertdate" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_DATE_DESC"
|
||||
label="PLG_TINY_FIELD_DATE_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="format_date" type="text"
|
||||
default="%Y-%m-%d"
|
||||
description="PLG_TINY_FIELD_DATEFORMAT_DESC"
|
||||
label="PLG_TINY_FIELD_DATEFORMAT_LABEL"
|
||||
/>
|
||||
|
||||
<field name="inserttime" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_TIME_DESC"
|
||||
label="PLG_TINY_FIELD_TIME_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="format_time" type="text"
|
||||
default="%H:%M:%S"
|
||||
description="PLG_TINY_FIELD_TIMEFORMAT_DESC"
|
||||
label="PLG_TINY_FIELD_TIMEFORMAT_LABEL"
|
||||
/>
|
||||
|
||||
<field name="colors" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_COLORS_DESC"
|
||||
label="PLG_TINY_FIELD_COLORS_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="table" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_TABLE_DESC"
|
||||
label="PLG_TINY_FIELD_TABLE_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="smilies" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_SMILIES_DESC"
|
||||
label="PLG_TINY_FIELD_SMILIES_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="media" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_MEDIA_DESC"
|
||||
label="PLG_TINY_FIELD_MEDIA_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="hr" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_HR_DESC"
|
||||
label="PLG_TINY_FIELD_HR_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="directionality" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_RTL_DESC"
|
||||
label="PLG_TINY_FIELD_RTL_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="fullscreen" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_FULLSCREEN_DESC"
|
||||
label="PLG_TINY_FIELD_FULLSCREEN_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="style" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_STYLE_DESC"
|
||||
label="PLG_TINY_FIELD_STYLE_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="layer" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_LAYER_DESC"
|
||||
label="PLG_TINY_FIELD_LAYER_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="xhtmlxtras" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_XHTMLXTRAS_DESC"
|
||||
label="PLG_TINY_FIELD_XHTMLXTRAS_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="visualchars" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_VISUALCHARS_DESC"
|
||||
label="PLG_TINY_FIELD_VISUALCHARS_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="visualblocks" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_VISUALBLOCKS_DESC"
|
||||
label="PLG_TINY_FIELD_VISUALBLOCKS_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="nonbreaking" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_NONBREAKING_DESC"
|
||||
label="PLG_TINY_FIELD_NONBREAKING_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="template" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_TEMPLATE_DESC"
|
||||
label="PLG_TINY_FIELD_TEMPLATE_LABEL"
|
||||
>
|
||||
<option value="0">JHIDE</option>
|
||||
<option value="1">JSHOW</option>
|
||||
</field>
|
||||
|
||||
<field name="blockquote" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_BLOCKQUOTE_DESC"
|
||||
label="PLG_TINY_FIELD_BLOCKQUOTE_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="wordcount" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_WORDCOUNT_DESC"
|
||||
label="PLG_TINY_FIELD_WORDCOUNT_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="spacer5" type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field name="advimage" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_ADVIMAGE_DESC"
|
||||
label="PLG_TINY_FIELD_ADVIMAGE_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="advlink" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_ADVLINK_DESC"
|
||||
label="PLG_TINY_FIELD_ADVLINK_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="advlist" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_ADVLIST_DESC"
|
||||
label="PLG_TINY_FIELD_ADVLIST_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="autosave" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_SAVEWARNING_DESC"
|
||||
label="PLG_TINY_FIELD_SAVEWARNING_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
<field name="contextmenu" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_CONTEXTMENU_DESC"
|
||||
label="PLG_TINY_FIELD_CONTEXTMENU_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
<field name="inlinepopups" type="radio"
|
||||
class="btn-group"
|
||||
default="1"
|
||||
description="PLG_TINY_FIELD_INLINEPOPUPS_DESC"
|
||||
label="PLG_TINY_FIELD_INLINEPOPUPS_LABEL"
|
||||
>
|
||||
<option value="0">JOFF</option>
|
||||
<option value="1">JON</option>
|
||||
</field>
|
||||
|
||||
<field name="spacer6" type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field name="custom_plugin" type="text"
|
||||
description="PLG_TINY_FIELD_CUSTOMPLUGIN_DESC"
|
||||
label="PLG_TINY_FIELD_CUSTOMPLUGIN_LABEL"
|
||||
/>
|
||||
|
||||
<field name="custom_button" type="text"
|
||||
description="PLG_TINY_FIELD_CUSTOMBUTTON_DESC"
|
||||
label="PLG_TINY_FIELD_CUSTOMBUTTON_LABEL"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
</fields>
|
||||
</config>
|
||||
</extension>
|
Reference in New Issue
Block a user