Project

General

Profile

Feature #23968 ยป rtehtmlarea_feature_16281.patch

Administrator Admin, 2010-11-07 01:21

View differences:

typo3/sysext/rtehtmlarea/ext_localconf.php (copie de travail)
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['RemoveFormat']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/RemoveFormat/class.tx_rtehtmlarea_removeformat.php:&tx_rtehtmlarea_removeformat';
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['RemoveFormat']['addIconsToSkin'] = 0;
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['RemoveFormat']['disableInFE'] = 0;
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['RemoveFormat']['contextHelpFile'] = 'EXT:' . $_EXTKEY . '/extensions/RemoveFormat/locallang_csh.xml';
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['PlainText'] = array();
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['PlainText']['objectReference'] = 'EXT:'.$_EXTKEY.'/extensions/PlainText/class.tx_rtehtmlarea_plaintext.php:&tx_rtehtmlarea_plaintext';
$TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['PlainText']['addIconsToSkin'] = 0;
typo3/sysext/rtehtmlarea/ext_tables.php (copie de travail)
t3lib_extMgm::addStaticFile($_EXTKEY,'static/clickenlarge/','Clickenlarge Rendering');
$TCA['tx_rtehtmlarea_acronym'] = Array (
'ctrl' => Array (
'title' => 'LLL:EXT:rtehtmlarea/locallang_db.xml:tx_rtehtmlarea_acronym',
'label' => 'term',
'default_sortby' => 'ORDER BY term',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => Array (
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
'ctrl' => Array (
'title' => 'LLL:EXT:rtehtmlarea/locallang_db.xml:tx_rtehtmlarea_acronym',
'label' => 'term',
'default_sortby' => 'ORDER BY term',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => Array (
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'extensions/Acronym/skin/images/acronym.gif',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'extensions/Acronym/skin/images/acronym.gif',
)
);
t3lib_extMgm::allowTableOnStandardPages('tx_rtehtmlarea_acronym');
// Add contextual help files
foreach ($TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins'] as $pluginName => $config) {
if ($config['contextHelpFile']) {
t3lib_extMgm::addLLrefForTCAdescr('xEXT_' . $_EXTKEY . '_' . $pluginName, $TYPO3_CONF_VARS['EXTCONF'][$_EXTKEY]['plugins']['RemoveFormat']['contextHelpFile']);
}
}
?>
typo3/sysext/rtehtmlarea/extensions/RemoveFormat/locallang_csh.xml (r?vision 0)
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<description>CSH for Remove Format Extension of htmlArea RTE</description>
<type>CSH</type>
<csh_table>xEXT_rtehtmlarea_RemoveFormat</csh_table>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index=".alttitle">htmlArea RTE &gt; Remove Format</label>
<label index=".description">The Remove Format feature offers options for cleaning up the HTML markup of the text being edited.</label>
<label index=".details">This feature may be useful in order to clean up text that was copied from some external source and pasted into the editing area.
The feature is accessed by clicking on the "Remove format" button in the editor tool bar.
In the dialogue window that opens when the button is clicked:
- First, select the area to be cleaned;
- Second, choose the format removal options that you wish to be applied to the selected area;
- Press the OK button for the format removal operation to be performed. The dialogue window will be automatically closed.</label>
<label index=".image">EXT:rtehtmlarea/extensions/RemoveFormat/skin/images/remove-format.gif</label>
<label index=".image_descr">Remove format icon in the editor tool bar.</label>
<label index=".seeAlso">xEXT_rtehtmlarea_RemoveFormat:area,xEXT_rtehtmlarea_RemoveFormat:options</label>
<label index="area.alttitle">Select the area to be cleaned</label>
<label index="area.description">The format removal operation may be applied either to the currently highlighted text or to the whole contents of the editing area.</label>
<label index="area.details">Use one of these two radio buttons to select the area to which you wish to apply the format removal operation.</label>
<label index="selection.alttitle">Remove format on selected text only</label>
<label index="selection.description">Select this option to perform the format removal operation on the currently selected text only.</label>
<label index="_selection.seeAlso">xEXT_rtehtmlarea_RemoveFormat:area</label>
<label index="all.alttitle">Remove format on all contents</label>
<label index="all.description">Select this option to perform the format removal operation on the whole contents of the editing area.</label>
<label index="_all.seeAlso">xEXT_rtehtmlarea_RemoveFormat:area</label>
<label index="options.alttitle">Select the types of format to be removed</label>
<label index="options.description">The format removal operation may remove various types of format.</label>
<label index="options.details">Check one or more of these check boxes to select the type(s) of format you wish to be removed.</label>
<label index="options.seeAlso">xEXT_rtehtmlarea_RemoveFormat:htmlFormat,xEXT_rtehtmlarea_RemoveFormat:msWordFormat,xEXT_rtehtmlarea_RemoveFormat:typographicalPunctuation,xEXT_rtehtmlarea_RemoveFormat:nonBreakingSpace,xEXT_rtehtmlarea_RemoveFormat:images,xEXT_rtehtmlarea_RemoveFormat:allHtml</label>
<label index="htmlFormat.alttitle">Remove all HTML inline markup and style</label>
<label index="htmlFormat.description">Check this option if you wish to remove all HTML inline markup and style.</label>
<label index="htmlFormat.details">This option removes:
- the following HTML elements, but keeps their textual contents: abbr, acronym, b, big, cite, code, em, font, i, q, s, samp, small, span, strike, strong, sub, sup, tt, u, var;
- the following attributes on all HTML elements: align, bgcolor, cellpadding, cellspacing, class, frame, style.</label>
<label index="msWordFormat.alttitle">Remove all MS Word markup and style</label>
<label index="msWordFormat.description">Check this option if you wish to remove all MS Word markup and style.</label>
<label index="msWordFormat.details">This option removes:
- all attributes on the following elements: b, em, i, li, p, strong, ul;
- the following attributes on all HTML elements: align, class, style;
- the following elements, but keeps their textual contents: div, link, meta, span, any element containing ":" in its name;
- the following elements and their contents: style, title;
- HTML comments;
- the following elements whenever they have no textual contents: b, big, i, s, small, strike, tt, u;
- double opening and double closing tags;
- multiples spaces, replacing them by single spaces.</label>
<label index="typographicalPunctuation.alttitle">Replace typographical punctuation</label>
<label index="typographicalPunctuation.description">Check this option if you wish to replace typographical punctuation with ASCII character codes.</label>
<label index="typographicalPunctuation.details">This option replaces typographical punctuation entities with ASCII character codes. The following substitutions are performed:
- replace horizontal ellipsis with three periods;
- replace en-dash and em-dash with hyphen;
- replace double low-9, left double and right double quotation mark with double quote;
- replace left single, right single and single low-9 quotation mark with single quote;
- replace single left/right-pointing angle quotation mark with single quote;
- replace left/right-pointing double angle quotation mark (also known as left/right pointing guillemet) with double quote;
- replace grave accent (spacing grave) and acute accent (spacing acute) with single quote.</label>
<label index="nonBreakingSpace.alttitle">Replace non-breaking spaces</label>
<label index="nonBreakingSpace.description">Check this option if you wish to replace non-breaking spaces with normal spaces.</label>
<label index="nonBreakingSpace.details">This option replaces any non-breaking space with a simple normal space.</label>
<label index="images.alttitle">Remove images</label>
<label index="images.description">Check this option if you wish to remove all images.</label>
<label index="images.details">This option removes all images from the selected text.</label>
<label index="allHtml.alttitle">Remove all HTML format</label>
<label index="allHtml.description">Check this option if you wish to remove all HTML format.</label>
<label index="allHtml.details">This option removes all HTML markup from the selected text.</label>
</languageKey>
</data>
</T3locallang>
typo3/sysext/rtehtmlarea/extensions/RemoveFormat/skin/htmlarea.css (copie de travail)
/* Selectors for the RemoveFormat plugin of htmlArea RTE */
/* TYPO3 SVN ID: $Id$ */
.htmlarea-action-remove-format {
background-image: url('images/clean.gif') !important;
background-image: url('images/remove-format.gif') !important;
background-position: 0 0 !important;
}
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail)
return (function(arg1, arg2, arg3) {
return (self[functionName](arg1, arg2, arg3));});
},
/**
* Localize a string
*
......
return this.I18N[label] || HTMLArea.localize(label);
},
/**
* Get localized label wrapped with contextual help markup when available
*
* @param string fieldName: the name of the field in the CSH file
* @param string label: the name of the label to localize
* @param string pluginName: overrides this.name
*
* @return string localized label with CSH markup
*/
getHelpTip: function (fieldName, label, pluginName) {
if (Ext.isDefined(TYPO3.ContextHelp)) {
var pluginName = Ext.isDefined(pluginName) ? pluginName : this.name;
return '<a class="t3-help-link" href="#" data-table="xEXT_rtehtmlarea_' + pluginName + '" data-field="' + fieldName + '"><abbr class="t3-help-teaser">' + this.localize(label) + '</abbr></a>';
} else {
return this.localize(label);
}
},
/**
* Initiate context help listening on the dialogue window
* This is normally specified as render handler of the window
*
* @return void
*/
enableContextHelp: function () {
if (Ext.isDefined(TYPO3.ContextHelp) && Ext.isFunction(TYPO3.ContextHelp.openHelpWindow)) {
Ext.select('div').on('click', TYPO3.ContextHelp.openHelpWindow, TYPO3.ContextHelp, {delegate: 'a.t3-help-link'});
}
},
/**
* Load a Javascript file asynchronously
*
* @param string url: url of the file to load
typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/locallang.xml (copie de travail)
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="RemoveFormatTooltip">Remove formatting</label>
<label index="RemoveFormatTooltip">Remove format</label>
<label index="Cleaning Area">Cleaning Area</label>
<label index="Selection">Selection</label>
<label index="Selection">Selected text</label>
<label index="All">All</label>
<label index="Remove formatting">Remove formatting</label>
<label index="Cleaning options">Type of formatting to remove</label>
<label index="Formatting:">HTML Formatting:</label>
<label index="MS Word Formatting:">MS Word Formatting:</label>
<label index="Remove formatting">Remove format</label>
<label index="Cleaning options">Type(s) of format to remove</label>
<label index="Formatting:">HTML Format:</label>
<label index="MS Word Formatting:">MS Word Format:</label>
<label index="Typographical punctuation:">Typographical punctuation:</label>
<label index="Spaces">Non-breaking spaces:</label>
<label index="Images:">Images:</label>
<label index="All HTML:">All HTML tags:</label>
<label index="Select the type of formatting you wish to remove.">Select the type of formatting to remove.</label>
<label index="Select the type of formatting you wish to remove.">Select the type(s) of format to remove.</label>
<label index="OK">OK</label>
<label index="Cancel">Cancel</label>
</languageKey>
typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js (copie de travail)
copyrightOwner : 'Stanislas Rolland',
sponsor : 'SJBR',
sponsorUrl : 'http://www.sjbr.ca/',
license : 'GPL'
license : 'GPL',
hasHelp : true
};
this.registerPluginInformation(pluginInformation);
/*
......
*/
openDialogue: function (buttonId, title, dimensions) {
this.dialog = new Ext.Window({
title: this.localize(title),
title: this.getHelpTip('', title),
cls: 'htmlarea-window',
border: false,
width: dimensions.width,
......
resizable: !Ext.isIE,
iconCls: this.getButton(buttonId).iconCls,
listeners: {
render: {
fn: this.enableContextHelp
},
close: {
fn: this.onClose,
scope: this
......
},
items: [{
xtype: 'fieldset',
title: this.localize('Cleaning Area'),
title: this.getHelpTip('area', 'Cleaning Area'),
defaultType: 'radio',
labelWidth: 140,
defaults: {
......
},
items: [{
itemId: 'selection',
fieldLabel: this.localize('Selection'),
fieldLabel: this.getHelpTip('selection', 'Selection'),
name: 'htmlarea-removeFormat-area'
},{
itemId: 'allContent',
fieldLabel: this.localize('All'),
fieldLabel: this.getHelpTip('all', 'All'),
checked: true,
name: 'htmlarea-removeFormat-area'
}
......
},{
xtype: 'fieldset',
defaultType: 'checkbox',
title: this.localize('Cleaning options'),
title: this.getHelpTip('options', 'Cleaning options'),
labelWidth: 170,
defaults: {
labelSeparator: ''
},
items: [{
itemId: 'formatting',
fieldLabel: this.localize('Formatting:')
fieldLabel: this.getHelpTip('htmlFormat', 'Formatting:')
},{
itemId: 'msWordFormatting',
fieldLabel: this.localize('MS Word Formatting:'),
fieldLabel: this.getHelpTip('msWordFormat', 'MS Word Formatting:'),
checked: true
},{
itemId: 'typographical',
fieldLabel: this.localize('Typographical punctuation:')
fieldLabel: this.getHelpTip('typographicalPunctuation', 'Typographical punctuation:')
},{
itemId: 'spaces',
fieldLabel: this.localize('Spaces')
fieldLabel: this.getHelpTip('nonBreakingSpace', 'Spaces')
},{
itemId: 'images',
fieldLabel: this.localize('Images:')
fieldLabel: this.getHelpTip('images', 'Images:')
},{
itemId: 'allHtml',
fieldLabel: this.localize('All HTML:')
fieldLabel: this.getHelpTip('allHtml', 'All HTML:')
}
]
}
......
// Replace double low-9 / left double / right double quotation mark with double quote
SrcCd = String.fromCharCode(8222) + '|' + String.fromCharCode(8220) + '|' + String.fromCharCode(8221);
html = html.replace(new RegExp(SrcCd, 'g'), '"');
// Replace left single / right single / single low-9 quotation mark with sigle quote
// Replace left single / right single / single low-9 quotation mark with single quote
SrcCd = String.fromCharCode(8216) + '|' + String.fromCharCode(8217) + '|' + String.fromCharCode(8218);
html = html.replace(new RegExp(SrcCd, 'g'), "'");
// Replace single left/right-pointing angle quotation mark with single quote
typo3/sysext/rtehtmlarea/htmlarea/skins/default/htmlarea.css (copie de travail)
body.ext-ie6 .htmlarea-window .x-panel-icon {
background-image: url("images/sprites/actions.gif");
}
.htmlarea-window .x-window-header .t3-help-link {
color: #fff;
}
.htmlarea-window ul.x-tab-strip {
list-style: none;
}
typo3/sysext/t3skin/rtehtmlarea/htmlarea.css (copie de travail)
body.ext-ie6 .htmlarea-window .x-panel-icon {
background-image: url("images/sprites/actions.gif");
}
.htmlarea-window .x-window-header .t3-help-link {
color: #fff;
}
.htmlarea-window ul.x-tab-strip {
list-style: none;
}
    (1-1/1)