| Current Path : /home/wuectly/www/03cbe/ |
| Current File : /home/wuectly/www/03cbe/clipboard.tar |
config.php 0000604 00000004035 15245630476 0006534 0 ustar 00 <?php
/**
* @package JCE
* @subpackage Editor
*
* @copyright Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
class WFClipboardPluginConfig
{
public static function getConfig(&$settings)
{
$wf = WFApplication::getInstance();
$mode = $wf->getParam('clipboard.paste_cleanup_mode', 0);
$settings['paste_force_cleanup'] = true;
$settings['paste_strip_class_attributes'] = 1;
$settings['paste_remove_styles'] = true;
$settings['paste_remove_spans'] = true;
$settings['paste_remove_styles_if_webkit'] = true;
$settings['paste_remove_empty_paragraphs'] = true;
// any cleanup mode will keep the following
if ($mode) {
$settings['paste_force_cleanup'] = false; // set to detect so only Word classes are removed
$settings['paste_strip_class_attributes'] = 2; // Only remove Word classes
}
// mode 2 = keep styles (only in Word content)
if ($mode == 2) {
$settings['paste_remove_styles'] = false;
$settings['paste_remove_spans'] = false; // styles are usually applied to spans
}
$settings['clipboard_paste_text'] = $wf->getParam('clipboard.paste_text', 1, 1, 'boolean');
$settings['clipboard_paste_html'] = $wf->getParam('clipboard.paste_html', 1, 1, 'boolean');
// if paste HTML is disabled, then default to plain text paste
if ($settings['clipboard_paste_html'] === false) {
$settings['paste_plain_text'] = true;
$settings['clipboard_paste_text'] = true;
}
}
private static function cleanStringList($value)
{
$value = trim($value);
$values = explode(',', $value);
// remove whitespace
$values = array_map('trim', $values);
// remove duplicates and emtpy values
$values = array_unique(array_filter($values));
return implode(',', $values);
}
}
clipboard.xml 0000604 00000004303 15245630476 0007235 0 ustar 00 <?xml version="1.0" ?>
<extension version="3.4" type="plugin" group="jce" method="upgrade">
<name>WF_CLIPBOARD_TITLE</name>
<version>2.9.99.2</version>
<creationDate>22-04-2026</creationDate>
<author>Ryan Demmer</author>
<authorEmail>info@joomlacontenteditor.net</authorEmail>
<authorUrl>https://www.joomlacontenteditor.net/</authorUrl>
<copyright>Ryan Demmer</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<description>WF_CLIPBOARD_DESC</description>
<icon>cut,copy,paste,pastetext</icon>
<fields name="clipboard">
<fieldset name="config">
<field name="paste_cleanup_mode" type="list" default="0" label="WF_PASTE_CLEANUP_MODE" description="WF_PASTE_CLEANUP_MODE_DESC">
<option value="0">WF_PASTE_CLEANUP_MODE_CLEAN_HTML</option>
<option value="1">WF_PASTE_CLEANUP_MODE_KEEP_CLASSES</option>
<option value="2">WF_PASTE_CLEANUP_MODE_KEEP_STYLES</option>
</field>
<field name="paste_html" type="yesno" default="1" label="WF_PASTE_PARAM_PASTE_HTML" description="WF_PASTE_PARAM_PASTE_HTML_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="paste_text" type="yesno" default="1" label="WF_PASTE_PARAM_PASTE_TEXT" description="WF_PASTE_PARAM_PASTE_TEXT_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field type="heading" label="WF_PROFILES_PLUGINS_BUTTONS" />
<field name="buttons" type="buttons" multiple="multiple" default="cut,copy,paste,pastetext" label="WF_PARAM_BUTTONS" description="WF_PARAM_BUTTONS_DESC">
<option value="cut">WF_OPTION_CUT</option>
<option value="copy">WF_OPTION_COPY</option>
<option value="paste">WF_OPTION_PASTE</option>
<option value="pastetext">WF_OPTION_PASTETEXT</option>
</field>
</fieldset>
</fields>
<help>
<topic key="clipboard.about" title="WF_CLIPBOARD_HELP_ABOUT" />
</help>
<languages></languages>
</extension>