1/** 2 * jQuery initialization script for CKEditors 3 * 4 * Note: Requires jQuery 5 * 6 * 1) Define the JavaScript variable fckSettings from appropriate XSL-template 7 * If undefined, CKEditors will not be initialized 8 * 9 * fckSettings { 10 * basePath 11 * editorContainerClass 12 * customConfig - relative to basePath if basePath is defined 13 * editorHeight 14 * filebrowserBrowseUrl - relative to basePath if basePath is defined 15 * filebrowserImageBrowseUrl - relative to basePath if basePath is defined 16 * filebrowserFlashBrowseUrl - relative to basePath if basePath is defined 17 * contentsCss 18 * callback 19 * toolbar 20 * } 21 * 22 * TODO: basePath should NOT be a fckSetting, since it has no influence on the editor settings. 23 * It has only been defined to be used as shortcut when assigning settings in this script 24 * which should be done in the XSL-template instead. It has not been removed in order to 25 * not break backward compatibility with legacy XSL-templates. 26 * 27 * 28 * 29 * 2) Include this file 30 * 31 */ 32$(document).ready(function() { 33 if(!(typeof fckSettings === "undefined")) { 34 35 var settings = { 36 customConfig: (fckSettings.customConfig != undefined ? ((fckSettings.basePath != undefined ? fckSettings.basePath
36: "") + fckSettings.customConfig) : null), 37 height: fckSettings.editorHeight, 38 filebrowserBrowseUrl: (fckSettings.filebrowserBrowseUri != undefined ? ((fckSettings.basePath != undefined ? fckSettings.basePath : "") + fckSettings.filebrowserBrowseUri) : null), 39 filebrowserImageBrowseUrl: (fckSettings.filebrowserImageBrowseUri != undefined ? ((fckSettings.basePath != undefined ? fckSettings.basePath : "") + fckSettings.filebrowserImageBrowseUri) : null), 40 filebrowserFlashBrowseUrl: (fckSettings.filebrowserFlashBrowseUri != undefined ? ((fckSettings.basePath != undefined ? fckSettings.basePath : "") + fckSettings.filebrowserFlashBrowseUri) : null), 41 allowedContent: { 42 $1: { 43 elements: CKEDITOR.dtd, 44 attributes: true, 45 styles: true, 46 classes: true 47 } 48 }, 49 disallowedContent: 'img{width,height}' 50 }; 51 52 if(fckSettings.contentsCss != undefined) { 53 $.extend(settings, { contentsCss: fckSettings.contentsCss }); 54 } 55 56 if(fckSettings.toolbar != undefined) { 57 $.extend(settings, { toolbar : fckSettings.toolbar }); 58 } 59 60 if(fckSettings.callback == undefined) { 61 fckSettings.callback = function() {}; 62 } 63 64 if(fckSettings.bodyClass != undefined) { 65 $.extend(settings, { bodyClass : fckSettings.bodyClass }); 66 } 67 68 $('.' + fckSettings.editorContainerClass).ckeditor(fckSettings.callback, settings); 69 } 70});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.