Some cleanups
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,8 @@
|
||||
// Version 3.0 developed by Mihai Bazon for InteractiveTools.
|
||||
// http://dynarch.com/mishoo
|
||||
//
|
||||
//
|
||||
// Modified for Moodle by Janne Mikkonen
|
||||
// $Id$
|
||||
|
||||
// Creates a new HTMLArea object. Tries to replace the textarea with the given
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>HTMLArea -- the free, customizable online editor</title>
|
||||
|
||||
<style type="text/css">
|
||||
html, body { font-family: georgia,"times new roman",serif; background-color: #fff; color: #000; }
|
||||
.label { text-align: right; padding-right: 0.3em; }
|
||||
.bline { border-bottom: 1px solid #aaa; }
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div style="float: right; border: 1px solid #aaa; background-color: #eee; padding: 3px; margin-left: 10px; margin-bottom: 10px;">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td class="label">Version:</td><td>3.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Release:</td><td>beta (<a href="release-notes.html">release notes</a>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label bline">Compiled at:</td><td class="bline">Aug 11, 2003 [21:30] GMT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">SourceForge page:</td><td><a href="http://sf.net/projects/itools-htmlarea/">http://sf.net/projects/itools-htmlarea/</a></td>
|
||||
</table>
|
||||
</div>
|
||||
<h1>HTMLArea -- the free<br/>customizable online editor</h1>
|
||||
|
||||
<p>
|
||||
HTMLArea is a free, customizable online editor. It works inside your
|
||||
browser. It uses a non-standard feature implemented in Internet
|
||||
Explorer 5.5 or better for Windows and Mozilla 1.3 or better (any
|
||||
platform), therefore it will only work in one of these browsers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
HTMLArea is copyright <a
|
||||
href="http://interactivetools.com">InteractiveTools.com</a> and
|
||||
released under a BSD-style license. HTMLArea is created and developed
|
||||
upto version 2.03 by InteractiveTools.com. Version 3.0 developed by
|
||||
<a href="http://students.infoiasi.ro/~mishoo/">Mihai Bazon</a> for
|
||||
InteractiveTools. It contains code sponsored by other companies as
|
||||
well.
|
||||
</p>
|
||||
|
||||
<h2>Online demos</h2>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="example.html">HTMLArea standard</a> -- contains the core
|
||||
editor.</li>
|
||||
|
||||
<li><a href="example-table-operations.html">HTMLArea + tables</a> --
|
||||
loads the <tt>TableOperations</tt> plugin, sponsored by <a
|
||||
href="http://bloki.com">Zapatec Inc.</a></li>
|
||||
|
||||
<li><a href="example-spell-checker.html">HTMLArea + spell checher</a>
|
||||
-- loads the <tt>SpellChecker</tt> plugin, sponsored by <a
|
||||
href="http://americanbible.org">American Bible Society</a>.</li>
|
||||
|
||||
<li><a href="example-fully-loaded.html">HTMLArea fully loaded</a> ;-)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Installation</h2>
|
||||
|
||||
<p>
|
||||
Installation is (or should be) easy. You need to unpack the ZIP file
|
||||
in a directory accessible through your webserver. Supposing you
|
||||
unpack in your <tt>DocumentRoot</tt> and your <tt>DocumentRoot</tt> is
|
||||
<tt>/var/www/html</tt> as in a standard RedHat installation, you need
|
||||
to acomplish the following steps: (the example is for a Unix-like
|
||||
operating system)
|
||||
</p>
|
||||
|
||||
<pre style="margin-left: 2em"
|
||||
>
|
||||
cd /var/www/html
|
||||
unzip /path/to/archive/HTMLArea-3.0-beta.zip
|
||||
mv HTMLArea-3.0-beta htmlarea
|
||||
find htmlarea/ -type f -exec chmod 644 {} \;
|
||||
find htmlarea/ -type d -exec chmod 755 {} \;
|
||||
find htmlarea/ -name "*.cgi" -exec chmod 755 {} \;</pre>
|
||||
|
||||
<p>
|
||||
<strong>Notes.</strong> You may chose to symlink "htmlarea" to "HTMLArea-3.0-beta", in which case your server needs to be configured to
|
||||
"<tt>FollowSymLinks</tt>". You need to make sure that *.cgi files are
|
||||
interpreted as CGI scripts. If you want to use the SpellChecker
|
||||
plugin you need to have a recent version of Perl installed (I
|
||||
recommend 5.8.0) on the server, and the module Text::Aspell, available
|
||||
from CPAN. More info in "<a
|
||||
href="plugins/SpellChecker/readme-tech.html">plugins/SpellChecker/readme-tech.html</a>".
|
||||
</p>
|
||||
|
||||
<p>About how to setup your pages to use the editor, please read the
|
||||
[outdated yet generally valid] <a
|
||||
href="reference.html">documentation</a>.</p>
|
||||
|
||||
<h2>Status and links</h2>
|
||||
|
||||
<p>HTMLArea has reached version 3.0. As of this version, it
|
||||
supports:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Customizable toolbar</li>
|
||||
|
||||
<li>Easy internationalization</li>
|
||||
|
||||
<li>Plugin-based infrastructure</li>
|
||||
|
||||
<li>Delivers W3-compliant HTML (with few exceptions)</li>
|
||||
|
||||
<li>Has a subset of Microsoft Word's keyboard shortcuts</li>
|
||||
|
||||
<li>Full-screen editor</li>
|
||||
|
||||
<li>Advanced table operations (by external plugin
|
||||
"TableOperations")</li>
|
||||
|
||||
<li>Spell checker (by external plugin "SpellChecker")</li>
|
||||
|
||||
<li>probably more... ;-)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>We have a <a
|
||||
href="http://sourceforge.net/projects/itools-htmlarea/">project page</a>
|
||||
at <a href="http://sourceforge.net">SourceForge.net</a>. There you can
|
||||
also find out <a href="http://sourceforge.net/cvs/?group_id=69750">how
|
||||
to retrieve the code from CVS</a>, or you can <a
|
||||
href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/itools-htmlarea">browse
|
||||
the CVS online</a>. We also have a <a
|
||||
href="http://sourceforge.net/tracker/?atid=525656&group_id=69750&func=browse">bug
|
||||
system</a>, a <a
|
||||
href="http://sourceforge.net/tracker/?atid=525658&group_id=69750&func=browse">patch
|
||||
tracking system</a> and a <a
|
||||
href="http://sourceforge.net/tracker/?atid=525659&group_id=69750&func=browse">feature
|
||||
request page</a>.</p>
|
||||
|
||||
<p>We invite you to say everything you want about HTMLArea <a
|
||||
href="http://www.interactivetools.com/forum/gforum.cgi?forum=14;">on the
|
||||
forums</a> at InteractiveTools.com. There you should also find the
|
||||
latest news.</p>
|
||||
|
||||
<p>Sometimes I post news about the latest developments on <a
|
||||
href="http://students.infoiasi.ro/~mishoo/">my personal homepage</a>.</p>
|
||||
|
||||
<h2>"It doesn't work, what's wrong?"</h2>
|
||||
|
||||
<p>If it doesn't work, you have several options:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Post a message to the forum. Describe your problem in as much
|
||||
detail as possible. Include errors you might find in the JavaScript
|
||||
console (if you are a Mozilla user), or errors displayed by IE (though
|
||||
they're most of the times useless).</li>
|
||||
|
||||
<li>If you're positive that you discovered a bug in HTMLArea then feel
|
||||
free to fill a bug report in our bug system. If you have the time you
|
||||
should check to see if a similar bug was reported or not; it might be
|
||||
fixed already in the CVS ;-) If you're positive that a similar bug was
|
||||
not yet reported, do fill a bug report and please include as much
|
||||
detail as possible, such as your browser, OS, errors from JavaScript
|
||||
console, etc.</li>
|
||||
|
||||
<li>If you want a new feature to be implemented, post it on the
|
||||
features request and someone will hopefully take care of it.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>You can <a href="mailto:[email protected]">contact me directly</a>
|
||||
<em>only</em> if you want to pay me for implementing custom features to
|
||||
HTMLArea. If you want to sponsor these features (that is, allow them to
|
||||
get back into the public HTMLArea distribution) I'll be cheaper. ;-)</p>
|
||||
|
||||
<hr />
|
||||
<address><a href="http://students.infoiasi.ro/~mishoo/">Mihai Bazon</a></address>
|
||||
<!-- Created: Sun Aug 3 14:11:26 EEST 2003 -->
|
||||
<!-- hhmts start -->
|
||||
Last modified on Tue Aug 12 00:23:26 2003
|
||||
<!-- hhmts end -->
|
||||
<!-- doc-lang: English -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
// Though "Dialog" looks like an object, it isn't really an object. Instead
|
||||
// it's just namespace for protecting global symbols.
|
||||
|
||||
function Dialog(url, action, init) {
|
||||
if (typeof init == "undefined") {
|
||||
init = window; // pass this window object by default
|
||||
}
|
||||
if (document.all) { // here we hope that Mozilla will never support document.all
|
||||
var value =
|
||||
showModalDialog(url, init,
|
||||
//window.open(url, '_blank',
|
||||
"resizable: no; help: no; status: no; scroll: no");
|
||||
if (action) {
|
||||
action(value);
|
||||
}
|
||||
} else {
|
||||
return Dialog._geckoOpenModal(url, action, init);
|
||||
}
|
||||
};
|
||||
|
||||
Dialog._parentEvent = function(ev) {
|
||||
if (Dialog._modal && !Dialog._modal.closed) {
|
||||
//Dialog._modal.focus();
|
||||
// we get here in Mozilla only, anyway, so we can safely use
|
||||
// the DOM version.
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
}
|
||||
};
|
||||
|
||||
// should be a function, the return handler of the currently opened dialog.
|
||||
Dialog._return = null;
|
||||
|
||||
// constant, the currently opened dialog
|
||||
Dialog._modal = null;
|
||||
|
||||
// the dialog will read it's args from this variable
|
||||
Dialog._arguments = null;
|
||||
|
||||
Dialog._geckoOpenModal = function(url, action, init) {
|
||||
var dlg = window.open(url, "ha_dialog",
|
||||
"toolbar=no,menubar=no,personalbar=no,width=10,height=10," +
|
||||
"scrollbars=no,resizable=no");
|
||||
Dialog._modal = dlg;
|
||||
Dialog._arguments = init;
|
||||
|
||||
// capture some window's events
|
||||
function capwin(w) {
|
||||
w.addEventListener("click", Dialog._parentEvent, true);
|
||||
w.addEventListener("mousedown", Dialog._parentEvent, true);
|
||||
w.addEventListener("focus", Dialog._parentEvent, true);
|
||||
};
|
||||
// release the captured events
|
||||
function relwin(w) {
|
||||
w.removeEventListener("focus", Dialog._parentEvent, true);
|
||||
w.removeEventListener("mousedown", Dialog._parentEvent, true);
|
||||
w.removeEventListener("click", Dialog._parentEvent, true);
|
||||
};
|
||||
capwin(window);
|
||||
// capture other frames
|
||||
for (var i = 0; i < window.frames.length; capwin(window.frames[i++]));
|
||||
// make up a function to be called when the Dialog ends.
|
||||
Dialog._return = function (val) {
|
||||
if (val && action) {
|
||||
action(val);
|
||||
}
|
||||
relwin(window);
|
||||
// capture other frames
|
||||
for (var i = 0; i < window.frames.length; relwin(window.frames[i++]));
|
||||
Dialog._modal = null;
|
||||
};
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
// All our custom buttons will call this function when clicked.
|
||||
// We use the buttonId parameter to determine what button
|
||||
// triggered the call.
|
||||
function clickHandler(editor, buttonId) {
|
||||
switch (buttonId) {
|
||||
case "my-toc":
|
||||
editor.insertHTML("<h1>Table Of Contents</h1>");
|
||||
break;
|
||||
case "my-date":
|
||||
editor.insertHTML((new Date()).toString());
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
// Create a new configuration object
|
||||
var config = new HTMLArea.Config();
|
||||
|
||||
// Register our custom buttons
|
||||
config.registerButton("my-toc", "Insert TOC", "images/em.icon.smile.gif", false, clickHandler);
|
||||
config.registerButton("my-date", "Insert date/time", "icon_ins_char.gif", false, clickHandler);
|
||||
|
||||
// Append the buttons to the default toolbar
|
||||
config.toolbar.push(["linebreak", "my-toc", "my-date"]);
|
||||
|
||||
// Replace an existing textarea with an HTMLArea object having the above config.
|
||||
HTMLArea.replace("TA", config);
|
||||
Reference in New Issue
Block a user