]*|'[^']*'|"[^"]*")*)>/g; // this will match tags, but still doesn't handle container tags (textarea, comments, etc)
+ contents = contents.replace(matchTag, filterTag);
+
+ // update output with filtered content
+ document.all[objname].value = contents;
+
+}
+
+/* ---------------------------------------------------------------------- *\
+ Function : editor_setmode
+ Description : change mode between WYSIWYG and HTML editor
+ Usage : editor_setmode(objname, mode);
+ Arguments : objname - button id string with editor and action name
+ mode - init, textedit, or wysiwyg
+\* ---------------------------------------------------------------------- */
+
+function editor_setmode(objname, mode) {
+ var config = document.all[objname].config;
+ var editor_obj = document.all["_" +objname + "_editor"];
+
+ // wait until document is fully loaded
+ if (document.readyState != 'complete') {
+ setTimeout(function() { editor_setmode(objname,mode) }, 25);
+ return;
+ }
+
+ // define different editors
+ var TextEdit = '';
+ var RichEdit = '';
+
+ //
+ // Switch to TEXTEDIT mode
+ //
+
+ if (mode == "textedit" || editor_obj.tagName.toLowerCase() == 'iframe') {
+ var editdoc = editor_obj.contentWindow.document;
+ var contents = editdoc.body.createTextRange().htmlText;
+ editor_obj.outerHTML = TextEdit;
+ editor_obj = document.all["_" +objname + "_editor"];
+ editor_obj.value = contents;
+ editor_event(objname);
+
+ editor_updateToolbar(objname, "disable"); // disable toolbar items
+
+ // set event handlers
+ editor_obj.onkeypress = function() { editor_event(objname); }
+ editor_obj.onkeyup = function() { editor_event(objname); }
+ editor_obj.onmouseup = function() { editor_event(objname); }
+ editor_obj.ondrop = function() { editor_event(objname, 100); } // these events fire before they occur
+ editor_obj.oncut = function() { editor_event(objname, 100); }
+ editor_obj.onpaste = function() { editor_event(objname, 100); }
+ editor_obj.onblur = function() { editor_event(objname, -1); }
+
+ editor_updateOutput(objname);
+ editor_focus(editor_obj);
+ }
+
+ //
+ // Switch to WYSIWYG mode
+ //
+
+ else {
+
+ var contents = editor_obj.value;
+ if (mode == 'init') { contents = document.all[objname].value; } // on init use original textarea content
+
+ // create editor
+ editor_obj.outerHTML = RichEdit;
+ editor_obj = document.all["_" +objname + "_editor"];
+
+ // get iframe document object
+
+ // create editor contents (and default styles for editor)
+ var html = "";
+ html += '\n';
+ if (config.stylesheet) {
+ html += '\n';
+ }
+ html += '\n'
+ + '\n'
+ + ''
+ + contents
+ + '\n'
+ + '\n';
+
+ // write to editor window
+ var editdoc = editor_obj.contentWindow.document;
+ editdoc.open();
+ editdoc.write(html);
+ editdoc.close();
+
+ editor_updateToolbar(objname, "enable"); // enable toolbar items
+
+ // store objname under editdoc
+ editdoc.objname = objname;
+
+ // set event handlers
+ editdoc.onkeypress = function() { editor_event(objname); }
+ editdoc.onkeyup = function() { editor_event(objname); }
+ editdoc.onmouseup = function() { editor_event(objname); }
+ editdoc.body.ondrop = function() { editor_event(objname, 100); } // these events fire before they occur
+ editdoc.body.oncut = function() { editor_event(objname, 100); }
+ editdoc.body.onpaste = function() { editor_event(objname, 100); }
+ editdoc.body.onblur = function() { editor_event(objname, -1); }
+
+ // bring focus to editor
+ if (mode != 'init') { // don't focus on page load, only on mode switch
+ editor_focus(editor_obj);
+ }
+
+ }
+
+ // Call update UI
+ if (mode != 'init') { // don't update UI on page load, only on mode switch
+ editor_event(objname);
+ }
+
+}
+
+/* ---------------------------------------------------------------------- *\
+ Function : editor_focus
+ Description : bring focus to the editor
+ Usage : editor_focus(editor_obj);
+ Arguments : editor_obj - editor object
+\* ---------------------------------------------------------------------- */
+
+function editor_focus(editor_obj) {
+
+ // check editor mode
+ if (editor_obj.tagName.toLowerCase() == 'textarea') { // textarea
+ var myfunc = function() { editor_obj.focus(); };
+ setTimeout(myfunc,100); // doesn't work all the time without delay
+ }
+
+ else { // wysiwyg
+ var editdoc = editor_obj.contentWindow.document; // get iframe editor document object
+ var editorRange = editdoc.body.createTextRange(); // editor range
+ var curRange = editdoc.selection.createRange(); // selection range
+
+ if (curRange.length == null && // make sure it's not a controlRange
+ !editorRange.inRange(curRange)) { // is selection in editor range
+ editorRange.collapse(); // move to start of range
+ editorRange.select(); // select
+ curRange = editorRange;
+ }
+ }
+
+}
+
+/* ---------------------------------------------------------------------- *\
+ Function : editor_about
+ Description : display "about this editor" popup
+\* ---------------------------------------------------------------------- */
+
+function editor_about(objname) {
+ showModalDialog(_editor_url + "popups/about.html", window, "resizable: yes; help: no; status: no; scroll: no; ");
+}
+
+/* ---------------------------------------------------------------------- *\
+ Function : _dec_to_rgb
+ Description : convert dec color value to rgb hex
+ Usage : var hex = _dec_to_rgb('65535'); // returns FFFF00
+ Arguments : value - dec value
+\* ---------------------------------------------------------------------- */
+
+function _dec_to_rgb(value) {
+ var hex_string = "";
+ for (var hexpair = 0; hexpair < 3; hexpair++) {
+ var byte = value & 0xFF; // get low byte
+ value >>= 8; // drop low byte
+ var nybble2 = byte & 0x0F; // get low nybble (4 bits)
+ var nybble1 = (byte >> 4) & 0x0F; // get high nybble
+ hex_string += nybble1.toString(16); // convert nybble to hex
+ hex_string += nybble2.toString(16); // convert nybble to hex
+ }
+ return hex_string.toUpperCase();
+}
+
+/* ---------------------------------------------------------------------- *\
+ Function : editor_insertHTML
+ Description : insert string at current cursor position in editor. If
+ two strings are specifed, surround selected text with them.
+ Usage : editor_insertHTML(objname, str1, [str2], reqSelection)
+ Arguments : objname - ID of textarea
+ str1 - HTML or text to insert
+ str2 - HTML or text to insert (optional argument)
+ reqSelection - (1 or 0) give error if no text selected
+\* ---------------------------------------------------------------------- */
+
+function editor_insertHTML(objname, str1,str2, reqSel) {
+ var config = document.all[objname].config;
+ var editor_obj = document.all["_" +objname + "_editor"]; // editor object
+ if (str1 == null) { str1 = ''; }
+ if (str2 == null) { str2 = ''; }
+
+ // for non-wysiwyg capable browsers just add to end of textbox
+ if (document.all[objname] && editor_obj == null) {
+ document.all[objname].focus();
+ document.all[objname].value = document.all[objname].value + str1 + str2;
+ return;
+ }
+
+ // error checking
+ if (editor_obj == null) { return alert("Unable to insert HTML. Invalid object name '" +objname+ "'."); }
+
+ editor_focus(editor_obj);
+
+ var tagname = editor_obj.tagName.toLowerCase();
+ var sRange;
+
+ // insertHTML for wysiwyg iframe
+ if (tagname == 'iframe') {
+ var editdoc = editor_obj.contentWindow.document;
+ sRange = editdoc.selection.createRange();
+ var sHtml = sRange.htmlText;
+
+ // check for control ranges
+ if (sRange.length) { return alert("Unable to insert HTML. Try highlighting content instead of selecting it."); }
+
+ // insert HTML
+ var oldHandler = window.onerror;
+ window.onerror = function() { alert("Unable to insert HTML for current selection."); return true; } // partial table selections cause errors
+ if (sHtml.length) { // if content selected
+ if (str2) { sRange.pasteHTML(str1 +sHtml+ str2) } // surround
+ else { sRange.pasteHTML(str1); } // overwrite
+ } else { // if insertion point only
+ if (reqSel) { return alert("Unable to insert HTML. You must select something first."); }
+ sRange.pasteHTML(str1 + str2); // insert strings
+ }
+ window.onerror = oldHandler;
+ }
+
+ // insertHTML for plaintext textarea
+ else if (tagname == 'textarea') {
+ editor_obj.focus();
+ sRange = document.selection.createRange();
+ var sText = sRange.text;
+
+ // insert HTML
+ if (sText.length) { // if content selected
+ if (str2) { sRange.text = str1 +sText+ str2; } // surround
+ else { sRange.text = str1; } // overwrite
+ } else { // if insertion point only
+ if (reqSel) { return alert("Unable to insert HTML. You must select something first."); }
+ sRange.text = str1 + str2; // insert strings
+ }
+ }
+ else { alert("Unable to insert HTML. Unknown object tag type '" +tagname+ "'."); }
+
+ // move to end of new content
+ sRange.collapse(false); // move to end of range
+ sRange.select(); // re-select
+
+}
+
+/* ---------------------------------------------------------------- */
+
+function _isMouseOver(obj,event) { // determine if mouse is over object
+ var mouseX = event.clientX;
+ var mouseY = event.clientY;
+
+ var objTop = obj.offsetTop;
+ var objBottom = obj.offsetTop + obj.offsetHeight;
+ var objLeft = obj.offsetLeft;
+ var objRight = obj.offsetLeft + obj.offsetWidth;
+
+ if (mouseX >= objLeft && mouseX <= objRight &&
+ mouseY >= objTop && mouseY <= objBottom) { return true; }
+
+ return false;
+}
+
+/* ---------------------------------------------------------------- */
+
+function editor_cMenu_generate(editorWin,objname) {
+ var parentWin = window;
+ editorWin.event.returnValue = false; // cancel default context menu
+
+ // define content menu options
+ var cMenuOptions = [ // menu name, shortcut displayed, javascript code
+ ['Cut', 'Ctrl-X', function() {}],
+ ['Copy', 'Ctrl-C', function() {}],
+ ['Paste', 'Ctrl-C', function() {}],
+ ['Delete', 'DEL', function() {}],
+ ['---', null, null],
+ ['Select All', 'Ctrl-A', function() {}],
+ ['Clear All', '', function() {}],
+ ['---', null, null],
+ ['About this editor...', '', function() {
+ alert("about this editor");
+ }]];
+ editor_cMenu.options = cMenuOptions; // save options
+
+ // generate context menu
+ var cMenuHeader = ''
+ + '';
+
+ for (var menuIdx in editor_cMenu.options) {
+ var menuName = editor_cMenu.options[menuIdx][0];
+ var menuKey = editor_cMenu.options[menuIdx][1];
+ var menuCode = editor_cMenu.options[menuIdx][2];
+
+ // separator
+ if (menuName == "---" || menuName == "separator") {
+ cMenuList += '
';
+ }
+
+ // menu option
+ else {
+ cMenuList += '';
+ }
+ }
+
+ var cMenuHTML = cMenuHeader + cMenuList + cMenuFooter;
+
+
+ document.all['_'+objname+'_cMenu'].outerHTML = cMenuHTML;
+
+ editor_cMenu_setPosition(parentWin, editorWin, objname);
+
+ parentWin['_'+objname+'_cMenu'].style.visibility = 'visible';
+ parentWin['_'+objname+'_cMenu'].focus();
+
+}
+
+/* ---------------------------------------------------------------- */
+
+function editor_cMenu_setPosition(parentWin, editorWin, objname) { // set object position that won't overlap window edge
+ var event = editorWin.event;
+ var cMenuObj = parentWin['_'+objname+'_cMenu'];
+ var mouseX = event.clientX + parentWin.document.all['_'+objname+'_editor'].offsetLeft;
+ var mouseY = event.clientY + parentWin.document.all['_'+objname+'_editor'].offsetTop;
+ var cMenuH = cMenuObj.offsetHeight;
+ var cMenuW = cMenuObj.offsetWidth;
+ var pageH = document.body.clientHeight + document.body.scrollTop;
+ var pageW = document.body.clientWidth + document.body.scrollLeft;
+
+ // set horzontal position
+ if (mouseX + 5 + cMenuW > pageW) { var left = mouseX - cMenuW - 5; } // too far right
+ else { var left = mouseX + 5; }
+
+ // set vertical position
+ if (mouseY + 5 + cMenuH > pageH) { var top = mouseY - cMenuH + 5; } // too far down
+ else { var top = mouseY + 5; }
+
+ cMenuObj.style.top = top;
+ cMenuObj.style.left = left;
+
+}
+
+/* ---------------------------------------------------------------- */
+
+function editor_cMenu(obj,menuIdx,objname) {
+ var action = event.type;
+ if (action == "mouseover" && !obj.disabled && obj.tagName.toLowerCase() == 'tr') {
+ obj.className = 'cMenuOver';
+ for (var i=0; i < obj.cells.length; i++) { obj.cells[i].className = 'cMenuOver'; }
+ }
+ else if (action == "mouseout" && !obj.disabled && obj.tagName.toLowerCase() == 'tr') {
+ obj.className = 'cMenu';
+ for (var i=0; i < obj.cells.length; i++) { obj.cells[i].className = 'cMenu'; }
+ }
+ else if (action == "click" && !obj.disabled) {
+ document.all['_'+objname+'_cMenu'].style.visibility = "hidden";
+ var menucode = editor_cMenu.options[menuIdx][2];
+ menucode();
+ }
+ else if (action == "blur") {
+ if (!_isMouseOver(obj,event)) { obj.style.visibility = 'hidden'; }
+ else {
+ if (obj.style.visibility != "hidden") { obj.focus(); }
+ }
+ }
+ else { alert("editor_cMenu, unknown action: " + action); }
+}
+
+/* ---------------------------------------------------------------------- */
diff --git a/www/extras/htmlArea/example.html b/www/extras/htmlArea/example.html
new file mode 100644
index 000000000..1dcee7b2f
--- /dev/null
+++ b/www/extras/htmlArea/example.html
@@ -0,0 +1,148 @@
+htmlArea Example
+
+
+
+
+
+
+
+
+
+
diff --git a/www/extras/htmlArea/images/ed_about.gif b/www/extras/htmlArea/images/ed_about.gif
new file mode 100644
index 000000000..d476271df
Binary files /dev/null and b/www/extras/htmlArea/images/ed_about.gif differ
diff --git a/www/extras/htmlArea/images/ed_align_center.gif b/www/extras/htmlArea/images/ed_align_center.gif
new file mode 100644
index 000000000..09669101a
Binary files /dev/null and b/www/extras/htmlArea/images/ed_align_center.gif differ
diff --git a/www/extras/htmlArea/images/ed_align_left.gif b/www/extras/htmlArea/images/ed_align_left.gif
new file mode 100644
index 000000000..595eef60c
Binary files /dev/null and b/www/extras/htmlArea/images/ed_align_left.gif differ
diff --git a/www/extras/htmlArea/images/ed_align_right.gif b/www/extras/htmlArea/images/ed_align_right.gif
new file mode 100644
index 000000000..514a5e45c
Binary files /dev/null and b/www/extras/htmlArea/images/ed_align_right.gif differ
diff --git a/www/extras/htmlArea/images/ed_blank.gif b/www/extras/htmlArea/images/ed_blank.gif
new file mode 100644
index 000000000..d7ae40671
Binary files /dev/null and b/www/extras/htmlArea/images/ed_blank.gif differ
diff --git a/www/extras/htmlArea/images/ed_charmap.gif b/www/extras/htmlArea/images/ed_charmap.gif
new file mode 100644
index 000000000..b0dc889d7
Binary files /dev/null and b/www/extras/htmlArea/images/ed_charmap.gif differ
diff --git a/www/extras/htmlArea/images/ed_color_bg.gif b/www/extras/htmlArea/images/ed_color_bg.gif
new file mode 100644
index 000000000..f6ff05d0d
Binary files /dev/null and b/www/extras/htmlArea/images/ed_color_bg.gif differ
diff --git a/www/extras/htmlArea/images/ed_color_fg.gif b/www/extras/htmlArea/images/ed_color_fg.gif
new file mode 100644
index 000000000..90e5123c4
Binary files /dev/null and b/www/extras/htmlArea/images/ed_color_fg.gif differ
diff --git a/www/extras/htmlArea/images/ed_copy.gif b/www/extras/htmlArea/images/ed_copy.gif
new file mode 100644
index 000000000..f598fa21a
Binary files /dev/null and b/www/extras/htmlArea/images/ed_copy.gif differ
diff --git a/www/extras/htmlArea/images/ed_custom.gif b/www/extras/htmlArea/images/ed_custom.gif
new file mode 100644
index 000000000..3c406a5e6
Binary files /dev/null and b/www/extras/htmlArea/images/ed_custom.gif differ
diff --git a/www/extras/htmlArea/images/ed_cut.gif b/www/extras/htmlArea/images/ed_cut.gif
new file mode 100644
index 000000000..92972fc26
Binary files /dev/null and b/www/extras/htmlArea/images/ed_cut.gif differ
diff --git a/www/extras/htmlArea/images/ed_delete.gif b/www/extras/htmlArea/images/ed_delete.gif
new file mode 100644
index 000000000..121834938
Binary files /dev/null and b/www/extras/htmlArea/images/ed_delete.gif differ
diff --git a/www/extras/htmlArea/images/ed_format_bold.gif b/www/extras/htmlArea/images/ed_format_bold.gif
new file mode 100644
index 000000000..3d01d0bc8
Binary files /dev/null and b/www/extras/htmlArea/images/ed_format_bold.gif differ
diff --git a/www/extras/htmlArea/images/ed_format_italic.gif b/www/extras/htmlArea/images/ed_format_italic.gif
new file mode 100644
index 000000000..e8e1cb0b9
Binary files /dev/null and b/www/extras/htmlArea/images/ed_format_italic.gif differ
diff --git a/www/extras/htmlArea/images/ed_format_strike.gif b/www/extras/htmlArea/images/ed_format_strike.gif
new file mode 100644
index 000000000..48853615a
Binary files /dev/null and b/www/extras/htmlArea/images/ed_format_strike.gif differ
diff --git a/www/extras/htmlArea/images/ed_format_sub.gif b/www/extras/htmlArea/images/ed_format_sub.gif
new file mode 100644
index 000000000..489f7a9ba
Binary files /dev/null and b/www/extras/htmlArea/images/ed_format_sub.gif differ
diff --git a/www/extras/htmlArea/images/ed_format_sup.gif b/www/extras/htmlArea/images/ed_format_sup.gif
new file mode 100644
index 000000000..8e66b99d0
Binary files /dev/null and b/www/extras/htmlArea/images/ed_format_sup.gif differ
diff --git a/www/extras/htmlArea/images/ed_format_underline.gif b/www/extras/htmlArea/images/ed_format_underline.gif
new file mode 100644
index 000000000..b05384eaf
Binary files /dev/null and b/www/extras/htmlArea/images/ed_format_underline.gif differ
diff --git a/www/extras/htmlArea/images/ed_help.gif b/www/extras/htmlArea/images/ed_help.gif
new file mode 100644
index 000000000..4d66154aa
Binary files /dev/null and b/www/extras/htmlArea/images/ed_help.gif differ
diff --git a/www/extras/htmlArea/images/ed_hr.gif b/www/extras/htmlArea/images/ed_hr.gif
new file mode 100644
index 000000000..92fc80e87
Binary files /dev/null and b/www/extras/htmlArea/images/ed_hr.gif differ
diff --git a/www/extras/htmlArea/images/ed_html.gif b/www/extras/htmlArea/images/ed_html.gif
new file mode 100644
index 000000000..380de29df
Binary files /dev/null and b/www/extras/htmlArea/images/ed_html.gif differ
diff --git a/www/extras/htmlArea/images/ed_image.gif b/www/extras/htmlArea/images/ed_image.gif
new file mode 100644
index 000000000..a715019b9
Binary files /dev/null and b/www/extras/htmlArea/images/ed_image.gif differ
diff --git a/www/extras/htmlArea/images/ed_indent_less.gif b/www/extras/htmlArea/images/ed_indent_less.gif
new file mode 100644
index 000000000..6054d617d
Binary files /dev/null and b/www/extras/htmlArea/images/ed_indent_less.gif differ
diff --git a/www/extras/htmlArea/images/ed_indent_more.gif b/www/extras/htmlArea/images/ed_indent_more.gif
new file mode 100644
index 000000000..c5dd55dcd
Binary files /dev/null and b/www/extras/htmlArea/images/ed_indent_more.gif differ
diff --git a/www/extras/htmlArea/images/ed_link.gif b/www/extras/htmlArea/images/ed_link.gif
new file mode 100644
index 000000000..0482da3f5
Binary files /dev/null and b/www/extras/htmlArea/images/ed_link.gif differ
diff --git a/www/extras/htmlArea/images/ed_list_bullet.gif b/www/extras/htmlArea/images/ed_list_bullet.gif
new file mode 100644
index 000000000..7b073037e
Binary files /dev/null and b/www/extras/htmlArea/images/ed_list_bullet.gif differ
diff --git a/www/extras/htmlArea/images/ed_list_num.gif b/www/extras/htmlArea/images/ed_list_num.gif
new file mode 100644
index 000000000..ae4e03b07
Binary files /dev/null and b/www/extras/htmlArea/images/ed_list_num.gif differ
diff --git a/www/extras/htmlArea/images/ed_redo.gif b/www/extras/htmlArea/images/ed_redo.gif
new file mode 100644
index 000000000..2b5ebbd92
Binary files /dev/null and b/www/extras/htmlArea/images/ed_redo.gif differ
diff --git a/www/extras/htmlArea/images/ed_undo.gif b/www/extras/htmlArea/images/ed_undo.gif
new file mode 100644
index 000000000..05f041e9f
Binary files /dev/null and b/www/extras/htmlArea/images/ed_undo.gif differ
diff --git a/www/extras/htmlArea/images/fullscreen_maximize.gif b/www/extras/htmlArea/images/fullscreen_maximize.gif
new file mode 100644
index 000000000..0536fecd0
Binary files /dev/null and b/www/extras/htmlArea/images/fullscreen_maximize.gif differ
diff --git a/www/extras/htmlArea/images/fullscreen_minimize.gif b/www/extras/htmlArea/images/fullscreen_minimize.gif
new file mode 100644
index 000000000..b12c3f737
Binary files /dev/null and b/www/extras/htmlArea/images/fullscreen_minimize.gif differ
diff --git a/www/extras/htmlArea/images/insert_table.gif b/www/extras/htmlArea/images/insert_table.gif
new file mode 100644
index 000000000..4ce3ff49c
Binary files /dev/null and b/www/extras/htmlArea/images/insert_table.gif differ
diff --git a/www/extras/htmlArea/images/macro.gif b/www/extras/htmlArea/images/macro.gif
new file mode 100644
index 000000000..b55bc2da0
Binary files /dev/null and b/www/extras/htmlArea/images/macro.gif differ
diff --git a/www/extras/htmlArea/popups/about.html b/www/extras/htmlArea/popups/about.html
new file mode 100644
index 000000000..1868c0942
--- /dev/null
+++ b/www/extras/htmlArea/popups/about.html
@@ -0,0 +1,19 @@
+
+About
+
+
+htmlArea v2.0 by interactivetools.com
+A free WYSIWYG editor replacement for <textarea> fields.
+
+
For more information visit:
+http://www.interactivetools.com/products/htmlarea/
+
\ No newline at end of file
diff --git a/www/extras/htmlArea/popups/custom2.html b/www/extras/htmlArea/popups/custom2.html
new file mode 100644
index 000000000..b17d98fd6
--- /dev/null
+++ b/www/extras/htmlArea/popups/custom2.html
@@ -0,0 +1,100 @@
+
+
+ Insert WebGUI macro
+
+
+
+
+
diff --git a/www/extras/htmlArea/popups/editor_help.html b/www/extras/htmlArea/popups/editor_help.html
new file mode 100644
index 000000000..b4553697d
--- /dev/null
+++ b/www/extras/htmlArea/popups/editor_help.html
@@ -0,0 +1,16 @@
+
+
+ Editor Help
+
+
+
+
+Editor Help
+
+Todo...
+
+
+
+
\ No newline at end of file
diff --git a/www/extras/htmlArea/popups/fullscreen.html b/www/extras/htmlArea/popups/fullscreen.html
new file mode 100644
index 000000000..9e94a13b4
--- /dev/null
+++ b/www/extras/htmlArea/popups/fullscreen.html
@@ -0,0 +1,96 @@
+
+Fullscreen Editor
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/extras/htmlArea/popups/insert_image.html b/www/extras/htmlArea/popups/insert_image.html
new file mode 100644
index 000000000..3edcd3eb7
--- /dev/null
+++ b/www/extras/htmlArea/popups/insert_image.html
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+
+Insert Image
+
+
+
+
+
+Image URL:
+
+
+Alternate Text:
+
+
+
+
+
+
+Alignment:
+
+
+Horizontal:
+
+
+Border Thickness:
+
+
+Vertical:
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/extras/htmlArea/popups/insert_table.html b/www/extras/htmlArea/popups/insert_table.html
new file mode 100644
index 000000000..e04ce4bfc
--- /dev/null
+++ b/www/extras/htmlArea/popups/insert_table.html
@@ -0,0 +1,170 @@
+
+Insert Table
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/extras/htmlArea/popups/macros.html b/www/extras/htmlArea/popups/macros.html
new file mode 100644
index 000000000..808c7970a
--- /dev/null
+++ b/www/extras/htmlArea/popups/macros.html
@@ -0,0 +1,100 @@
+
+
+ Insert WebGUI macro
+
+
+
+
+
diff --git a/www/extras/htmlArea/popups/select_color.html b/www/extras/htmlArea/popups/select_color.html
new file mode 100644
index 000000000..8c4f5f134
--- /dev/null
+++ b/www/extras/htmlArea/popups/select_color.html
@@ -0,0 +1,343 @@
+
+
+Select Color
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/extras/htmlArea/readme.html b/www/extras/htmlArea/readme.html
new file mode 100644
index 000000000..b3a4d5637
--- /dev/null
+++ b/www/extras/htmlArea/readme.html
@@ -0,0 +1,639 @@
+htmlArea Help
+
+
+
+
+
+
+
+
+
+
+
+
+Introduction
+
+What is htmlArea?
+Is it really free? What's the catch?
+What are the browser requirements?
+Can I see an example of what it looks like?
+Where can I find out more info, download the latest version, and talk to other htmlArea users?
+
+Installation / Setup
+
+How do I add htmlArea to my web page?
+I want to change the editor settings, how do I do that?
+How can I change what controls are displayed on the toolbar?
+How can I change what fonts are in the font list?
+How can I change what sizes are in the font size?
+How can I change what styles are in the font style (CSS) list?
+How can I specify an external stylesheet for my styles?
+
+Frequently Asked Questions
+
+What the project goals for htmlArea?
+This editor is pretty neat, so how does it actually work?
+You don't happen to have one of these for (Netscape, Mozilla, Opera, etc) do you?
+Why doesn't htmlArea output XHTML instead of regular HTML? Can you make it do that?
+I'd like to be able to upload images from my hard drive, can you add that feature?
+I'd like to be insert & modify tables, can you add that feature?
+I'd like to <insert idea here>, can you add that feature?
+Can I change the toolbar/button colors?
+I love htmlArea, is there anything I can do to help the project?
+
+Known Bugs & Issues
+
+Undo/Redo doesn't work
+Relative paths are converted to absolute paths
+HTML header info (eg: <head>, <body>, etc) doesn't get preserved
+Some tags (eg: noframes, noscript, etc) doesn't get preserved
+htmlArea doesn't work when multiple textareas that have the same name
+
+Change Log
+
+View Change Log
+
+
+
+
+
+
+
+
Introduction back to top
+
+
+
+- What is htmlArea?
+- htmlArea is a free WYSIWYG (what you see is what you get) editor replacement for <textarea> fields. By adding a few
+simple lines of JavaScript to your web page you can replace a regular textarea with a rich text
+editor that let your users do the following:
+
+- Format text to be bold, italicized, or underlined.
+- Change the face, size, style and colour.
+- Left, centre, or right-justify paragraphs.
+- Make bulleted or numbered lists.
+- Indent or un-indent paragraphs.
+- Insert a horizontal line.
+- Insert hyperlinks and images.
+- View the raw HTML source of what they're editing.
+- and much more...
+
+
+Some of the interesting features of htmlArea that set's it apart from other web based WYSIWYG editors are as follows:
+
+
+- It's lightweight, fast loading and can transform a regular textarea into a rich-text editor with a single line of JavaScript.
+- It's 100% backwards compatable with older or non-supported browsers (they get the original textarea field).
+- It's free and can be incorporated into any free or commericial program.
+- It works with any programming language (ASP, PHP, Perl, Java, etc).
+- It's written in simple JavaScript and can be easily viewed, modified or extended.
+- It remembers entered content when a user navigates away and then hits "back" in their browser.
+- Since it replaces existing textareas it doesn't require a lot of code to add it to your pages (just one line).
+- Did we mention it was free? : )
+
+
+
+
+
+
+- Is it really free? What's the catch?
+- Yes! It's really free. You can use it, modify it, distribute it with your software,
+or do just about anything you like with it. The only thing we ask is that you don't remove
+the "about this editor" info button.
+
+We want everybody to be able to make use of htmlArea, but we'd also like other users to be
+able to find out about it so they can download it as well. Having a single button
+on the interface that pops up an "About this editor" window seemed to be the most low-key
+way to do this. The info button looks like this
.
+
+
+
+
+- What are the browser requirements?
+- htmlArea requires Internet Explorer 5.5 or better on Windows to run. This is because it
+makes use of some advanced features of IE5.5 that aren't available in other browsers yet.
+It is backwards compatible with other browsers, though. They will get a regular textarea
+field instead of a WYSIWYG editor.
+
+
+
+- Can I see an example of what it looks like?
+- Sure, make sure you're using IE5.5 or better on windows and see below.
+
+
Here is a regular <textarea> field.
+
+
+
And here is a <textarea> transformed with htmlArea (with a single line of JavaScript code).
+
+
+
+
+
+
+
+- Where can I find out more info, download the latest version, and talk to other htmlArea users?
+- You can find out more about htmlArea and download the latest version on the
+htmlArea homepage
+and you can talk to other htmlArea users and post any comments or suggestions you have in the
+htmlArea forum.
+
+
+
+
+
+
Installation / Setup back to top
+
+
+
+- How do I add htmlArea to my web page?
+- It's easy, first you need to upload the htmlArea files to your website. Just follow these steps:
+
+
+- Download the latest version from the htmlArea homepage.
+- Unzip the files onto your local computer (making sure to maintain the directory structure contained in the zip).
+- Create a new folder on your website called /htmlarea/ (make sure it's NOT inside the cgi-bin).
+- Transfer all the htmlArea files from your local computer into the /htmlarea/ folder on your website.
+- Open the example page /htmlarea/example.html with your browser to make sure everything works.
+
+
+Once htmlArea is on your website all you need to do is add some JavaScript to any pages that you want to
+add WYSIWYG editors to. Here's how to do that.
+
+
+- Open the page you want to add a WYSIWYG editor to. Add the following to the top of
+the page in the <head></head> of the HTML document.
+
+<script><!-- // load htmlArea files
+_editor_url = "/htmlarea/"; // URL to htmlarea files
+document.write('<scr'+'ipt src="' +_editor_url+ 'editor.js"');
+document.write('language="JavaScript1.2"></scr'+'ipt>');
+//--></script>
+
+If you've installed htmlArea anywhere other than /htmlarea/ then be sure to change _editor_url to point to
+your htmlarea directory (ending with a forward slash "/").
+
+- For each <textarea> that you want to change, add the following code to the page.
+
+<script language="JavaScript1.2" defer>
+editor_generate('fieldname');
+</script>
+
+Be sure to change "fieldname" to be the name (not id) of the textarea you want to change.
+
+- And you're done, open your page in your browser and see if it worked. If you run into
+any problems, keep trying and feel free to visit the
+htmlArea forum.
+
+
+
+ - I want to change the editor settings, how do I do that?
+- While it's true that all you need is one line of JavaScript to create an htmlArea WYSIWYG editor
+you can also specify more config settings in the code to control how the editor works and looks. Here's an
+example of some of the available settings:
+
+<script language="JavaScript1.2" defer>
+var config = new Object(); // create new config object
+
+config.width = "90%";
+config.height = "200px";
+config.bodyStyle = 'background-color: white; font-family: "Verdana"; font-size: x-small;';
+config.debug = 0;
+
+// Add additional editor config settings here...
+
+editor_generate('fieldname',config);
+</script>
+
+See below for even more configuration options that can be added. All of these settings will use
+default values in editor.js if you don't specify them yourself.
+
+ | Width | specifies the width of the editor (in pixels or as a percentage). |
+ | Height | specifies the height of the editor (in pixels or as a percentage). |
+ | bodyStyle | specifies CSS style of the editor window including color, default font face, and size. Note, the default font information isn't saved, it just controls how text is displayed if no other font formatting has been applied. |
+ | debug | if set to 1, displays a debug field with the actual contents of the editor (in raw html) which is updated as your type. |
+
+
+
+
+- How can I change what controls are displayed on the toolbar?
+- You can add a config.toolbar config setting to control exactly what's shown on the toolbar.
+Here's an example.
+
+config.toolbar = [
+ ['fontname'],
+ ['fontsize'],
+ ['fontstyle'],
+ ['linebreak'],
+ ['bold','italic','underline','separator'],
+ ['strikethrough','subscript','superscript','separator'],
+ ['justifyleft','justifycenter','justifyright','separator'],
+ ['OrderedList','UnOrderedList','Outdent','Indent','separator'],
+ ['forecolor','backcolor','separator'],
+//['custom1','custom2','custom3','separator'],
+ ['HorizontalRule','Createlink','InsertImage','htmlmode','separator'],
+ ['about','help']
+];
+
+The square brackets control how the buttons are "grouped" together. You can either erase
+or comment out (by adding // to the beginning of the line) buttons or button groups you don't
+want displayed. Most of the buttons do pretty much just what you'd expect, but here's a few
+odd ones for reference.
+
+ | linebreak | adds a linebreak to the toolbar, all buttons after this are on the next line. |
+ | separator | adds a vertical separator between buttons, helps to visually group buttons together |
+ | customN | these are custom buttons that can be defined by JavaScript programmers who want to extend htmlArea. |
+
+
+
+
+- How can I change what fonts are in the font list?
+- There is a config.fontnames setting that let's you control this. See below.
+
+config.fontnames = {
+ "Arial": "arial, helvetica, sans-serif",
+ "Courier New": "courier new, courier, mono",
+ "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",
+ "impact": "impact",
+ "WingDings": "WingDings"
+};
+
+The name on the left is what is displayed to the user. The list of fonts on the right is what is
+actually put into the font tag in the code.
+
+
+- How can I change what sizes are in the font size?
+- There is a config.fontsizes setting that let's you control this. See below.
+
+config.fontsizes = {
+ "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"
+ };
+
+The value on the right is what the user sees, the value on the left is the actual font size used.
+
+
+
+- How can I change what styles are in the font style (CSS) list?
+- As you can probably guess, there's a config.fontstyles setting for this. Now remember, the
+styles defined here control how the text looks in the editor. These styles ALSO have to be defined
+on any page where you display content created with the editor. htmlArea will save the class name
+with the content but nothing else. It's up to you to define the class style in your pages.
+
+
+config.fontstyles = [{
+ name: "headline",
+ className: "headline",
+ classStyle: "font-family: arial; font-size: 28px;"
+ },{
+ name: "red text",
+ className: "saletext2",
+ classStyle: ""
+}];
+
+The "name" is what's displayed to users, "className" is the name of the CSS class to use, and
+classStyle defines the attributes of the style in the editor. If you leave classStyle blank
+you have to be sure to also specify an external stylesheet with all the style information (and
+matching classNames!). See the next question on how to do that.
+
+
+
+
+
+- How can I specify an external stylesheet for my styles?
+- You can specify a stylesheet to avoid entering the class style data for each class name.
+You STILL have to specify which classNames you want to have available though, see the previous
+question for information on that.
+
+config.stylesheet = "/style.css";
+
+
+
+
+
+
+
+
Frequently Asked Questions back to top
+
+
+
+- What are the project goals for htmlArea?
+- When we originally started the htmlArea project we had some pretty specific
+goals in mind for how it would work and what issues were important to us. Those
+goals still lead the direction of development today and are listed below in order
+of priority.
+
+
+- Compatability
+- htmlArea has to always be backwards compatable with older and unsupported browsers. This
+ensures that even if a user with an older and unsupported browser can't use htmlArea, they'll always be able to, at a minimum,
+enter text in a plain textarea like they would have done before.
+
+htmlArea should also be compatable with as many programming languages as possible by being
+completely DHTML and JavaScript based.
+
+
+
+- Ease of Use
+- htmlArea needs to be easy for developers to
+integrate into their applications and customize, easy for programmers to extend
+and modify, and easy for end users to "use". That's why you only have to add a
+single line of JavaScript for each textarea you want to convert, and why all the
+code is stored in a single, easy to follow JavaScript file. That's why htmlArea
+can be used with almost any programming language (ASP, PHP, Perl, Java, etc),
+and that the toolbar is streamlined, customizable by developers, and follows the
+conventions of common word processing programs.
+
+- Lightweight
+- htmlArea needs to be fast loading, allow the user to perform word processing functions at a
+reasonable speed, and not put a lot of strain on a user's browser. To these ends we've
+managed to keep the main editor program in a single file of only 40k and we've written the editor
+in such a way that it has a minimal impact on the resources of the browser it is running in.
+In addition, where we make use of popup windows to perform additional functions we try to put as
+much code as possible in the popup window so it doesn't increase the size of the base editor.
+
+
+
+
+
+
+
+- This editor is pretty neat, so how does it actually work?
+- htmlArea is based on the MSHTML Editing Platform
+in Internet Explorer 5.5+ on windows. Basically, Internet Explorer includes some functionality to make sections of a
+webpage edittable by defining a "contentEditable" attribute or "designMode" property. It also provides some built in
+commands
+for performing common web editting operations (bold, italic, center, insert image, etc).
+
+
htmlArea builds on the features provided by Internet Explorer and adds its own user definable toolbar,
+an easy method to include a WYSIWYG editor in a web page (replacing textareas), an easy way to save user
+changes, as well as a number of custom web editting commands of its own.
+
+
How htmlArea actually works is it replaces a textarea with an (user definable) toolbar, an iframe that
+has the "contentEditable" attribute set to true, and a hidden field with the same name as your original
+textarea that gets updated automatically when you modify content in the editor.
+
+
The user can enter or modify text as well as use keyboard shortcuts and toolbar buttons to perform operations
+on the content. A lot of the editor commands are built into IE and called via
+the execCommand
+method, but htmlArea also includes other custom commands and functions written in JavaScript and stored in
+the editor.js file or the popup windows (in the /popups/ folder).
+
+
+
+
+
+- You don't happen to have one of these for (Netscape, Mozilla, Opera, Mac IE, etc) do you?
+- No. None of these other browsers (including IE for Mac) support "contentEditable" or a way to make
+existing content in the page editable. It might be possible to emulate this in JavaScript, but it would
+be a lot of work. Other problems include displaying or emulating the flashing | bar cursor you see when
+editting. The cross-platform Mozilla browser has some bug entries related to adding contentEditable
+functionality, and perhaps in the future it may be possible to create something for that browser.
+
Although it's a longshot, you might want to send a friendly letter to Microsoft to encourage them to
+make the "contentEditable" functionality work on IE for the Macintosh. Once they implement it, we can offer it.
+
+
+
+
+
+- Why doesn't htmlArea output XHTML instead of regular HTML? Can you make it do that?
+- The HTML output by htmlArea is generated by the built in functionality of Internet Explorer.
+For that reason, there is no easy way to have it output XHTML. If we were going to do it, the way
+to do so would be to parse the HTML after it's output by IE and convert it to XHTML. That's something
+we hope to do at some point.
+
+
+
+
+- I'd like to be able to upload images from my hard drive, can you add that feature?
+- No. We want htmlArea to be compatable with as many programming languages as possible. Because it's
+written in client side JavaScript, it should work with any programming language. If we start adding
+language specific features htmlArea won't be as useful to as many people. That said, there's a lot of
+free "file upload" scripts available, and htmlArea does include a function called editor_insertHTML()\
+for inserting text or HTML tags. If you want to write your own program for doing this it should be
+that hard. Alternatively, you might check in the forum to see if someone already has.
+
+
+
+- I'd like to be insert & modify tables, can you add that feature?
+- It's definately something that can be done, and something we'd really like to add.
+We hope to do so sometime in the neat future. Sign up to our newsletter and watch the
+forum for futher developments.
+
+
+- I'd like to <insert idea here>, can you add that feature?
+- Maybe, maybe not. If it's a good feature and it fits in with the goals of our project we'll
+likely consider it. The best thing to do is post your suggestions to the
+forum. At the very least
+we'll try to give you some suggestions and point you in the right direction. At best you might
+find somebody else has already implemented the feature you were hoping for.
+
+
+
+
+
+- Can I change the toolbar/button colors?
+- Yes, just search for "buttonface" and "buttonhighlight" in editor.js and change those to whatever colors
+you like. If you haven't heard of those colors before, it's because they're special windows colors
+that match whatever color scheme the user has selected for their desktop. For example, if someone
+has changed their desktop color scheme to "lilac", the WYSIWYG editor toolbar and buttons will match that
+theme. Try it, it's really neat.
+
+
+- I love htmlArea, is there anything I can do to help the project?
+- The number one thing you can do to help is also the easiest thing to do; give us a link on your website.
+The more people who can find out about htmlArea the better it will be.
+
+
The next best thing you can do is participate in our
+forum and post a message or two to
+help other htmlArea users (or learn something new yourself).
+
+
Lastly, any code improvements you want to share would certianly be welcome as well.
+
+
+
+
+
+
+
Known Bugs and Issues back to top
+
+
+
+- Undo/Redo doesn't work
+- We update a hidden field everytime you make a change in the editor so the hidden field will be
+submitted when you submit the form. The way undo/redo works in Internet Explorer it seems to reset
+the undo buffer everytime you use JavaScript to set the value of a form element or otherwise make
+changes to the page. Because of this the built in undo/redo functionality of the browser doesn't
+work. We hope to implement our own undo/redo functionality at a future point.
+
+
+- Relative paths are converted to absolute paths
+- Internet Explorer has a tendency to convert relative paths into absolute paths. We've seen some
+implentations of WYSIWYG editors that maintain relative paths "better" than others but certain operations
+(such as dragging and dropping, etc) still convert relative paths to absolute paths. We hope to find a
+workaround for this in a future version.
+
+
+
+- HTML header info (eg: <head>, <body>, etc) doesn't get preserved
+- This is due to Internet Explorer and the way the editor works. The editor already has a
+HTML header of its own so inserting another one confuses the browser and the content gets thrown
+away. The best solution is to have another plain text textarea field for HTML header information.
+
+
+- Some tags (eg: noframes, noscript, etc) doesn't get preserved
+- This is a result of how Internet Explorer works. It seems to discard certain tags that it
+doesn't need to display. Because htmlArea reads the content back from the browser it cannot
+preserve content the browser has "thrown away".
+
+
+- htmlArea doesn't work with multiple textareas that have the same name
+- If you have two or more textareas with the same name on the same page and you try
+to convert one of more of them into a WYSIWYG editor htmlArea won't work. This is because htmlArea
+looks up the textareas by name in the entire page, not just inside a specific form. There's currently
+no workaround for this. We hope to resolve it in a future release.
+
+
+
+
+
+
+
+
+Change Log back to top
+
+
+
+
+- Version 2.00 (beta2) (Released: October 16, 2002)
+
+- New Docs
+- created new readme.html with install instructions, faq, and lots of information
+
+
- New Features
+ - added support for stylesheets
+
- get enlarge/shrink window working
+
- get context menu working (still disabled by default, needs more code for functionality)
+
- allow user to change ANY option in internal config from calling page
+
- added _editor_filterOutput function that's called on form submit
+
- added insert table button
+
+
- Bug Fixes / Optimizations
+ - organized associated files into directories
+
- fixed bug that caused htmlarea to sometimes not display last entered content when user pressed back in their browser.
+
- moved about window into a seperate file to reduce size of editor
+
+
+
+
+- Version 2.00 (beta1) (Released: August 19, 2002)
+
+- visual changes
+- added mouseover/mouseoff events and style for toolbar ui buttons
+
- update toolbar to take up less space and be smaller
+
- display point sizes beside HTML font sizes (eg: 7 (36px)
+
- change "about this editor" icon to an "i"
+
- created a help popup (content still needs to be written).
+
- added version number to about page.
+
+
- code changes
+ - added "defer" to script tag to prevent editor from being created untill page loads
+
- simplified header that needs to be added to pages that contain editor
+
- generated script include tag using _editor_url so users don't have to enter URL twice
+
- moved CSS for editor toolbar buttons into editor.js
+
- switched to using object to pass configuration arguments to editor_generate
+
- general code improvements, optimizations and re-organization
+
- added hooks for keypress events for future use
+
+
- new features
+ - added pulldown for CSS style classnames
+
- added many many more config options including:
+
- ability to select which toolbar elements you want displayed
+
- ability to specify the order of toolbar elements
+
- ability to specify fonts, sizes, and CSS styles for pulldowns
+
- ability to set default font and style used in editor window
+
- debug flag that lets the see the source of the wysiwyg field at all times
+
- add more sample code and comments showing how to add custom buttons
+
+
- bug fixes
+ - fixed error caused when height/width were manually specified (reported by jpeto, thanks!)
+
- "about this editor" window now works when in textedit mode
+
+
+
+
+
+- Version 1.05 (Released: August 28, 2002)
+- - Added support for textareas with underscores ("_") in their names.
+
+
+- Version 1.04 (Released: August 27, 2002)
+- Even more speed improvements (wysiwyg editor is now much faster on older computers).
+- General code improvements and optimizations.
+
+
+- Version 1.03 (Released: August 26, 2002)
+
+- Version 1.02 (Released: August 21, 2002)
+- added editor_insertHTML() function. Developers can now easily add buttons that insert HTML or surround selected text with HTML.
+- removed unneeded debug code and comments to reduce editor.js filesize (and load time).
+
+
+- Version 1.01 (Released: August 20, 2002)
+- optimized code to improve speed (wysiwyg editor is now much faster)
+- added addition event handlers to update UI on mouse events.
+
+
+- Version 1.00 (Released: August 19, 2002)
+
+
+
+
+
\ No newline at end of file
diff --git a/www/extras/ieEdit.html b/www/extras/ieEdit.html
deleted file mode 100644
index ff18edd77..000000000
--- a/www/extras/ieEdit.html
+++ /dev/null
@@ -1,545 +0,0 @@
-
-
-
-
-
-
-
-
-
-Edit Window
-
-
-
-
-
-
diff --git a/www/extras/ieEdit.js b/www/extras/ieEdit.js
deleted file mode 100644
index 37a3934a1..000000000
--- a/www/extras/ieEdit.js
+++ /dev/null
@@ -1,669 +0,0 @@
-// EDITOR PUBLIC (API)
-
-// POPUP (Link, table and image popup need to be worked on)
-function _CPopup_Init()
-{
-var sz = ""+ ""+ "";
-idPopup.document.open("text/html","replace");
-idPopup.document.write(sz);
-idPopup.document.close();
-}
-
-
-function _CPopup_InsertDatabound(eSelect)
-{
-if (eSelect.selectedIndex != 0)
-{
-var sElemName = eSelect.options[eSelect.selectedIndex].text;
-var iLen = sElemName.length
-sElemName = sElemName.replace(/"/g, '"')
-insertHTML('')
-eSelect.selectedIndex = 0;
-idEditbox.focus()
-}
-}
-function _CPopup_Hide()
-{
-document.all.idPopup.style.zIndex=-1
-document.all.idPopup.style.visibility = "hidden"
-idPopup.document._type = ""
-idPopup.document.onkeydown=idPopup.document.onmouseover=idPopup.document.onclick = null
-idEditbox.focus()
-}
-function _CPopup_Show(szType)
-{
-var oRenderer, szCacheKey = "PopupRenderer." + szType
-if (idPopup.document._type == szType)
-_CPopup_Hide()
-else
-{
-document.all.idPopup.style.zIndex = -1
-oRenderer = g_state.aCache[szCacheKey]
-if ((!oRenderer) || ("Link"==szType))
-g_state.aCache[szCacheKey] = oRenderer = new _CPopupRenderer(szType)
-// Force Sizing
-document.all.idPopup.style.visibility = ""
-idPopup.document.all.puRegion.style.pixelHeight = idPopup.document.all.puRegion.style.pixelWidth = 100
-idPopup.document._type = szType
-idPopup.document._renderer = oRenderer
-idPopup.document.all.caption.innerText = oRenderer.GetCaption()
-idPopup.document.all.content.innerHTML = oRenderer.GetHTML()
-idPopup.document.onkeydown = new Function("this._renderer.OnKeyDown()")
-idPopup.document.onmouseover = new Function("this._renderer.OnMouseOver()")
-idPopup.document.onclick = new Function("this._renderer.OnClick()")
-oRenderer.ResetContext(idPopup.document)
-setTimeout("_CPopupRenderer_Display('" + szType + "')",0)
-}
-}
-function _CPopupRenderer_Display(szType) {
-var oRenderer, szCacheKey = "PopupRenderer." + szType
-oRenderer = g_state.aCache[szCacheKey]
-if (oRenderer.autoSize) {
-idPopup.document.all.puRegion.style.pixelHeight = document.all.idPopup.style.pixelHeight = idPopup.document.all.puRegion.offsetHeight
-idPopup.document.all.puRegion.style.pixelWidth = document.all.idPopup.style.pixelWidth = idPopup.document.all.puRegion.offsetWidth + 50
-document.all.idPopup.style.pixelLeft = (document.body.clientWidth - idPopup.document.all.puRegion.offsetWidth) / 2
-}
-else {
-idPopup.document.all.puRegion.style.pixelHeight = document.all.idPopup.style.pixelHeight = document.body.clientHeight - idToolbar.offsetHeight- document.all.idMode.offsetHeight-20
-idPopup.document.all.puRegion.style.pixelWidth = document.all.idPopup.style.pixelWidth = document.body.clientWidth - 50
-document.all.idPopup.style.pixelLeft = 25
-}
-document.all.idPopup.style.zIndex=2
-idPopup.focus()
-}
-function _CPopupRenderer(szType)
-{
-this.szType = szType
-this.elCurrent = this.oDocument = null
-this.ResetContext = _CPopupRenderer_ResetContext
-this.GetCaption = _CPopupRenderer_GetCaption
-this.GetHTML = _CPopupRenderer_GetHTML
-this.autoSize = true
-this.OnMouseOver = new Function()
-this.OnKeyDown = _CListPopupRenderer_GenericOnKeyDown
-switch(szType)
-{
-case "formatblock":
-case "font":
-case "fontsize":
-this.OnMouseOver= _CListPopupRenderer_OnMouseOver
-this.OnKeyDown = _CListPopupRenderer_OnKeyDown
-case "BackColor":
-case "ForeColor":
-this.OnClick = _CListPopupRenderer_OnClick
-this.Highlight = _CListPopupRenderer_Highlight
-this.Select = _CListPopupRenderer_Select
-break
-default:
-this.OnClick = new Function()
-break
-}
-switch(szType)
-{
-case "formatblock":
-this.szCaption = L_PUTITLEPARAGRAPHSTYLE_TEXT
-this.PrepareHTML = _CFormatBlockPopupRenderer_PrepareHTML
-this.szHTML = this.PrepareHTML()
-break
-case "font":
-this.szCaption = L_PUTITLEFONTFACE_TEXT
-this.PrepareHTML = _CFontFacesPopupRenderer_PrepareHTML
-this.szHTML = this.PrepareHTML()
-break
-case "fontsize":
-this.szCaption = L_PUTITLEFONTSIZE_TEXT
-this.PrepareHTML =_CFontSizesPopupRenderer_PrepareHTML
-this.szHTML = this.PrepareHTML()
-break
-case "Link":
-this.szCaption = L_PUTITLELINK_TEXT
-this.PrepareHTML = _CLinkPopupRenderer_PrepareHTML
-this.szHTML = this.PrepareHTML()
-break
-case "Table":
-this.szCaption = L_PUTITLENEWTABLE_TEXT
-this.PrepareHTML = _CTablePopupRenderer_PrepareHTML
-this.szHTML = this.PrepareHTML()
-break
-case "Image":
-this.szCaption = L_PUTITLEIMAGE_TEXT
-this.PrepareHTML = _CImagePopupRenderer_PrepareHTML
-this.szHTML = this.PrepareHTML()
-this.autoSize = false
-break
-case "BackColor":
-this.szCaption = L_PUTITLEBGCOLOR_TEXT
-this.szHTML = ""
-break
-case "ForeColor":
-this.szCaption = L_PUTITLETEXTCOLOR_TEXT
-this.szHTML = ""
-break
-default:
-this.szCaption = ""
-break
-}
-}
-function _CPopupRenderer_ResetContext(oDoc)
-{
-this.oDocument = oDoc
-this.elCurrent = null
-if (this.szType=="Table") {
-var oSel = idEditbox.document.selection.createRange()
-var oBlock = (oSel.parentElement != null ? _CUtil_GetElement(oSel.parentElement(),"TABLE") : _CUtil_GetElement(oSel.item(0),"TABLE"))
-if (oBlock!=null) {
-oDoc.all.tabEdit.className=""
-oDoc.all.tabEditBodytxtPadding.value = oBlock.cellPadding
-oDoc.all.tabEditBodytxtSpacing.value = oBlock.cellSpacing
-oDoc.all.tabEditBodytxtBorder.value = oBlock.border
-oDoc.all.tabEditBodytxtBorderColor.value = oBlock.borderColor
-oDoc.all.tabEditBodytxtBackgroundImage.value = oBlock.background
-oDoc.all.tabEditBodytxtBackgroundColor.value = oBlock.bgColor
-}
-oDoc.elCurrent = oBlock
-}
-}
-function _CPopupRenderer_GetCaption()
-{
-return this.szCaption
-}
-function _CPopupRenderer_GetHTML()
-{
-return this.szHTML
-}
-function _CFontSizesPopupRenderer_PrepareHTML()
-{
-var sz = ""
-for (var i=1; i <= 7; i++)
-{
-sz += ""
-+ ""
-+ "| "
-+ ""
-+ L_STYLESAMPLE_TEXT
-+ ""
-+ " | "
-+ "
"
-}
-sz += "
"
-return sz
-}
-function _CFontFacesPopupRenderer_PrepareHTML()
-{
-var sz = ""
-for (var i=0; i < defaultFonts.length; i++)
-{
-sz += ""
-+ ""
-+ "| "
-+ ""
-+ "ABC abc 123"
-// + defaultFonts[i][1]
-+ " "
-+ (defaultFonts[i][2] ? ("(" + defaultFonts[i][1] + ")") : "")
-+ " | "
-+ "
"
-}
-// sz += "| " + L_CUSTOMFONT_TEXT + " |
"
-sz += "
"
-return sz
-}
-function _CFontFacesPopupRenderer_InsertOther(el) {
-if (el._item=="custom") {
-el._item = "input"
-var sz = ""
-el.innerHTML = sz
-el.children[0].focus()
-}
-el.document.parentWindow.event.cancelBubble = true
-}
-function _CFormatBlockPopupRenderer_PrepareHTML()
-{
-var sz, defaultParagraphs = new Array()
-defaultParagraphs[0] = new Array("", L_STYLENORMAL_TEXT)
-defaultParagraphs[1] = new Array("
", L_STYLEFORMATTED_TEXT)
-for (var i=2; i <= 7; i++)
-defaultParagraphs[i] = new Array("", L_STYLEHEADING_TEXT + (i-1))
-sz = ""
-for (var i=0; i < defaultParagraphs.length; i++)
-{
-sz += ""
-+ ""
-+ "| "
-+ defaultParagraphs[i][0]
-+ defaultParagraphs[i][1]
-+ "" + defaultParagraphs[i][0].substring(1)
-+ " | "
-+ "
"
-}
-sz += "
"
-return sz
-}
-function _CTablePopupRenderer_PrepareHTMLPage(szID,bDisplay) {
-var sz=""
-+ ""
-return sz
-}
-function _CTablePopupRenderer_PrepareHTML()
-{
-var sz = "New Table | "
-+ "Edit Table | |
| "
-+ _CTablePopupRenderer_PrepareHTMLPage("tabNewBody",true)
-+ _CTablePopupRenderer_PrepareHTMLPage("tabEditBody",false)
-+ " |
"
-return sz
-}
-function _CTablePopupRenderer_Select(el,szID, id)
-{
-var d = el.document
-for (var i = 1; i < 5; i++)
-d.all[szID + "prop" + i].style.display = "none"
-d.all[szID + id].style.display = ""
-}
-function _CTablePopupRenderer_ColorSelect(el,id)
-{
-el.document.all[id].value = el.bgColor
-}
-function _CTablePopupRenderer_AddRow(el) {
-var elRow = el.document.elCurrent.insertRow()
-for (var i=0;i"
-for (var r=0; r < d.all[szID + "txtRows"].value; r++)
-{
-sz += ""
-for (var c=0; c < d.all[szID + "txtColumns"].value; c++)
-sz += "| | "
-sz += "
"
-}
-sz += ""
-insertHTML(sz)
-} else
-if (d.elCurrent) {
-d.elCurrent.cellPadding = d.all.tabEditBodytxtPadding.value
-d.elCurrent.cellSpacing = d.all.tabEditBodytxtSpacing.value
-d.elCurrent.border = d.all.tabEditBodytxtBorder.value
-d.elCurrent.className = (d.elCurrent.border=="" || d.elCurrent.border==0) ? "NOBORDER" : ""
-d.elCurrent.borderColor = d.all.tabEditBodytxtBorderColor.value
-d.elCurrent.bgColor = d.all.tabEditBodytxtBackgroundColor.value
-d.elCurrent.background = d.all.tabEditBodytxtBackgroundImage.value
-}
-_CPopup_Hide()
-}
-function _CListPopupRenderer_OnClick()
-{
-var elTD = _CUtil_GetElement(this.oDocument.parentWindow.event.srcElement, "TD")
-if (elTD && elTD._item) this.Select(elTD)
-}
-function _CListPopupRenderer_GenericOnKeyDown() {
-var ev = this.oDocument.parentWindow.event
-if (ev.keyCode==27) _CPopup_Hide()
-}
-function _CListPopupRenderer_OnKeyDown()
-{
-var el
-var iRow = iCell = 0
-var ev = this.oDocument.parentWindow.event
-var idList = this.oDocument.all.idList
-var elTR = _CUtil_GetElement(this.elCurrent,"TR")
-var elTD = _CUtil_GetElement(this.elCurrent,"TD")
-if (elTR != null)
-{
-iRow = elTR.rowIndex
-iCell = elTD.cellIndex
-}
-switch (ev.keyCode)
-{
-case 37:
-iCell--
-if (iCell < 0)
-iCell = idList.rows[iRow].cells.length-1
-break
-case 38:
-iRow--
-if (iRow < 0)
-iRow = idList.rows.length-1
-break
-case 39:
-iCell++
-if (iCell > idList.rows[iRow].cells.length-1)
-iCell = 0
-break
-case 40:
-iRow++
-if (iRow > idList.rows.length-1)
-iRow = 0
-break
-case 13:
-break;
-case 27:
-_CPopup_Hide()
-break;
-default:
-return;
-}
-el = idList.rows[iRow].cells[iCell]
-if (el && el._item)
-if (13 == ev.keyCode) {
-ev.keyCode=0
-this.Select(el)
-}
-else
-this.Highlight(el)
-}
-function _CListPopupRenderer_OnMouseOver()
-{
-var el = _CUtil_GetElement(this.oDocument.parentWindow.event.srcElement, "TD")
-if (el && el._item && el != this.elCurrent)
-this.Highlight(el)
-}
-function _CListPopupRenderer_Highlight(el)
-{
-var elC = this.elCurrent
-if (elC) elC.style.borderWidth = elC.style.borderColor = elC.style.borderStyle = ""
-el.style.borderWidth = "1px"
-el.style.borderColor = "green"
-el.style.borderStyle = "solid"
-this.elCurrent = el
-}
-function _CListPopupRenderer_Select(elTD)
-{
-g_state.RestoreSelection()
-var el = elTD.children[0]
-switch (this.szType)
-{
-case "font":
-_Format("FontName",el.face)
-break
-case "fontsize":
-_Format("FontSize",el.size)
-break
-case "formatblock":
-_Format("FormatBlock","<" + el.tagName + ">")
-break
-case "ForeColor":
-_Format("ForeColor", elTD.bgColor)
-break
-case "BackColor":
-_Format("BackColor",elTD.bgColor)
-break
-}
-_CPopup_Hide()
-}
-function _CLinkPopupRenderer_AddLink(d)
-{
-var szURL = d.all.urlValue.value
-var szType = d.all.urlType[d.all.urlType.selectedIndex].text
-var oSel = g_state.GetSelection()
-var sType = oSel.type
-szURL = ((0 == szURL.indexOf("mailto:") || 0 == szURL.indexOf("http://") || 0 == szURL.indexOf("ftp://")) ? "" : szType) + szURL
-if (szURL!="")
-{
-if ((oSel.parentElement) && (oSel.text==""))
-{
-oSel.expand("word")
-if (oSel.text=="")
-{
-var oStore = oSel.duplicate()
-if (d.all.pageList) {
-var idx = d.all.pageList.selectedIndex
-if (d.all.pageList[idx].value==szURL)
-oSel.text = d.all.pageList[idx].text
-else
-oSel.text = szURL
-}
-else
-oSel.text = szURL
-oSel.setEndPoint("StartToStart",oStore)
-}
-oSel.select()
-sType="Text"
-}
-if ((oSel.item) && (oSel.item(0).tagName=="IMG"))
-{
-oSel.item(0).width = oSel.item(0).offsetWidth
-oSel.item(0).height = oSel.item(0).offsetHeight
-oSel.item(0).border = (d.all.displayBorder.checked) ? 1 : ""
-}
-if (d.all.urlValue.value!="")
-oSel.execCommand("CreateLink",false,szURL)
-else
-oSel.execCommand("UnLink",false,szURL)
-}
-idEditbox.focus()
-}
-function _CLinkPopupRenderer__UpdateURL(oDoc,szURL) {
-var szType = szURL.substring(0,szURL.indexOf(":"))
-for (var i=0;i"
-if (g_state.aLinks.length>0)
-{
-sz += ""
-+ ""
-+ ""
-/*
-+ L_LINKSELECT_TEXT
-+ ""
-*/
-}
-var arTypes = new Array("","http","ftp","mailto")
-var arText = new Array("","http://","ftp://","mailto:")
-var szType = szURL.substring(0,szURL.indexOf(":"))
-if (("http"==szType) || ("ftp"==szType))
-szURL = szURL.substring(szURL.indexOf("//")+2)
-else
-szURL = szURL.substring(szURL.indexOf(":")+1)
-sz += ""
-+ " "
-+ L_LINKWEB_TEXT
-+ ""
-if (bImg)
-{
-sz += ""
-+ " "
-+ ""
-+ L_LINKIMGBORDER_TEXT
-}
-sz += ""
-+ " | "
-+ "
"
-+ ""
-+ "| "
-+ " "
-+ " | "
-+ "
"
-+ ""
-return sz
-}
-// UTIL
-function _CUtil_GetElement(oEl,sTag)
-{
-while (oEl!=null && oEl.tagName!=sTag)
-oEl = oEl.parentElement
-return oEl
-}
-function _CUtil_BuildColorTable(sID,fmt,szClick)
-{
-var sz, cPick = new Array("00","33","66","99","CC","FF"), iCnt=2
-var iColors = cPick.length, szColor = ""
-sz = " | "
-+ ""
-for (var r=0;r"
-for (var g=iColors-1;g>=0;g--)
-for (var b=iColors-1;b>=0;b--) {
-szColor = cPick[r]+cPick[g]+cPick[b]
-sz+="| | "
-}
-sz+=""
-}
-sz+=" |
"
-return sz
-}
-function _CUtil_GetBlock(oEl)
-{
-var sBlocks = "|H1|H2|H3|H4|H5|H6|P|PRE|LI|TD|DIV|BLOCKQUOTE|DT|DD|TABLE|HR|IMG|"
-while ((oEl!=null) && (sBlocks.indexOf("|"+oEl.tagName+"|")==-1))
-oEl = oEl.parentElement
-return oEl
-}
diff --git a/www/extras/nonIeEdit.html b/www/extras/nonIeEdit.html
deleted file mode 100644
index 10d17118c..000000000
--- a/www/extras/nonIeEdit.html
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-Edit Window
-
-
-
-
-
-
diff --git a/www/extras/nonIeEdit.js b/www/extras/nonIeEdit.js
deleted file mode 100644
index fbddce4ab..000000000
--- a/www/extras/nonIeEdit.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-
-#-------------------------------------------------------------------
-# WebGUI is Copyright 2001-2002 Plain Black LLC.
-#-------------------------------------------------------------------
-# Please read the legal notices (docs/legal.txt) and the license
-# (docs/license.txt) that came with this distribution before using
-# this software.
-#-------------------------------------------------------------------
-# http://www.plainblack.com info@plainblack.com
-#-------------------------------------------------------------------
-
-*/
-
-var color;
-var formObj;
-
-function boldText(obj) {
- obj.value = obj.value+''+prompt("Enter the text to bold:", "")+'';
-}
-
-function centerText(obj) {
- obj.value = obj.value+''+prompt("Enter the text to center:", "")+'
';
-}
-
-function colorText(obj) {
- formObj = obj;
- window.open("/extras/colorPicker.html","colorPicker","width=438,height=258");
-}
-
-function copyright(obj) {
- obj.value = obj.value+'©';
-}
-
-function email(obj) {
- var email = prompt("Enter the Email address:", "");
- obj.value = obj.value+''+email+'';
-}
-
-function getShowMeText() {
- return formObj.value;
-}
-
-function imageAdd(obj) {
- obj.value = obj.value+'
';
-}
-
-function italicText(obj) {
- obj.value = obj.value+''+prompt("Enter the text to italicize:", "")+'';
-}
-
-function list(obj) {
- var item;
- obj.value = obj.value+'';
- obj.value = obj.value+'- '+prompt("Enter the first item in the list:", "");
- while (item = prompt("Enter the next item in the list (cancel when done):", "")) {
- obj.value = obj.value+'
- '+item;
- }
- obj.value = obj.value+'
';
-}
-
-function registered(obj) {
- obj.value = obj.value+'®';
-}
-
-function setColor(remoteColor) {
- formObj.value = formObj.value+''+prompt("Enter the text to color:","")+'';
-}
-
-function showMe(obj) {
- formObj = obj;
- window.open("/extras/viewer.html","showMeViewer","width=500,height=300,scrollbars=1");
-}
-
-function trademark(obj) {
- obj.value = obj.value+'TM';
-}
-
-function url(obj) {
- obj.value = obj.value+''+prompt("Enter the title of the link:", "Google")+'';
-}
-
diff --git a/www/extras/toolbar.gif b/www/extras/toolbar.gif
deleted file mode 100644
index 8dae9ec4c..000000000
Binary files a/www/extras/toolbar.gif and /dev/null differ