// APC-AA javascript functions for HTMLArea
xinha_editors = null;
xinha_config = null;
xinha_plugins = null;
/** Start all the htmlareas, which are listed in htmlareas array */
function xinha_init() {
// What are the plugins you will be using in the editors on this page.
// List all the plugins you will need, even if not all the editors will
// use all the plugins.
//
// FullScreen plugin is loaded automaticaly,
// EnterParagraphs is loaded for all gecko based browsers
// (acordingly on mozParaHandler variable)
//
// xinha_plugins = ['TableOperations', 'ImageManager', 'InsertFile', 'CSS', 'InsertAnchor', 'EditTag', 'ContextMenu', 'FindReplace', 'InsertWords', 'Stylist'];
xinha_plugins = ['TableOperations', 'ImageManager', 'InsertFile', 'InsertAnchor'];
// THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :)
if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return;
// The names of the textareas turning into editors
xinha_editors = htmlareas; // ['myTextArea'];
// Default configuration to be used by all the editors.
// (later you will be able to change the defaults for specified textareas
//
// If you want to modify the default config you might do something like this
// xinha_config = new HTMLArea.Config();
// xinha_config.width = 640;
// xinha_config.height = 420;
xinha_config = new HTMLArea.Config();
// Create editors for the textareas. You can do this in two ways, either:
//
// xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
//
// if you want all the editors to use the same plugins, OR:
//
// xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config);
// xinha_editors['myTextArea'].registerPlugins(['Stylist','FullScreen']);
// xinha_editors['anotherOne'].registerPlugins(['CSS','SuperClean']);
//
// if you want to use a different plugins for editors
xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins);
// If you want to change the configuration variables of any of the editors,
// this is the place to do that. For example you might want to change
// the width and height of one of the editors, like this...
//
// xinha_editors.myTextArea.config.width = 640;
// xinha_editors.myTextArea.config.height = 480;
// "start" the editors: turns the textareas into Xinha editors
HTMLArea.startEditors(xinha_editors);
window.onload = null;
}
function switchHTML(name) {
elem = document.getElementById(name+"html");
//elem = document.inputform.eval(name+"html");
if ( elem != null ) {
for (i=0; i