Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64
Your IP : 3.144.89.197
/**
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
CKEDITOR.config.allowedContent = true;
config.templates_replaceContent = false;
config.filebrowserBrowseUrl = '/xsl/kcfinder/browse.php?type=files';
config.filebrowserImageBrowseUrl = '/xsl/kcfinder/browse.php?type=images';
config.filebrowserFlashBrowseUrl = '/xsl/kcfinder/browse.php?type=flash';
config.filebrowserUploadUrl = '/xsl/kcfinder/upload.php?type=files';
config.filebrowserImageUploadUrl = '/xsl/kcfinder/upload.php?type=images';
config.filebrowserFlashUploadUrl = '/xsl/kcfinder/upload.php?type=flash';
config.extraPlugins = 'collapse,readmore,tabz,formulaire,youtube';
config.extraAllowedContent = 'br(*)';
config.fillEmptyBlocks = false;
config.basicEntities = false;
config.entities = false;
};
/* *********************************************** */
CKEDITOR.on('instanceReady', function (ev) {
// Ends self closing tags the HTML4 way, like <br>.
ev.editor.dataProcessor.htmlFilter.addRules(
{
elements:
{
$: function (element) {
// Output dimensions of images as width and height
if (element.name == 'img') {
var style = element.attributes.style;
if (style) {
// Get the width from the style.
var match = /(?:^|\s)width\s*:\s*(\d+)px/i.exec(style),
width = match && match[1];
// Get the height from the style.
match = /(?:^|\s)height\s*:\s*(\d+)px/i.exec(style);
var height = match && match[1];
if (width) {
element.attributes.style = element.attributes.style.replace(/(?:^|\s)width\s*:\s*(\d+)px;?/i, '');
element.attributes.width = width;
}
if (height) {
element.attributes.style = element.attributes.style.replace(/(?:^|\s)height\s*:\s*(\d+)px;?/i, '');
element.attributes.height = height;
}
}
}
if (!element.attributes.style)
delete element.attributes.style;
return element;
}
}
});
});
/* *********************************************** */
|