RichEditors = new Object(); RichEditors.edit = null; // Define which plugins we're gonna use ... RichEditors.plugins = [ 'ContextMenu', 'ImageManager', 'SpellChecker' ]; // Configure stuff! RichEditors.config = new HTMLArea.Config(); RichEditors.config.killWordOnPaste = true; RichEditors.config.width = '100%'; RichEditors.config.height = '415px'; RichEditors.config.flowToolbars = false; RichEditors.config.toolbar = [ ["separator","formatblock","fontname","fontsize"], ["separator","bold","italic","underline","strikethrough"], ["separator","justifyleft","justifycenter","justifyright","justifyfull"], ["separator","forecolor","hilitecolor"], ["linebreak"], ["separator","subscript","superscript"], ["separator","htmlmode"], ["separator","insertorderedlist","insertunorderedlist","outdent","indent"], ["separator","inserthorizontalrule","createlink","insertimage"], ["separator","undo","redo","selectall","print"], ["separator","removeformat","toggleborders","splitblock"] ]; RichEditors.config.fontname = { "— Choose Font —": '', "Arial": 'arial,helvetica,sans-serif', "Courier New": 'courier new,courier,monospace', "Georgia": 'georgia,times new roman,times,serif', "Tahoma": 'tahoma,arial,helvetica,sans-serif', "Times New Roman": 'times new roman,times,serif', "Verdana": 'verdana,arial,helvetica,sans-serif' }; RichEditors.config.fontsize = { "— Choose Font Size —" : "", "1 (8 pt)" : "1", "2 (10 pt)": "2", "3 (12 pt)": "3", "4 (14 pt)": "4", "5 (18 pt)": "5", "6 (24 pt)": "6", "7 (36 pt)": "7" }; RichEditors.config.formatblock = { "— Choose Format —" : "", "Heading 2": "h2", "Heading 3": "h3", "Heading 4": "h4", "Heading 5": "h5", "Heading 6": "h6", "Normal" : "p", "Address" : "address", "Formatted": "pre" }; RichEditors.config.panel_dimensions = { left: '125px', right: '125px', top: '100px', bottom: '100px' }; function initRichEditors() { // Load the plugins if(!HTMLArea.loadPlugins(RichEditors.plugins, initRichEditors)) { return; } with(RichEditors.config.ImageManager) { backend_data = { 'backend_data[data]': 'a:2:\x7Bs:10:\x22images_dir\x22;s:66:\x22/home/rbbassn/web/sites/redbankbusinessassociation.com/files/xinha\x22;s:10:\x22images_url\x22;s:8:\x22/ximages\x22;\x7D', 'backend_data[session_name]': 'PHPSESSID', 'backend_data[key_location]': 'Xinha:BackendKey', 'backend_data[hash]': 'e3c174ded790cd5c43abe2008832c79c45e8f9ec', PHPSESSID: 'a946602df0c7b64133dc2168dee57788' }; } // Start 'em up! RichEditors.editors = HTMLArea.makeEditors(RichEditors.editors, RichEditors.config, RichEditors.plugins); HTMLArea.startEditors(RichEditors.editors); } Event.observe(window, 'load', function() { RichEditors.editors = new Array(); $A($$('textarea.xinha')).each(function(xa) { RichEditors.editors.push(xa.id); }); if (RichEditors.editors.length > 0) { initRichEditors(); } });