Upgraded HTML Area rich editor to version 2.0.3.
This commit is contained in:
parent
f738a3051a
commit
974a7a302e
7 changed files with 1015 additions and 825 deletions
|
|
@ -1,19 +1,15 @@
|
|||
<HTML STYLE="width: 450px; height: 285px; ">
|
||||
<HTML STYLE="width: 450px; height: 185px; ">
|
||||
<HEAD><TITLE>About</TITLE>
|
||||
<style>
|
||||
html,body,textarea { font-family: verdana,arial; font-size: 9pt; };
|
||||
</style></HEAD>
|
||||
<BODY style="background: threedface; color: #000000" topmargin=5 leftmargin=12>
|
||||
<span style="font-family: arial black, arial; font-size: 28px; letter-spacing: -2px;">htmlArea</span> v2.0 by interactivetools.com<br>
|
||||
<BODY style="background: #FFFFFF; color: #000000" topmargin=5 leftmargin=12>
|
||||
<span style="font-family: arial black, arial; font-size: 28px; letter-spacing: -2px;">htmlArea v2.03</span><br>
|
||||
A free WYSIWYG editor replacement for <textarea> fields.<br>
|
||||
<p><textarea style="width:100%; height:120px" readonly>
|
||||
Copyright (c) 2002 interactivetools.com, inc.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
a) The above copyright notice, this permission notice, and the "About this editor" button that appears as the letter "i" in the editor interface, shall be included in all copies or substantial portions of the Software.
|
||||
b) The "About this editor" button that appears as the letter "i" in the editor interface must always be visible in the editor interface and bring up the original "About" dialog window when clicked.
|
||||
c) The "About" dialog window and its contents, including the link to interactivetools.com can not be amended.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
</textarea>
|
||||
<p>For more information visit:<br>
|
||||
|
||||
<p>For full source code and docs, visit:<br>
|
||||
<a href="http://www.interactivetools.com/products/htmlarea/" target="_blank">http://www.interactivetools.com/products/htmlarea/</a><br><br>
|
||||
|
||||
<p>Copyright (c) 2002 interactivetools.com, inc. All Rights Reserved.<br>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -1,10 +1,15 @@
|
|||
<html style="width:600px; Height: 50px;">
|
||||
<html style="width:300px; Height: 60px;">
|
||||
<head>
|
||||
<title>Insert WebGUI macro</title>
|
||||
<title>Select Phrase</title>
|
||||
<script language="javascript">
|
||||
|
||||
function returnSelected(in_values) {
|
||||
var text = in_values;
|
||||
var myTitle = window.dialogArguments;
|
||||
document.title = myTitle;
|
||||
|
||||
|
||||
function returnSelected() {
|
||||
var idx = document.all.textPulldown.selectedIndex;
|
||||
var text = document.all.textPulldown[idx].text;
|
||||
|
||||
window.returnValue = text; // set return value
|
||||
window.close(); // close dialog
|
||||
|
|
@ -13,88 +18,18 @@ function returnSelected(in_values) {
|
|||
</script>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" topmargin=15 leftmargin=0>
|
||||
<form name="macros" method=get onSubmit="Set(document.all.ColorHex.value); return false;">
|
||||
|
||||
<form method=get onSubmit="Set(document.all.ColorHex.value); return false;">
|
||||
<div align=center>
|
||||
<select name="textPulldown" onchange="returnSelected(this.value)">
|
||||
<option value=''>Menus and navigation...</option>
|
||||
<option value='^FlexMenu;'>FlexMenu</option>
|
||||
<option value='^M;'>Current Menu (Vertical)</option>
|
||||
<option value='^m;'>Current Menu (Horizontal)</option>
|
||||
<option value='^P;'>Previous Menu (Vertical)</option>
|
||||
<option value='^p;'>Previous Menu (Horizontal)</option>
|
||||
<option value='^rootmenu;'>Root Menu (Horizontal)</option>
|
||||
<option value='^S("home",0);'>Specific SubMenu (Vertical)</option>
|
||||
<option value='^s("home");'>Specific SubMenu (Horizontal)</option>
|
||||
<option value='^Synopsis;'>Synopsis Menu</option>
|
||||
<option value='^T;'>Top Level Menu (Vertical)</option>
|
||||
<option value='^t;'>Top Level Menu (Horizontal)</option>
|
||||
<option value='^t;'>Top Level Menu (Horizontal)</option>
|
||||
<option value='^C;'>Crumb Trail</option>
|
||||
<option value='^H;'>Home Link</option>
|
||||
|
||||
<select name="textPulldown">
|
||||
<option>The quick brown</option>
|
||||
<option>fox jumps over</option>
|
||||
<option>the lazy dog.</option>
|
||||
</select>
|
||||
|
||||
<select onchange="returnSelected(this.value)">
|
||||
<option value=''>SQL...</option>
|
||||
<option value='^FormParam("phoneNumber");'>FormParam</option>
|
||||
<option value='^*(100);'>Random Number</option>
|
||||
<option value='^rownum;'>Row Number</option>
|
||||
<option value='SQL("select count(*) from users", "there are ^0; on this system.");'>SQL</option>
|
||||
<option value='^-;'>Begin/End looping</option>
|
||||
<option value='^0;'>Column 1</option>
|
||||
<option value='^1;'>Column 2</option>
|
||||
<option value='^2;'>Column 3</option>
|
||||
<option value='^3;'>Column 4</option>
|
||||
<option value='^4;'>Column 5</option>
|
||||
<option value='^5;'>Column 6</option>
|
||||
<option value='^6;'>Column 7</option>
|
||||
<option value='^7;'>Column 8</option>
|
||||
<option value='^8;'>Column 9</option>
|
||||
<option value='^9;'>Column 10</option>
|
||||
</select>
|
||||
<select onchange="returnSelected(this.value)">
|
||||
<option value=''>User/Group/Admin...</option>
|
||||
<option value='^a("Account Info");'>My Account Link</option>
|
||||
<option value='^AdminBar;'>AdminBar</option>
|
||||
<option value='^AdminText("You are in admin mode!");'>AdminText</option>
|
||||
<option value='^AdminToggle;'>AdminToggle</option>
|
||||
<option value='^GroupText("Visitors","You need an account to do anything cool on this site!");'>GroupText</option>
|
||||
<option value='^H("Go Home");'>Home Link</option>
|
||||
<option value='^L;'>Login Form</option>
|
||||
<option value='^LoginToggle;'>LoginToggle</option>
|
||||
<option value='^User("email");'>User Information</option>
|
||||
<option value='^@;'>Username</option>
|
||||
<option value='^#;'>User ID</option>
|
||||
</select>
|
||||
<select onchange="returnSelected(this.value)">
|
||||
<option value=''>Page/System/Info...</option>
|
||||
<option value='^c;'>Company Name</option>
|
||||
<option value='^D;'>Date</option>
|
||||
<option value='^e;'>Company Email Address</option>
|
||||
<option value='^Env("REMOTE_ADDR");'>Web Environment Variable</option>
|
||||
<option value='^Execute("/this/file.sh");'>Execute</option>
|
||||
<option value='^Extras;'>extras folder</option>
|
||||
<option value='^Include("/this/file.html");'>Include</option>
|
||||
<option value='^Page("urlizedTitle");'>Page Properties</option>
|
||||
<option value='^PageTitle;'>PageTitle</option>
|
||||
<option value='^r;'>Make Page Printable</option>
|
||||
<option value='^RootTitle;'>RootTitle</option>
|
||||
<option value='^*(100);'>Random Number</option>
|
||||
<option value='^u;'>Company URL</option>
|
||||
<option value='^URLEncode("Is this my string ?");'>URLEncode</option>
|
||||
<option value='^/;'>System URL</option>
|
||||
<option value='^\;'>Page URL</option>
|
||||
<option value='^?;'>Search Box</option>
|
||||
</select>
|
||||
|
||||
<select onchange="returnSelected(this.value)">
|
||||
<option value=''>Images...</option>
|
||||
<option value='^I("imageName");'>Image Manager Image with Tag</option>
|
||||
<option value='^i("imageName");'>Image Manager Image Path</option>
|
||||
<option value='^Thumbnail("imageName");'>Thumbnail</option>
|
||||
<option value='^ThumbnailLinker("imageName");'>ThumbnailLinker</option>
|
||||
</select>
|
||||
<input type="button" value=" Go " onClick="returnSelected()">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</body></html>
|
||||
</body></html>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<html STYLE="width: 640px; height: 480px; ">
|
||||
<html>
|
||||
<head><title>Fullscreen Editor</title>
|
||||
<style type="text/css"> body { margin: 0px; border: 0px; background-color: buttonface; } </style>
|
||||
|
||||
|
|
@ -6,15 +6,25 @@
|
|||
|
||||
// if we pass the "window" object as a argument and then set opener to
|
||||
// equal that we can refer to dialogWindows and popupWindows the same way
|
||||
opener = window.dialogArguments;
|
||||
if (window.dialogArguments) { opener = window.dialogArguments; }
|
||||
|
||||
var _editor_url = "../";
|
||||
document.write('<scr'+'ipt src="' +_editor_url+ 'editor.js" language="Javascript1.2"></scr'+'ipt>');
|
||||
|
||||
var objname = location.search.substring(1,location.search.length);
|
||||
var config = opener.document.all[objname].config;
|
||||
var editor_obj = opener.document.all["_" +objname+ "_editor"]; // html editor object
|
||||
var parent_editdoc = editor_obj.contentWindow.document; // get iframe editor document object
|
||||
var parent_objname = location.search.substring(1,location.search.length); // parent editor objname
|
||||
var parent_config = opener.document.all[parent_objname].config;
|
||||
|
||||
var config = cloneObject( parent_config );
|
||||
var objname = 'editor'; // name of this editor
|
||||
|
||||
// DOMViewerObj = config;
|
||||
// DOMViewerName = 'config';
|
||||
// window.open('/innerHTML/domviewer.htm');
|
||||
|
||||
/* ---------------------------------------------------------------------- *\
|
||||
Function :
|
||||
Description :
|
||||
\* ---------------------------------------------------------------------- */
|
||||
|
||||
function _CloseOnEsc() {
|
||||
if (event.keyCode == 27) {
|
||||
|
|
@ -25,12 +35,35 @@ function _CloseOnEsc() {
|
|||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- *\
|
||||
Function :
|
||||
Description :
|
||||
Function : cloneObject
|
||||
Description : copy an object by value instead of by reference
|
||||
Usage : var newObj = cloneObject(oldObj);
|
||||
\* ---------------------------------------------------------------------- */
|
||||
|
||||
function cloneObject(obj) {
|
||||
var newObj = new Object;
|
||||
|
||||
// check for array objects
|
||||
if (obj.constructor.toString().indexOf('function Array(') == 1) {
|
||||
newObj = obj.constructor();
|
||||
}
|
||||
|
||||
for (var n in obj) {
|
||||
var node = obj[n];
|
||||
if (typeof node == 'object') { newObj[n] = cloneObject(node); }
|
||||
else { newObj[n] = node; }
|
||||
}
|
||||
|
||||
return newObj;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- *\
|
||||
Function : resize_editor
|
||||
Description : resize the editor when the user resizes the popup
|
||||
\* ---------------------------------------------------------------------- */
|
||||
|
||||
function resize_editor() { // resize editor to fix window
|
||||
var editor = document.all['_editor_editor'];
|
||||
var editor = document.all['_editor_editor'];
|
||||
|
||||
newWidth = document.body.offsetWidth;
|
||||
newHeight = document.body.offsetHeight - editor.offsetTop;
|
||||
|
|
@ -40,30 +73,33 @@ function resize_editor() { // resize editor to fix window
|
|||
|
||||
editor.style.width = newWidth;
|
||||
editor.style.height = newHeight;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- *\
|
||||
Function :
|
||||
Description :
|
||||
Function : init
|
||||
Description : run this code on page load
|
||||
\* ---------------------------------------------------------------------- */
|
||||
|
||||
function init() {
|
||||
|
||||
|
||||
|
||||
// change maximize button to minimize button
|
||||
config.btnList["popupeditor"] = ['popupeditor', 'Minimize Editor', 'update_parent(); window.close();', 'fullscreen_minimize.gif'];
|
||||
config.btnList["popupeditor"] = ['popupeditor', 'Minimize Editor', 'update_parent(); window.close();', 'fullscreen_minimize.gif'];
|
||||
|
||||
// set htmlmode button to refer to THIS editor
|
||||
config.btnList["htmlmode"] = ['HtmlMode', 'View HTML Source', 'editor_setmode(\'editor\')', 'ed_html.gif'];
|
||||
|
||||
// change image url to be relative to current path
|
||||
config.imgURL = "../images/";
|
||||
|
||||
// generate editor and resize it
|
||||
editor_generate('editor', config);
|
||||
|
||||
resize_editor();
|
||||
|
||||
// set default contents
|
||||
popup_editdoc = document.all['_editor_editor'].contentWindow.document;
|
||||
popup_editdoc.body.innerHTML = parent_editdoc.body.innerHTML;
|
||||
// switch mode if needed
|
||||
if (parent_config.mode == 'textedit') { editor_setmode(objname, 'textedit'); }
|
||||
|
||||
// set child window contents
|
||||
var parentHTML = opener.editor_getHTML(parent_objname);
|
||||
editor_setHTML(objname, parentHTML);
|
||||
|
||||
// continuously update parent editor window
|
||||
window.setInterval(update_parent, 333);
|
||||
|
|
@ -71,17 +107,16 @@ function init() {
|
|||
// setup event handlers
|
||||
document.body.onkeypress = _CloseOnEsc;
|
||||
window.onresize = resize_editor;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- *\
|
||||
Function :
|
||||
Description :
|
||||
Function : update_parent
|
||||
Description : update parent window editor field with contents from child window
|
||||
\* ---------------------------------------------------------------------- */
|
||||
|
||||
function update_parent() {
|
||||
parent_editdoc.body.innerHTML = popup_editdoc.body.innerHTML;
|
||||
var childHTML = editor_getHTML(objname);
|
||||
opener.editor_setHTML(parent_objname, childHTML);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@ function btnOKClick() {
|
|||
+ ' width="' +document.all.width.value + document.all.widthExt.value+ '"'
|
||||
+ ' align="' +document.all.alignment.value+ '">\n';
|
||||
|
||||
for (var x=1; x<document.all.rows.value; x++) {
|
||||
for (var x=0; x<document.all.rows.value; x++) {
|
||||
table += " <tr>\n";
|
||||
for (var y=1; y<document.all.cols.value; y++) {
|
||||
for (var y=0; y<document.all.cols.value; y++) {
|
||||
table += " <td></td>\n";
|
||||
}
|
||||
table += " </tr>\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue