import htmlarea 3.0beta

eGW code to use it, is in phpgwapi/inc/class.html.inc.php the translations (via eGW standard translation system) are in phpgwapi/inc/htmlarea-lang.php
This commit is contained in:
Ralf Becker 2004-01-08 09:03:17 +00:00
parent 6d5ca75357
commit a3a85a862d
112 changed files with 7277 additions and 11 deletions

View File

@ -16,6 +16,7 @@
{
var $user_agent,$ua_version; // 'mozilla','msie','konqueror'
var $prefered_img_title;
var $charset,$phpgwapi_js_url;
function html()
{
@ -42,6 +43,7 @@
{
$this->charset = $GLOBALS['phpgw']->translation->charset();
}
$this->phpgwapi_js_url = $GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/js';
}
function htmlspecialchars($str)
@ -49,15 +51,16 @@
return htmlspecialchars($str,ENT_COMPAT,$this->charset);
}
/*
* Function: Allows to show and select one item from an array
* Parameters: $name string with name of the submitted var which holds the key of the selected item form array
* $key key(s) of already selected item(s) from $arr, eg. '1' or '1,2' or array with keys
* $arr array with items to select, eg. $arr = array ( 'y' => 'yes','n' => 'no','m' => 'maybe');
* $no_lang if !$no_lang send items through lang()
* $options additional options (e.g. 'multiple')
* On submit $XXX is the key of the selected item (XXX is the content of $name)
* Returns: string to set for a template or to echo into html page
/*!
@function select
@abstract allows to show and select one item from an array
@param $name string with name of the submitted var which holds the key of the selected item form array
@param $key key(s) of already selected item(s) from $arr, eg. '1' or '1,2' or array with keys
@param $arr array with items to select, eg. $arr = array ( 'y' => 'yes','n' => 'no','m' => 'maybe');
@param $no_lang if !$no_lang send items through lang()
@param $options additional options (e.g. 'width')
@param $multiple number of lines for a multiselect, default 0 = no multiselect
@returns string to set for a template or to echo into html page
*/
function select($name, $key, $arr=0,$no_lang=0,$options='',$multiple=0)
{
@ -86,7 +89,7 @@
if("$k" == "$key" || strstr(",$key,",",$k,"))
{
$out .= " selected";
$out .= ' selected="1"';
}
$out .= ">" . ($no_lang || $text == '' ? $text : lang($text)) . "</option>\n";
}
@ -125,6 +128,51 @@
return "<textarea name=\"$name\" $options>".$this->htmlspecialchars($value)."</textarea>\n";
}
/*!
@function htmlarea
@syntax htmlarea( $name,$content='',$width=False,$height=False )
@author ralfbecker
@abstract creates a textarea inputfield for the htmlarea js-widget (returns the necessary html and js)
@param $name string name and id of the input-field
@param $content string of the htmlarea (will be run through htmlspecialchars !!!), default ''
@param $style string inline styles, eg. dimension of textarea element
*/
function htmlarea($name,$content='',$style='width:100%; min-width:500px; height:300px;')
{
if (!is_object($GLOBALS['phpgw']->js))
{
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
}
if (!strstr($GLOBALS['phpgw_info']['flags']['java_script'],'htmlarea'))
{
$GLOBALS['phpgw']->js->validate_file('htmlarea','htmlarea');
$GLOBALS['phpgw']->js->validate_file('htmlarea','dialog');
$lang = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
if ($lang == 'en') // other lang-files are utf-8 only and incomplete (crashes htmlarea as of 3.0beta)
{
$GLOBALS['phpgw']->js->validate_file('htmlarea',"lang/$lang");
}
else
{
$GLOBALS['phpgw_info']['flags']['java_script'] .=
'<script type="text/javascript" src="'.ereg_replace('[?&]*click_history=[0-9a-f]*','',$GLOBALS['phpgw']->link('/phpgwapi/inc/htmlarea-lang.php',array('lang'=>$lang))).'"></script>'."\n";
}
$GLOBALS['phpgw_info']['flags']['java_script'] .=
'<style type="text/css">@import url(/egroupware/phpgwapi/js/htmlarea/htmlarea.css);</style>
<script type="text/javascript">
var htmlareaConfig = new HTMLArea.Config();
htmlareaConfig.editorURL = '."'$this->phpgwapi_js_url/htmlarea/';
</script>\n";
}
$id = str_replace(array('[',']'),array('_',''),$name); // no brakets in the id allowed by js
$GLOBALS['phpgw']->js->set_onload("HTMLArea.replace('$id',htmlareaConfig);");
if (!empty($style)) $style = " style=\"$style\"";
return "<textarea name=\"$name\" id=\"$id\"$style>".$this->htmlspecialchars($content)."</textarea>\n";
}
function input($name,$value='',$type='',$options='' )
{
if ($type)
@ -203,7 +251,7 @@
function checkbox($name,$value='')
{
return "<input type=\"checkbox\" name=\"$name\" value=\"True\"" .($value ? ' checked' : '') . " />\n";
return "<input type=\"checkbox\" name=\"$name\" value=\"True\"" .($value ? ' checked="1"' : '') . " />\n";
}
function form($content,$hidden_vars,$url,$url_vars='',$name='',$options='',$method='POST')

View File

@ -0,0 +1,91 @@
<?php
/**************************************************************************\
* eGroupWare - API htmlarea translations (according to lang in user prefs) *
* http://www.eGroupWare.org *
* Modified by Ralf Becker <RalfBecker@outdoor-training.de> *
* This file is derived from htmlareas's lang/en.js file *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
$GLOBALS['phpgw_info']['flags'] = Array(
'currentapp' => 'home', // can't be phpgwapi, nor htmlarea (no own directory)
'noheader' => True,
'nonavbar' => True,
'noappheader' => True,
'noappfooter' => True,
'nofooter' => True,
'nocachecontrol' => True // allow cacheing
);
include('../../header.inc.php');
$GLOBALS['phpgw']->translation->add_app('htmlarea');
// I18N constants
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
// FOR TRANSLATORS:
//
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
// (at least a valid email address)
//
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
// (if this is not possible, please include a comment
// that states what encoding is necessary.)
?>
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "<?php echo $GLOBALS['phpgw_info']['user']['preferences']['common']['lang']; ?>",
tooltips: {
bold: "<?php echo lang('Bold'); ?>",
italic: "<?php echo lang('Italic'); ?>",
underline: "<?php echo lang('Underline'); ?>",
strikethrough: "<?php echo lang('Strikethrough'); ?>",
subscript: "<?php echo lang('Subscript'); ?>",
superscript: "<?php echo lang('Superscript'); ?>",
justifyleft: "<?php echo lang('Justify Left'); ?>",
justifycenter: "<?php echo lang('Justify Center'); ?>",
justifyright: "<?php echo lang('Justify Right'); ?>",
justifyfull: "<?php echo lang('Justify Full'); ?>",
insertorderedlist: "<?php echo lang('Ordered List'); ?>",
insertunorderedlist: "<?php echo lang('Bulleted List'); ?>",
outdent: "<?php echo lang('Decrease Indent'); ?>",
indent: "<?php echo lang('Increase Indent'); ?>",
forecolor: "<?php echo lang('Font Color'); ?>",
hilitecolor: "<?php echo lang('Background Color'); ?>",
inserthorizontalrule: "<?php echo lang('Horizontal Rule'); ?>",
createlink: "<?php echo lang('Insert Web Link'); ?>",
insertimage: "<?php echo lang('Insert Image'); ?>",
inserttable: "<?php echo lang('Insert Table'); ?>",
htmlmode: "<?php echo lang('Toggle HTML Source'); ?>",
popupeditor: "<?php echo lang('Enlarge Editor'); ?>",
about: "<?php echo lang('About this editor'); ?>",
showhelp: "<?php echo lang('Help using editor'); ?>",
textindicator: "<?php echo lang('Current style'); ?>",
undo: "<?php echo lang('Undoes your last action'); ?>",
redo: "<?php echo lang('Redoes your last action'); ?>",
cut: "<?php echo lang('Cut selection'); ?>",
copy: "<?php echo lang('Copy selection'); ?>",
paste: "<?php echo lang('Paste from clipboard'); ?>"
},
buttons: {
"ok": "<?php echo lang('OK'); ?>",
"cancel": "<?php echo lang('Cancel'); ?>"
},
msg: {
"Path": "<?php echo lang('Path'); ?>",
"TEXT_MODE": "<?php echo lang('You are in TEXT MODE. Use the [<>] button to switch back to WYSIWIG.'); ?>"
}
};

View File

@ -0,0 +1,72 @@
// 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;
};
};

View File

@ -0,0 +1,137 @@
<html>
<head>
<title>Example of HTMLArea 3.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- load the main HTMLArea files -->
<script type="text/javascript" src="htmlarea.js"></script>
<script type="text/javascript" src="lang/en.js"></script>
<script type="text/javascript" src="dialog.js"></script>
<!-- <script type="text/javascript" src="popupdiv.js"></script> -->
<script type="text/javascript" src="popupwin.js"></script>
<!-- load the plugins -->
<script type="text/javascript">
// WARNING: using this interface to load plugin
// will _NOT_ work if plugins do not have the language
// loaded by HTMLArea.
// In other words, this function generates SCRIPT tags
// that load the plugin and the language file, based on the
// global variable HTMLArea.I18N.lang (defined in the lang file,
// in our case "lang/en.js" loaded above).
// If this lang file is not found the plugin will fail to
// load correctly and nothing will work.
HTMLArea.loadPlugin("TableOperations");
HTMLArea.loadPlugin("SpellChecker");
</script>
<style type="text/css">
@import url(htmlarea.css);
html, body {
font-family: Verdana,sans-serif;
background-color: #fea;
color: #000;
}
a:link, a:visited { color: #00f; }
a:hover { color: #048; }
a:active { color: #f00; }
textarea { background-color: #fff; border: 1px solid 00f; }
</style>
<script type="text/javascript">
var editor = null;
function initEditor() {
// create an editor for the "ta" textbox
editor = new HTMLArea("ta");
// register the SpellChecker plugin
editor.registerPlugin("TableOperations");
// register the SpellChecker plugin
editor.registerPlugin("SpellChecker");
editor.generate();
return false;
}
function insertHTML() {
var html = prompt("Enter some HTML code here");
if (html) {
editor.insertHTML(html);
}
}
function highlight() {
editor.surroundHTML('<span style="background-color: yellow">', '</span>');
}
</script>
</head>
<!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
customizing the editor. It's the easiest way! :) -->
<body onload="initEditor()">
<h1>HTMLArea 3.0</h1>
<p>A replacement for <code>TEXTAREA</code> elements. &copy; <a
href="http://interactivetools.com">InteractiveTools.com</a>, 2003.</p>
<p>Plugins:
<tt>TableOperations<tt> |
<tt>SpellChecker</tt>
</p>
<form action="test.cgi" method="post" id="edit" name="edit">
<textarea id="ta" name="ta" style="width:100%" rows="24" cols="80">
<h1>This is the fully loaded HTMLArea ;-)</h1>
<p>It loads all the plugins that have been developed so far.</p>
<table style="background-color: #99f; border: 1px dashed #08f; width:
60%; border-collapse: collapse;" align="center">
<tr style="background-color: #fdd">
<td style="font-weight: bold; border: 1px solid #000;">Plugin</td>
<td style="font-weight: bold; border: 1px solid #000;">Sponsor</td>
</tr>
<tr>
<td style="font-family: monospace">TableOperations</td>
<td><a href="http://bloki.com">Zapatec, Inc.</a></td>
</tr>
<tr>
<td style="font-family: monospace">SpellChecker</td>
<td><a href="http://americanbible.org">Amerian Bible Society</a></td>
</tr>
</table>
</textarea>
<p />
<input type="submit" name="ok" value=" submit " />
<input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
<input type="button" name="hil" value=" highlight text " onclick="return highlight();" />
<a href="javascript:mySubmit()">submit</a>
<script type="text/javascript">
function mySubmit() {
// document.edit.save.value = "yes";
document.edit.onsubmit(); // workaround browser bugs.
document.edit.submit();
};
</script>
</form>
</body>
</html>

View File

@ -0,0 +1,134 @@
<html>
<head>
<title>Example of HTMLArea 3.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- load the main HTMLArea files -->
<script type="text/javascript" src="htmlarea.js"></script>
<script type="text/javascript" src="lang/en.js"></script>
<script type="text/javascript" src="dialog.js"></script>
<!-- <script type="text/javascript" src="popupdiv.js"></script> -->
<script type="text/javascript" src="popupwin.js"></script>
<!-- load the SpellChecker plugin files -->
<script type="text/javascript" src="plugins/SpellChecker/spell-checker.js"></script>
<script type="text/javascript" src="plugins/SpellChecker/lang/en.js"></script>
<style type="text/css">
@import url(htmlarea.css);
html, body {
font-family: Verdana,sans-serif;
background-color: #fea;
color: #000;
}
a:link, a:visited { color: #00f; }
a:hover { color: #048; }
a:active { color: #f00; }
textarea { background-color: #fff; border: 1px solid 00f; }
</style>
<script type="text/javascript">
var editor = null;
function initEditor() {
// create an editor for the "ta" textbox
editor = new HTMLArea("ta");
// register the SpellChecker plugin
editor.registerPlugin("SpellChecker");
editor.generate();
return false;
}
function insertHTML() {
var html = prompt("Enter some HTML code here");
if (html) {
editor.insertHTML(html);
}
}
function highlight() {
editor.surroundHTML('<span style="background-color: yellow">', '</span>');
}
</script>
</head>
<!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
customizing the editor. It's the easiest way! :) -->
<body onload="initEditor()">
<h1>HTMLArea 3.0</h1>
<p>A replacement for <code>TEXTAREA</code> elements. &copy; <a
href="http://interactivetools.com">InteractiveTools.com</a>, 2003.</p>
<p>Plugins:
<tt>SpellChecker</tt> (sponsored by <a
href="http://americanbible.org">American Bible Society</a>).
</p>
<form action="test.cgi" method="post" id="edit" name="edit">
<textarea id="ta" name="ta" style="width:100%" rows="24" cols="80">
<h1>The <tt>SpellChecker</tt> plugin</h1>
<p>This file deminstrates the <tt>SpellChecker</tt> plugin of
HTMLArea. To inwoke the spell checkert you need to press the
<em>spell-check</em> buton in the toolbar.</p>
<p>The spell-checker uses a serverside script written in Perl. The
Perl script calls <a href="http://aspell.net">aspell</a> for any
word in the text and reports wordz that aren't found in the
dyctionari.</p>
<p>The document that yu are reading now <b>intentionaly</b> containes
some errorz, so that you have something to corect ;-)</p>
<p>Credits for the <tt>SpellChecker</tt> plugin go to:</p>
<ul>
<li><a href="http://aspell.net">Aspell</a> -- spell
checker</li>
<li>The <a href="http://perl.org">Perl</a> programming language</li>
<li><tt><a
href="http://cpan.org/modules/by-module/Text/Text-Aspell-0.02.readme">Text::Aspell</a></tt>
-- Perl interface to Aspell</li>
<li><a href="http://americanbible.org">American Bible Society</a> --
for sponsoring the <tt>SpellChecker</tt> plugin for
<tt>HTMLArea</tt></li>
<li><a href="http://students.infoiasi.ro/~mishoo/">Your humble servant</a> for
implementing it ;-)</li>
</ul>
</textarea>
<p />
<input type="submit" name="ok" value=" submit " />
<input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
<input type="button" name="hil" value=" highlight text " onclick="return highlight();" />
<a href="javascript:mySubmit()">submit</a>
<script type="text/javascript">
function mySubmit() {
// document.edit.save.value = "yes";
document.edit.onsubmit(); // workaround browser bugs.
document.edit.submit();
};
</script>
</form>
</body>
</html>

View File

@ -0,0 +1,116 @@
<html>
<head>
<title>Example of HTMLArea 3.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- load the main HTMLArea files -->
<script type="text/javascript" src="htmlarea.js"></script>
<script type="text/javascript" src="lang/en.js"></script>
<script type="text/javascript" src="dialog.js"></script>
<!-- <script type="text/javascript" src="popupdiv.js"></script> -->
<script type="text/javascript" src="popupwin.js"></script>
<!-- load the TableOperations plugin files -->
<script type="text/javascript" src="plugins/TableOperations/table-operations.js"></script>
<script type="text/javascript" src="plugins/TableOperations/lang/en.js"></script>
<style type="text/css">
@import url(htmlarea.css);
html, body {
font-family: Verdana,sans-serif;
background-color: #fea;
color: #000;
}
a:link, a:visited { color: #00f; }
a:hover { color: #048; }
a:active { color: #f00; }
textarea { background-color: #fff; border: 1px solid 00f; }
</style>
<script type="text/javascript">
var editor = null;
function initEditor() {
// create an editor for the "ta" textbox
editor = new HTMLArea("ta");
// register the TableOperations plugin with our editor
editor.registerPlugin("TableOperations");
editor.generate();
return false;
}
function insertHTML() {
var html = prompt("Enter some HTML code here");
if (html) {
editor.insertHTML(html);
}
}
function highlight() {
editor.surroundHTML('<span style="background-color: yellow">', '</span>');
}
</script>
</head>
<!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
customizing the editor. It's the easiest way! :) -->
<body onload="initEditor()">
<h1>HTMLArea 3.0</h1>
<p>A replacement for <code>TEXTAREA</code> elements. &copy; <a
href="http://interactivetools.com">InteractiveTools.com</a>, 2003.</p>
<p>Page that demonstrates the additional features of the
<tt>TableOperations</tt> plugin (sponsored by <a
href="http://www.bloki.com">Zapatec Inc.</a>).</p>
<form action="test.cgi" method="post" id="edit" name="edit">
<textarea id="ta" name="ta" style="width:100%" rows="24" cols="80">
<h1>Plugin: <tt>TableOperations</tt></h1>
<p>This page exemplifies the table operations toolbar, provided by the
TableOperations plugin.</p>
<p>Following there is a table.</p>
<table border="1" style="border: 2px solid rgb(255, 0, 0); width: 80%; background-image: none; border-collapse: collapse; color: rgb(153, 102, 0); background-color: rgb(255, 255, 51);" align="center" cellspacing="2" cellpadding="1" summary="">
<caption>This <span style="font-weight: bold;">is</span> a table</caption>
<tbody>
<tr style="border-style: none; background-image: none; background-color: rgb(255, 255, 153);" char="." align="left" valign="middle"> <td>1.1</td> <td>1.2</td> <td>1.3</td> <td>1.4</td> </tr>
<tr> <td>2.1</td> <td style="border: 1px solid rgb(51, 51, 255); background-image: none; background-color: rgb(102, 255, 255); color: rgb(0, 0, 51);" char="." align="left" valign="middle">2.2</td> <td>2.3</td> <td>2.4</td> </tr>
<tr> <td>3.1</td> <td>3.2</td> <td style="border: 2px dashed rgb(51, 204, 102); background-image: none; background-color: rgb(102, 255, 153); color: rgb(0, 51, 0);" char="." align="left" valign="middle">3.3</td> <td>3.4</td> </tr>
<tr> <td style="background-color: rgb(255, 204, 51);">4.1</td> <td style="background-color: rgb(255, 204, 51);">4.2</td> <td style="background-color: rgb(255, 204, 51);">4.3</td> <td style="background-color: rgb(255, 204, 51);">4.4</td> </tr>
</tbody>
</table>
<p>Text after the table</p>
</textarea>
<p />
<input type="submit" name="ok" value=" submit " />
<input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
<input type="button" name="hil" value=" highlight text " onclick="return highlight();" />
<a href="javascript:mySubmit()">submit</a>
<script type="text/javascript">
function mySubmit() {
// document.edit.save.value = "yes";
document.edit.onsubmit(); // workaround browser bugs.
document.edit.submit();
};
</script>
</form>
</body>
</html>

View File

@ -0,0 +1,181 @@
<html>
<head>
<title>Example of HTMLArea 3.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="htmlarea.js"></script>
<script type="text/javascript" src="lang/en.js"></script>
<script type="text/javascript" src="dialog.js"></script>
<style type="text/css">
@import url(htmlarea.css);
html, body {
font-family: Verdana,sans-serif;
background-color: #fea;
color: #000;
}
a:link, a:visited { color: #00f; }
a:hover { color: #048; }
a:active { color: #f00; }
textarea { background-color: #fff; border: 1px solid 00f; }
</style>
<script type="text/javascript">
var editor = null;
function initEditor() {
editor = new HTMLArea("ta");
// comment the following two lines to see how customization works
editor.generate();
return false;
var cfg = editor.config; // this is the default configuration
cfg.registerButton({
id : "my-hilite",
tooltip : "Highlight text",
image : "ed_custom.gif",
textMode : false,
action : function(editor) {
editor.surroundHTML("<span class=\"hilite\">", "</span>");
},
context : 'table'
});
cfg.toolbar.push(["linebreak", "my-hilite"]); // add the new button to the toolbar
// BEGIN: code that adds a custom button
// uncomment it to test
var cfg = editor.config; // this is the default configuration
/*
cfg.registerButton({
id : "my-hilite",
tooltip : "Highlight text",
image : "ed_custom.gif",
textMode : false,
action : function(editor) {
editor.surroundHTML("<span class=\"hilite\">", "</span>");
}
});
*/
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;
case "my-bold":
editor.execCommand("bold");
editor.execCommand("italic");
break;
case "my-hilite":
editor.surroundHTML("<span class=\"hilite\">", "</span>");
break;
}
};
cfg.registerButton("my-toc", "Insert TOC", "ed_custom.gif", false, clickHandler);
cfg.registerButton("my-date", "Insert date/time", "ed_custom.gif", false, clickHandler);
cfg.registerButton("my-bold", "Toggle bold/italic", "ed_custom.gif", false, clickHandler);
cfg.registerButton("my-hilite", "Hilite selection", "ed_custom.gif", false, clickHandler);
cfg.registerButton("my-sample", "Class: sample", "ed_custom.gif", false,
function(editor) {
if (HTMLArea.is_ie) {
editor.insertHTML("<span class=\"sample\">&nbsp;&nbsp;</span>");
var r = editor._doc.selection.createRange();
r.move("character", -2);
r.moveEnd("character", 2);
r.select();
} else { // Gecko/W3C compliant
var n = editor._doc.createElement("span");
n.className = "sample";
editor.insertNodeAtSelection(n);
var sel = editor._iframe.contentWindow.getSelection();
sel.removeAllRanges();
var r = editor._doc.createRange();
r.setStart(n, 0);
r.setEnd(n, 0);
sel.addRange(r);
}
}
);
/*
cfg.registerButton("my-hilite", "Highlight text", "ed_custom.gif", false,
function(editor) {
editor.surroundHTML('<span class="hilite">', '</span>');
}
);
*/
cfg.pageStyle = "body { background-color: #efd; } .hilite { background-color: yellow; } "+
".sample { color: green; font-family: monospace; }";
cfg.toolbar.push(["linebreak", "my-toc", "my-date", "my-bold", "my-hilite", "my-sample"]); // add the new button to the toolbar
// END: code that adds a custom button
editor.generate();
}
function insertHTML() {
var html = prompt("Enter some HTML code here");
if (html) {
editor.insertHTML(html);
}
}
function highlight() {
editor.surroundHTML('<span style="background-color: yellow">', '</span>');
}
</script>
</head>
<!-- use <body onload="HTMLArea.replaceAll()" if you don't care about
customizing the editor. It's the easiest way! :) -->
<body onload="initEditor()">
<h1>HTMLArea 3.0</h1>
<p>A replacement for <code>TEXTAREA</code> elements. &copy; <a
href="http://interactivetools.com">InteractiveTools.com</a>, 2003.</p>
<form action="test.cgi" method="post" id="edit" name="edit">
<textarea id="ta" name="ta" style="width:100%" rows="20" cols="80">
&lt;p&gt;Here is some sample text: &lt;b&gt;bold&lt;/b&gt;, &lt;i&gt;italic&lt;/i&gt;, &lt;u&gt;underline&lt;/u&gt;. &lt;/p&gt;
&lt;p align=center&gt;Different fonts, sizes and colors (all in bold):&lt;/p&gt;
&lt;p&gt;&lt;b&gt;
&lt;font face="arial" size="7" color="#000066"&gt;arial&lt;/font&gt;,
&lt;font face="courier new" size="6" color="#006600"&gt;courier new&lt;/font&gt;,
&lt;font face="georgia" size="5" color="#006666"&gt;georgia&lt;/font&gt;,
&lt;font face="tahoma" size="4" color="#660000"&gt;tahoma&lt;/font&gt;,
&lt;font face="times new roman" size="3" color="#660066"&gt;times new roman&lt;/font&gt;,
&lt;font face="verdana" size="2" color="#666600"&gt;verdana&lt;/font&gt;,
&lt;font face="tahoma" size="1" color="#666666"&gt;tahoma&lt;/font&gt;
&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Click on &lt;a href="http://www.interactivetools.com/"&gt;this link&lt;/a&gt; and then on the link button to the details ... OR ... select some text and click link to create a &lt;b&gt;new&lt;/b&gt; link.&lt;/p&gt;
</textarea>
<p />
<input type="submit" name="ok" value=" submit " />
<input type="button" name="ins" value=" insert html " onclick="return insertHTML();" />
<input type="button" name="hil" value=" highlight text " onclick="return highlight();" />
<a href="javascript:mySubmit()">submit</a>
<script type="text/javascript">
function mySubmit() {
// document.edit.save.value = "yes";
document.edit.onsubmit(); // workaround browser bugs.
document.edit.submit();
};
</script>
</form>
</body>
</html>

View File

@ -0,0 +1,180 @@
.htmlarea { background: #fff; }
.htmlarea .toolbar {
cursor: default;
background: ButtonFace;
padding: 1px 1px 2px 1px;
border: 1px solid;
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
}
.htmlarea .toolbar table { font-family: tahoma,verdana,sans-serif; font-size: 11px; }
.htmlarea .toolbar img { border: none; }
.htmlarea .toolbar .label { padding: 0px 3px; }
.htmlarea .toolbar .button {
background: ButtonFace;
color: ButtonText;
border: 1px solid ButtonFace;
padding: 1px;
margin: 0px;
}
.htmlarea .toolbar .buttonHover {
border: 1px solid;
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
}
.htmlarea .toolbar .buttonActive, .htmlarea .toolbar .buttonPressed {
padding: 2px 0px 0px 2px;
border: 1px solid;
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
}
.htmlarea .toolbar .buttonPressed {
background: ButtonHighlight;
}
.htmlarea .toolbar .indicator {
padding: 0px 3px;
overflow: hidden;
width: 20px;
text-align: center;
cursor: default;
border: 1px solid ButtonShadow;
}
.htmlarea .toolbar .buttonDisabled { background-color: #aaa; }
.htmlarea .toolbar .buttonDisabled img {
filter: alpha(opacity = 25);
-moz-opacity: 25%;
}
.htmlarea .toolbar .separator {
position: relative;
margin: 3px;
border-left: 1px solid ButtonShadow;
border-right: 1px solid ButtonHighlight;
width: 0px;
height: 16px;
padding: 0px;
}
.htmlarea .toolbar .space { width: 5px; }
.htmlarea .toolbar select { font: 11px Tahoma,Verdana,sans-serif; }
.htmlarea .toolbar select,
.htmlarea .toolbar select:hover,
.htmlarea .toolbar select:active { background: FieldFace; color: ButtonText; }
.htmlarea .statusBar {
border: 1px solid;
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
padding: 2px 4px;
background-color: ButtonFace;
color: ButtonText;
font: 11px Tahoma,Verdana,sans-serif;
}
.htmlarea .statusBar .statusBarTree a {
padding: 2px 5px;
color: #00f;
}
.htmlarea .statusBar .statusBarTree a:visited { color: #00f; }
.htmlarea .statusBar .statusBarTree a:hover {
background-color: Highlight;
color: HighlightText;
padding: 1px 4px;
border: 1px solid HighlightText;
}
/* Hidden DIV popup dialogs (PopupDiv) */
.dialog {
color: ButtonText;
background: ButtonFace;
}
.dialog .content { padding: 2px; }
.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table {
font: 11px Tahoma,Verdana,sans-serif;
}
.dialog table { border-collapse: collapse; }
.dialog .title {
background: #008;
color: #ff8;
border-bottom: 1px solid #000;
padding: 1px 0px 2px 5px;
font-size: 12px;
font-weight: bold;
cursor: default;
}
.dialog .title .button {
float: right;
border: 1px solid #66a;
padding: 0px 1px 0px 2px;
margin-right: 1px;
color: #fff;
text-align: center;
}
.dialog .title .button-hilite { border-color: #88f; background: #44c; }
.dialog button {
width: 5em;
padding: 0px;
}
.dialog .buttonColor {
padding: 1px;
cursor: default;
border: 1px solid;
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
}
.dialog .buttonColor-hilite {
border-color: #000;
}
.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor {
height: 0.6em;
border: 1px solid;
padding: 0px 1em;
border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
}
.dialog .buttonColor .nocolor { padding: 0px; }
.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; }
.dialog .label { text-align: right; width: 6em; }
.dialog .value input { width: 100%; }
.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; }
.dialog legend { font-weight: bold; }
.dialog fieldset table { margin: 2px 0px; }
.popupdiv {
border: 2px solid;
border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
}
.popupwin {
padding: 0px;
margin: 0px;
}
.popupwin .title {
background: #fff;
color: #000;
font-weight: bold;
font-size: 120%;
padding: 3px 10px;
margin-bottom: 10px;
border-bottom: 1px solid black;
letter-spacing: 2px;
}
form { margin: 0px; border: none; }

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

View File

@ -0,0 +1,190 @@
<!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:mishoo@infoiasi.ro">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>

View File

@ -0,0 +1,36 @@
// I18N constants -- Chinese Big-5
// by Dave Lo -- dlo@interactivetools.com
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "b5",
tooltips: {
bold: "粗體",
italic: "斜體",
underline: "底線",
strikethrough: "刪除線",
subscript: "下標",
superscript: "上標",
justifyleft: "位置靠左",
justifycenter: "位置居中",
justifyright: "位置靠右",
justifyfull: "位置左右平等",
orderedlist: "順序清單",
unorderedlist: "無序清單",
outdent: "減小行前空白",
indent: "加寬行前空白",
forecolor: "文字顏色",
backcolor: "背景顏色",
horizontalrule: "水平線",
createlink: "插入連結",
insertimage: "插入圖形",
inserttable: "插入表格",
htmlmode: "切換HTML原始碼",
popupeditor: "放大",
about: "關於 HTMLArea",
help: "說明",
textindicator: "字體例子"
}
};

View File

@ -0,0 +1,38 @@
// danish version for htmlArea v3.0 - Alpha Release
// - translated by rene<rene@laerke.net>
// term´s and licenses are equal to htmlarea!
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "da",
tooltips: {
bold: "Fed",
italic: "Kursiv",
underline: "Understregning",
strikethrough: "Overstregning ",
subscript: "Sænket skrift",
superscript: "Hævet skrift",
justifyleft: "Venstrejuster",
justifycenter: "Centrer",
justifyright: "Højrejuster",
justifyfull: "Lige margener",
orderedlist: "Opstilling med tal",
unorderedlist: "Opstilling med punkttegn",
outdent: "Formindsk indrykning",
indent: "Forøg indrykning",
forecolor: "Skriftfarve",
backcolor: "Baggrundsfarve",
horizontalrule: "Horisontal linie",
createlink: "Indsæt hyperlink",
insertimage: "Indsæt billede",
inserttable: "Indsæt tabel",
htmlmode: "HTML visning",
popupeditor: "Vis editor i popup",
about: "Om htmlarea",
help: "Hjælp",
textindicator: "Anvendt stil"
}
};

View File

@ -0,0 +1,53 @@
// german version for htmlArea v3.0 - Alpha Release
// - translated by AtK<atk@chello.at>
// term´s and licenses are equal to htmlarea!
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "de",
tooltips: {
bold: "Fett",
italic: "Kursiv",
underline: "Unterstrichen",
strikethrough: "Durchgestrichen",
subscript: "hochgestellt",
superscript: "tiefgestellt",
justifyleft: "Links ausrichten",
justifycenter: "Zentrieren",
justifyright: "Rechts ausrichten",
justifyfull: "Blocksatz",
orderedlist: "Nummerierung",
unorderedlist: "Aufzählungszeichen",
outdent: "Einzug verkleinern",
indent: "Einzug vergrössern",
forecolor: "Text Farbe",
backcolor: "Hintergrund Farbe",
horizontalrule: "Horizontale Linie",
createlink: "Hyperlink einfügen",
insertimage: "Bild einfügen",
inserttable: "Tabelle einfügen",
htmlmode: "HTML Modus",
popupeditor: "Editor im Popup öffnen",
about: "Über htmlarea",
help: "Hilfe",
textindicator: "derzeitiger Stil",
undo: "macht ihre letzte Aktion rückgängig",
redo: "führt ihre letzte Aktion wieder aus",
cut: "Auswahl ausschneiden",
copy: "Auswahl kopieren",
paste: "einfügen aus Zwischenablage"
},
buttons: {
"ok": "OK",
"cancel": "Abruch"
},
msg: {
"Path": "Pfad",
"TEXT_MODE": "Sie sind in TEXT MODE. Benützen sie den [<>] Knopf um zu WYSIWIG zurück zu wechseln."
}
};

View File

@ -0,0 +1,63 @@
// I18N constants
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
// FOR TRANSLATORS:
//
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
// (at least a valid email address)
//
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
// (if this is not possible, please include a comment
// that states what encoding is necessary.)
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "en",
tooltips: {
bold: "Bold",
italic: "Italic",
underline: "Underline",
strikethrough: "Strikethrough",
subscript: "Subscript",
superscript: "Superscript",
justifyleft: "Justify Left",
justifycenter: "Justify Center",
justifyright: "Justify Right",
justifyfull: "Justify Full",
orderedlist: "Ordered List",
unorderedlist: "Bulleted List",
outdent: "Decrease Indent",
indent: "Increase Indent",
forecolor: "Font Color",
hilitecolor: "Background Color",
horizontalrule: "Horizontal Rule",
createlink: "Insert Web Link",
insertimage: "Insert Image",
inserttable: "Insert Table",
htmlmode: "Toggle HTML Source",
popupeditor: "Enlarge Editor",
about: "About this editor",
showhelp: "Help using editor",
textindicator: "Current style",
undo: "Undoes your last action",
redo: "Redoes your last action",
cut: "Cut selection",
copy: "Copy selection",
paste: "Paste from clipboard"
},
buttons: {
"ok": "OK",
"cancel": "Cancel"
},
msg: {
"Path": "Path",
"TEXT_MODE": "You are in TEXT MODE. Use the [<>] button to switch back to WYSIWIG."
}
};

View File

@ -0,0 +1,36 @@
// I18N constants
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "es",
tooltips: {
bold: "Negritas",
italic: "Cursiva",
underline: "Subrayado",
strikethrough: "Texto Cruzado",
subscript: "Subscript",
superscript: "Superscript",
justifyleft: "Alinear a la Izquierda",
justifycenter: "Centrar",
justifyright: "Alinear a la Derecha",
justifyfull: "Justificar",
orderedlist: "Lista Ordenada",
unorderedlist: "Lista No Ordenada",
outdent: "Aumentar Sangría",
indent: "Disminuir Sangría",
forecolor: "Color del Texto",
backcolor: "Color del Fondo",
horizontalrule: "Línea Horizontal",
createlink: "Insertar Enlace",
insertimage: "Insertar Imagen",
inserttable: "Insertar Tabla",
htmlmode: "Ver Documento en HTML",
popupeditor: "Ampliar Editor",
about: "Acerca del Editor",
help: "Ayuda",
textindicator: "Estilo Actual"
}
};

View File

@ -0,0 +1,46 @@
// I18N constants
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "en",
tooltips: {
bold: "Lihavoitu",
italic: "Kursivoitu",
underline: "Alleviivattu",
strikethrough: "Yliviivattu",
subscript: "Alaindeksi",
superscript: "Yläindeksi",
justifyleft: "Tasaa vasemmat reunat",
justifycenter: "Keskitä",
justifyright: "Tasaa oikeat reunat",
justifyfull: "Tasaa molemmat reunat",
insertorderedlist: "Numerointi",
insertunorderedlist: "Luettelomerkit",
outdent: "Lisää sisennystä",
indent: "Pienennä sisennystä",
forecolor: "Fontin väri",
hilitecolor: "Taustaväri",
inserthorizontalrule: "Vaakaviiva",
createlink: "Lisää Linkki",
insertimage: "Lisää Kuva",
inserttable: "Lisää Taulu",
htmlmode: "HTML Lähdekoodi vs WYSIWYG",
popupeditor: "Suurenna Editori",
about: "Tietoja Editorista",
showhelp: "Näytä Ohje",
textindicator: "Nykyinen tyyli",
undo: "Peruuta viimeinen toiminto",
redo: "Palauta viimeinen toiminto",
cut: "Leikkaa maalattu",
copy: "Kopioi maalattu",
paste: "Liitä leikepyödältä"
},
buttons: {
"ok": "Hyväksy",
"cancel": "Peruuta"
}
};

View File

@ -0,0 +1,36 @@
// I18N constants
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "fr",
tooltips: {
bold: "Gras",
italic: "Italique",
underline: "Souligné",
strikethrough: "Barré",
subscript: "Subscript",
superscript: "Superscript",
justifyleft: "Aligné à gauche",
justifycenter: "Centré",
justifyright: "Aligné à droite",
justifyfull: "Justifié",
orderedlist: "Numérotation",
unorderedlist: "Puces",
outdent: "Augmenter le retrait",
indent: "Diminuer le retrait",
forecolor: "Couleur du texte",
backcolor: "Couleur du fond",
horizontalrule: "Ligne horizontale",
createlink: "Insérer un lien",
insertimage: "Insérer une image",
inserttable: "Insérer un tableau",
htmlmode: "Passer au code source HTML",
popupeditor: "Agrandir l'éditeur",
about: "A propos de cet éditeur",
help: "Aide sur l'éditeur",
textindicator: "Style courant"
}
};

View File

@ -0,0 +1,36 @@
// I18N constants -- Chinese GB
// by Dave Lo -- dlo@interactivetools.com
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "gb",
tooltips: {
bold: "粗体",
italic: "斜体",
underline: "底线",
strikethrough: "删除线",
subscript: "下标",
superscript: "上标",
justifyleft: "位置靠左",
justifycenter: "位置居中",
justifyright: "位置靠右",
justifyfull: "位置左右平等",
orderedlist: "顺序清单",
unorderedlist: "无序清单",
outdent: "减小行前空白",
indent: "加宽行前空白",
forecolor: "文字颜色",
backcolor: "背景颜色",
horizontalrule: "水平线",
createlink: "插入连结",
insertimage: "插入图形",
inserttable: "插入表格",
htmlmode: "切换HTML原始码",
popupeditor: "放大",
about: "关於 HTMLArea",
help: "说明",
textindicator: "字体例子"
}
};

View File

@ -0,0 +1,36 @@
// I18N constants
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "it",
tooltips: {
bold: "Grassetto",
italic: "Corsivo",
underline: "Sottolineato",
strikethrough: "Barrato",
subscript: "Pedice",
superscript: "Apice",
justifyleft: "Allinea a sinistra",
justifycenter: "Centra",
justifyright: "Allinea a destra",
justifyfull: "Giustifica",
orderedlist: "Elenco numerato",
unorderedlist: "Elenco puntato",
outdent: "Riduci rientro",
indent: "Aumenta rientro",
forecolor: "Colore carattere",
backcolor: "Colore di sfondo",
horizontalrule: "Linea orizzontale",
createlink: "Inserisci collegamento ipertestuale",
insertimage: "Inserisci immagine",
inserttable: "Inserisci tabella",
htmlmode: "Passa alla visualizzazione HTML",
popupeditor: "Ingrandisci editor",
about: "Info",
help: "Aiuto",
textindicator: "Stile utilizzato"
}
};

View File

@ -0,0 +1,37 @@
// I18N constants -- Japanese EUC
// by Manabu Onoue -- tmocsys@tmocsys.com
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "ja-euc",
tooltips: {
bold: "太字",
italic: "斜体",
underline: "下線",
strikethrough: "打ち消し線",
subscript: "下付き添え字",
superscript: "上付き添え字",
justifyleft: "左寄せ",
justifycenter: "中央寄せ",
justifyright: "右寄せ",
justifyfull: "均等割付",
orderedlist: "番号付き箇条書き",
unorderedlist: "記号付き箇条書き",
outdent: "インデント解除",
indent: "インデント設定",
forecolor: "文字色",
backcolor: "背景色",
horizontalrule: "水平線",
createlink: "リンク作成",
insertimage: "画像挿入",
inserttable: "テーブル挿入",
htmlmode: "HTML表示切替",
popupeditor: "エディタ拡大",
about: "バージョン情報",
help: "ヘルプ",
textindicator: "現在のスタイル"
}
};

View File

@ -0,0 +1,37 @@
// I18N constants -- Japanese JIS
// by Manabu Onoue -- tmocsys@tmocsys.com
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "ja-jis",
tooltips: {
bold: "$BB@;z(B",
italic: "$B<PBN(B",
underline: "$B2<@~(B",
strikethrough: "$BBG$A>C$7@~(B",
subscript: "$B2<IU$-E:$(;z(B",
superscript: "$B>eIU$-E:$(;z(B",
justifyleft: "$B:84s$;(B",
justifycenter: "$BCf1{4s$;(B",
justifyright: "$B1&4s$;(B",
justifyfull: "$B6QEy3dIU(B",
orderedlist: "$BHV9fIU$-2U>r=q$-(B",
unorderedlist: "$B5-9fIU$-2U>r=q$-(B",
outdent: "$B%$%s%G%s%H2r=|(B",
indent: "$B%$%s%G%s%H@_Dj(B",
forecolor: "$BJ8;z?'(B",
backcolor: "$BGX7J?'(B",
horizontalrule: "$B?eJ?@~(B",
createlink: "$B%j%s%/:n@.(B",
insertimage: "$B2hA|A^F~(B",
inserttable: "$B%F!<%V%kA^F~(B",
htmlmode: "HTML$BI=<(@ZBX(B",
popupeditor: "$B%(%G%#%?3HBg(B",
about: "$B%P!<%8%g%s>pJs(B",
help: "$B%X%k%W(B",
textindicator: "$B8=:_$N%9%?%$%k(B"
}
};

View File

@ -0,0 +1,37 @@
// I18N constants -- Japanese Shift-JIS
// by Manabu Onoue -- tmocsys@tmocsys.com
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "ja-sjis",
tooltips: {
bold: "太字",
italic: "斜体",
underline: "下線",
strikethrough: "打ち消し線",
subscript: "下付き添え字",
superscript: "上付き添え字",
justifyleft: "左寄せ",
justifycenter: "中央寄せ",
justifyright: "右寄せ",
justifyfull: "均等割付",
orderedlist: "番号付き箇条書き",
unorderedlist: "記号付き箇条書き",
outdent: "インデント解除",
indent: "インデント設定",
forecolor: "文字色",
backcolor: "背景色",
horizontalrule: "水平線",
createlink: "リンク作成",
insertimage: "画像挿入",
inserttable: "テーブル挿入",
htmlmode: "HTML表示切替",
popupeditor: "エディタ拡大",
about: "バージョン情報",
help: "ヘルプ",
textindicator: "現在のスタイル"
}
};

View File

@ -0,0 +1,37 @@
// I18N constants -- Japanese UTF-8
// by Manabu Onoue -- tmocsys@tmocsys.com
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "ja-utf8",
tooltips: {
bold: "太字",
italic: "斜体",
underline: "下線",
strikethrough: "打ち消し線",
subscript: "下付き添え字",
superscript: "上付き添え字",
justifyleft: "左寄せ",
justifycenter: "中央寄せ",
justifyright: "右寄せ",
justifyfull: "均等割付",
orderedlist: "番号付き箇条書き",
unorderedlist: "記号付き箇条書き",
outdent: "インデント解除",
indent: "インデント設定",
forecolor: "文字色",
backcolor: "背景色",
horizontalrule: "水平線",
createlink: "リンク作成",
insertimage: "画像挿入",
inserttable: "テーブル挿入",
htmlmode: "HTML表示切替",
popupeditor: "エディタ拡大",
about: "バージョン情報",
help: "ヘルプ",
textindicator: "現在のスタイル"
}
};

View File

@ -0,0 +1,36 @@
// I18N constants
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "nb",
tooltips: {
bold: "Fet",
italic: "Kursiv",
underline: "Understreket",
strikethrough: "Gjennomstreket",
subscript: "Senket",
superscript: "Hevet",
justifyleft: "Venstrejuster",
justifycenter: "Midtjuster",
justifyright: "Høyrejuster",
justifyfull: "Blokkjuster",
orderedlist: "Nummerert liste",
unorderedlist: "Punktmerket liste",
outdent: "Øke innrykk",
indent: "Reduser innrykk",
forecolor: "Skriftfarge",
backcolor: "Bakgrunnsfarge",
horizontalrule: "Horisontal linje",
createlink: "Sett inn lenke",
insertimage: "Sett inn bilde",
inserttable: "Sett inn tabell",
htmlmode: "Vis HTML kode",
popupeditor: "Forstørr redigeringsvindu",
about: "Om..",
help: "Hjelp",
textindicator: "Gjeldende stil"
}
};

View File

@ -0,0 +1,37 @@
// Dutch version
// Author: Wouter Meeus alias Redspider <webmaster@tielt.be>
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "nl",
tooltips: {
bold: "Vet",
italic: "Cursief",
underline: "Onderlijnen",
strikethrough: "Doorstrepen",
subscript: "Subscript",
superscript: "Superscript",
justifyleft: "Links Uitlijnen",
justifycenter: "Centreren",
justifyright: "Rechts Uitlijnen",
justifyfull: "Uitvullen",
orderedlist: "Nummering",
unorderedlist: "Opsomming",
outdent: "Verklein insprong",
indent: "Vergroot insprong",
forecolor: "Tekst Kleur",
backcolor: "Achtergrond Kleur",
horizontalrule: "Horizontale lijn",
createlink: "Hyperlink invoegen",
insertimage: "Afbeelding invoegen",
inserttable: "Tabel invoegen",
htmlmode: "HTML broncode",
popupeditor: "Vergroot Editor",
about: "Over deze editor",
help: "Help",
textindicator: "Huidige stijl"
}
};

View File

@ -0,0 +1,36 @@
// I18N constants
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "pl",
tooltips: {
bold: "Pogrubienie",
italic: "Pochylenie",
underline: "Podkreślenie",
strikethrough: "Przekreślenie",
subscript: "Indeks dolny",
superscript: "Indeks górny",
justifyleft: "Wyrównaj do lewej",
justifycenter: "Wyśrodkuj",
justifyright: "Wyrównaj do prawej",
justifyfull: "Wyjustuj",
orderedlist: "Numerowanie",
unorderedlist: "Wypunktowanie",
outdent: "Zmniejsz wcięcie",
indent: "Zwiększ wcięcie",
forecolor: "Kolor czcionki",
backcolor: "Kolor tła",
horizontalrule: "Linia pozioma",
createlink: "Wstaw adres sieci Web",
insertimage: "Wstaw obraz",
inserttable: "Wstaw tabelę",
htmlmode: "Edycja WYSIWYG/w źródle strony",
popupeditor: "Pełny ekran",
about: "Informacje o tym edytorze",
help: "Pomoc",
textindicator: "Obecny styl"
}
};

View File

@ -0,0 +1,37 @@
// I18N constants
// Brazilian Portuguese Translation by Alex Piaz <webmaster@globalmap.com>
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "pt_br",
tooltips: {
bold: "Negrito",
italic: "Itálico",
underline: "Sublinhado",
strikethrough: "Tachado",
subscript: "Subescrito",
superscript: "Sobrescrito",
justifyleft: "Alinhar à Esquerda",
justifycenter: "Centralizar",
justifyright: "Alinhar à Direita",
justifyfull: "Justificar",
orderedlist: "Lista Numerada",
unorderedlist: "Lista Marcadores",
outdent: "Diminuir Indentação",
indent: "Aumentar Indentação",
forecolor: "Cor da Fonte",
backcolor: "Cor do Fundo",
horizontalrule: "Linha Horizontal",
createlink: "Inserir Link",
insertimage: "Inserir Imagem",
inserttable: "Inserir Tabela",
htmlmode: "Ver Código-Fonte",
popupeditor: "Expandir Editor",
about: "Sobre",
help: "Ajuda",
textindicator: "Estilo Atual"
}
};

View File

@ -0,0 +1,63 @@
// I18N constants
// LANG: "ro", ENCODING: UTF-8
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
// FOR TRANSLATORS:
//
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
// (at least a valid email address)
//
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
// (if this is not possible, please include a comment
// that states what encoding is necessary.)
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "ro",
tooltips: {
bold: "Îngroşat",
italic: "Italic",
underline: "Subliniat",
strikethrough: "Tăiat",
subscript: "Subscript",
superscript: "Superscript",
justifyleft: "Aliniere la stânga",
justifycenter: "Aliniere pe centru",
justifyright: "Aliniere la dreapta",
justifyfull: "Aliniere în ambele părţi",
orderedlist: "Listă ordonată",
unorderedlist: "Listă marcată",
outdent: "Micşorează alineatul",
indent: "Măreşte alineatul",
forecolor: "Culoarea textului",
hilitecolor: "Culoare de fundal",
horizontalrule: "Linie orizontală",
createlink: "Inserează link",
insertimage: "Inserează o imagine",
inserttable: "Inserează un tabel",
htmlmode: "Sursa HTML / WYSIWYG",
popupeditor: "Maximizează editorul",
about: "Despre editor",
showhelp: "Documentaţie (devel)",
textindicator: "Stilul curent",
undo: "Anulează ultima acţiune",
redo: "Reface ultima acţiune anulată",
cut: "Taie în clipboard",
copy: "Copie în clipboard",
paste: "Aduce din clipboard"
},
buttons: {
"ok": "OK",
"cancel": "Anulează"
},
msg: {
"Path": "Calea",
"TEXT_MODE": "Eşti în modul TEXT. Apasă butonul [<>] pentru a te întoarce în modul WYSIWYG."
}
};

View File

@ -0,0 +1,36 @@
// I18N constants
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "ru",
tooltips: {
bold: "Жирный",
italic: "Наклонный",
underline: "Подчеркнутый",
strikethrough: "Перечеркнутый",
subscript: "Нижний индекс",
superscript: "Верхний индекс",
justifyleft: "Выравнивание по левому краю",
justifycenter: "Выравнивание по центру",
justifyright: "Выравнивание по правому краю",
justifyfull: "Растянутый текст",
orderedlist: "Нумерованный список",
unorderedlist: "Маркированный список",
outdent: "Сдвиг в лево",
indent: "Сдвиг в право",
forecolor: "Цвет шрифта",
backcolor: "Цвет фона",
horizontalrule: "Горизонтальная линия",
createlink: "Вставить ссылку",
insertimage: "Вставить картинку",
inserttable: "Вставить таблицу",
htmlmode: "Видеть HTML код",
popupeditor: "Увеличить редактор",
about: "О редакторе",
help: "Помощь в использовании",
textindicator: "Данный стиль"
}
};

View File

@ -0,0 +1,38 @@
// Swedish version for htmlArea v3.0 - Alpha Release
// - translated by pat<pat@engvall.nu>
// term´s and licenses are equal to htmlarea!
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "se",
tooltips: {
bold: "Fet",
italic: "Kursiv",
underline: "Understruken",
strikethrough: "Genomstruken",
subscript: "Nedsänkt",
superscript: "Upphöjd",
justifyleft: "Vänsterjustera",
justifycenter: "Centrera",
justifyright: "Högerjustera",
justifyfull: "Marginaljustera",
orderedlist: "Numrerad lista",
unorderedlist: "Punktlista",
outdent: "Minska indrag",
indent: "Öka indrag",
forecolor: "Textfärg",
backcolor: "Bakgrundsfärg",
horizontalrule: "Vågrät linje",
createlink: "Infoga länk",
insertimage: "Infoga bild",
inserttable: "Infoga tabell",
htmlmode: "Visa källkod",
popupeditor: "Visa i eget fönster",
about: "Om denna editor",
help: "Hjälp",
textindicator: "Nuvarande stil"
}
};

View File

@ -0,0 +1,38 @@
// I18N constants : Vietnamese
// mviet: download the free Vietnamese script addon for htmlArea at: www.mviet.org
// email: mviet@socal.rr.com
HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "vn",
tooltips: {
bold: "Đậm",
italic: "Nghiêng",
underline: "Gạch Đít",
strikethrough: "Gạch Xóa",
subscript: "Viết Xuống Dưới",
superscript: "Viết Lên Trên ",
justifyleft: "Ngay Hàng Bên Trái ",
justifycenter: "Ngay Hàng Giữa",
justifyright: "Ngay Hàng Lên Phải",
justifyfull: "Ngay Hàng Trái & Phải",
orderedlist: "Chuỗi Thứ Tự 123",
unorderedlist: "Chuỗi Nút",
outdent: "Giảm Vào Hàng",
indent: "Tăng Vào Hàng",
forecolor: "Màu Chữ",
backcolor: "Màu Nền",
horizontalrule: "Thước Ngang",
createlink: "Tạo Nối",
insertimage: "Mang Hình Vô",
inserttable: "Mang Khuôn Vô",
htmlmode: "Bật / Tắt Nguồn HTML",
popupeditor: "Póp Lớn Khung Viết",
about: "Nói Về Chương Trình",
help: "Giúp Đỡ",
textindicator: "Loại Kiểu Viết"
}
};

View File

@ -0,0 +1,13 @@
htmlArea License (based on BSD license)
Copyright (c) 2002, interactivetools.com, inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3) Neither the name of interactivetools.com, inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

View File

@ -0,0 +1,37 @@
// I18N constants
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
// FOR TRANSLATORS:
//
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
// (at least a valid email address)
//
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
// (if this is not possible, please include a comment
// that states what encoding is necessary.)
SpellChecker.I18N = {
"CONFIRM_LINK_CLICK" : "Please confirm that you want to open this link",
"Cancel" : "Cancel",
"Dictionary" : "Dictionary",
"Finished list of mispelled words" : "Finished list of mispelled words",
"I will open it in a new page." : "I will open it in a new page.",
"Ignore all" : "Ignore all",
"Ignore" : "Ignore",
"NO_ERRORS" : "No mispelled words found with the selected dictionary.",
"NO_ERRORS_CLOSING" : "Spell check complete, didn't find any mispelled words. Closing now...",
"OK" : "OK",
"Original word" : "Original word",
"Please wait. Calling spell checker." : "Please wait. Calling spell checker.",
"Please wait: changing dictionary to" : "Please wait: changing dictionary to",
"QUIT_CONFIRMATION" : "This will drop changes and quit spell checker. Please confirm.",
"Re-check" : "Re-check",
"Replace all" : "Replace all",
"Replace with" : "Replace with",
"Replace" : "Replace",
"SC-spell-check" : "Spell-check",
"Suggestions" : "Suggestions",
"pliz weit ;-)" : "pliz weit ;-)"
};

View File

@ -0,0 +1,37 @@
// I18N constants
// LANG: "ro", ENCODING: UTF-8
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
// FOR TRANSLATORS:
//
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
// (at least a valid email address)
//
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
// (if this is not possible, please include a comment
// that states what encoding is necessary.)
SpellChecker.I18N = {
"CONFIRM_LINK_CLICK" : "Vă rog confirmaţi că vreţi să deschideţi acest link",
"Cancel" : "Anulează",
"Dictionary" : "Dicţionar",
"Finished list of mispelled words" : "Am terminat lista de cuvinte greşite",
"I will open it in a new page." : "O voi deschide într-o altă fereastră.",
"Ignore all" : "Ignoră toate",
"Ignore" : "Ignoră",
"NO_ERRORS" : "Nu am găsit nici un cuvânt greşit cu acest dicţionar.",
"NO_ERRORS_CLOSING" : "Am terminat, nu am detectat nici o greşeală. Acum închid fereastra...",
"OK" : "OK",
"Original word" : "Cuvântul original",
"Please wait. Calling spell checker." : "Vă rog aşteptaţi. Apelez spell-checker-ul.",
"Please wait: changing dictionary to" : "Vă rog aşteptaţi. Schimb dicţionarul cu",
"QUIT_CONFIRMATION" : "Doriţi să renunţaţi la modificări şi să închid spell-checker-ul?",
"Re-check" : "Scanează",
"Replace all" : "Înlocuieşte toate",
"Replace with" : "Înlocuieşte cu",
"Replace" : "Înlocuieşte",
"SC-spell-check" : "Detectează greşeli",
"Suggestions" : "Sugestii",
"pliz weit ;-)" : "va rog ashteptatzi ;-)"
};

View File

@ -0,0 +1,115 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
<html>
<head>
<title>HTMLArea Spell Checker</title>
</head>
<body>
<h1>HTMLArea Spell Checker</h1>
<p>The HTMLArea Spell Checker subsystem consists of the following
files:</p>
<ul>
<li>spell-checker.js &mdash; the spell checker plugin interface for
HTMLArea</li>
<li>spell-checker-ui.html &mdash; the HTML code for the user
interface</li>
<li>spell-checker-ui.js &mdash; functionality of the user
interface</li>
<li>spell-checker-logic.cgi &mdash; Perl CGI script that checks a text
given through POST for spelling errors</li>
<li>spell-checker-style.css &mdash; style for mispelled words</li>
<li>lang/en.js &mdash; main language file (English).</li>
</ul>
<h2>Process overview</h2>
<p>
When an end-user clicks the "spell-check" button in the HTMLArea
editor, a new window is opened with the URL of "spell-check-ui.html".
This window initializes itself with the text found in the editor (uses
<tt>window.opener.SpellChecker.editor</tt> global variable) and it
submits the text to the server-side script "spell-check-logic.cgi".
The target of the FORM is an inline frame which is used both to
display the text and correcting.
</p>
<p>
Further, spell-check-logic.cgi calls Aspell for each portion of plain
text found in the given HTML. It rebuilds an HTML file that contains
clear marks of which words are incorrect, along with suggestions for
each of them. This file is then loaded in the inline frame. Upon
loading, a JavaScript function from "spell-check-ui.js" is called.
This function will retrieve all mispelled words from the HTML of the
iframe and will setup the user interface so that it allows correction.
</p>
<h2>The server-side script (spell-check-logic.cgi)</h2>
<p>
<strong>Unicode safety</strong> &mdash; the program <em>is</em>
Unicode safe. HTML entities are expanded into their corresponding
Unicode characters. These characters will be matched as part of the
word passed to Aspell. All texts passed to Aspell are in Unicode
(when appropriate). However, Aspell seems to not support Unicode
yet (<a
href="http://mail.gnu.org/archive/html/aspell-user/2000-11/msg00007.html">thread concerning Aspell and Unicode</a>).
This mean that words containing Unicode
characters that are not in 0..255 are likely to be reported as "mispelled" by Aspell.
</p>
<p>
I digged the Net for a couple of hours today and I can't seem to find
any open-source spell checker that has Unicode support. For this
reason we keep using Aspell, because it also seems to have the
best suggestions engine. Unicode support will eventually be
implemented in Aspell. <a href="mailto:kevin@atkinson.dhs.org">Email
Kevin Atkinson</a> (Aspell author and maintainer) about this ;-)
</p>
<p>
The Perl Unicode manual (man perluniintro) states:
</p>
<blockquote>
<em>
Starting from Perl 5.6.0, Perl has had the capacity to handle Unicode
natively. Perl 5.8.0, however, is the first recommended release for
serious Unicode work. The maintenance release 5.6.1 fixed many of the
problems of the initial Unicode implementation, but for example regular
expressions still do not work with Unicode in 5.6.1.
</em>
</blockquote>
<p>In other words, do <em>not</em> assume that this script is
Unicode-safe on Perl interpreters older than 5.8.0.</p>
<p>The following Perl modules are required:</p>
<ul>
<li><a href="http://search.cpan.org/search?query=Text%3A%3AAspell&mode=all" target="_blank">Text::Aspell</a></li>
<li><a href="http://search.cpan.org/search?query=HTML%3A%3AParser&mode=all" target="_blank">HTML::Parser</a></li>
<li><a href="http://search.cpan.org/search?query=HTML%3A%3AEntities&mode=all" target="_blank">HTML::Entities</a></li>
<li><a href="http://search.cpan.org/search?query=CGI&mode=all" target="_blank">CGI</a></li>
</ul>
<p>Of these, only Text::Aspell might need to be installed manually. The
others are likely to be available by default in most Perl distributions.</p>
<hr />
<address><a href="http://students.infoiasi.ro/~mishoo/">Mihai Bazon</a></address>
<!-- Created: Thu Jul 17 13:22:27 EEST 2003 -->
<!-- hhmts start -->
Last modified on Sun Aug 10 12:28:24 2003
<!-- hhmts end -->
<!-- doc-lang: English -->
</body>
</html>

View File

@ -0,0 +1,155 @@
#! /usr/bin/perl -w
# Spell Checker Plugin for HTMLArea-3.0
# Implementation by Mihai Bazon. Sponsored by www.americanbible.org
#
# htmlArea v3.0 - Copyright (c) 2002 interactivetools.com, inc.
# This notice MUST stay intact for use (see license.txt).
#
# A free WYSIWYG editor replacement for <textarea> fields.
# For full source code and docs, visit http://www.interactivetools.com/
#
# Version 3.0 developed by Mihai Bazon for InteractiveTools.
# http://students.infoiasi.ro/~mishoo
#
# $Id$
use strict;
use utf8;
use Encode;
use Text::Aspell;
use HTML::Parser;
use HTML::Entities;
use CGI;
my $debug = 0;
open (DEBUG, '>:encoding(UTF-8)', '> /tmp/spell-check-debug.log') if $debug;
# use Data::Dumper; # for debug only
my $speller = new Text::Aspell;
my $cgi = new CGI;
# FIXME: report a nice error...
die "Can't create speller!" unless $speller;
# add configurable option for this
my $dict = $cgi->param('dictionary') || 'en_US';
$speller->set_option('lang', $dict);
# ultra, fast, normal, bad-spellers
# bad-spellers seems to cause segmentation fault
$speller->set_option('sug-mode', 'ultra');
my @replacements = ();
sub text_handler {
my ($offset, $length, $text, $is_cdata) = @_;
if ($is_cdata or $text =~ /^\s*$/) {
return 0;
}
# print STDERR "*** OFFSET: $offset, LENGTH: $length, $text\n";
$text = decode_entities($text);
$text =~ s/&#([0-9]+);/chr($1)/eg;
$text =~ s/&#x([0-9a-fA-F]+);/chr(hex $1)/eg;
my $repl = spellcheck($text);
if ($repl) {
push(@replacements, [ $offset, $length, $repl ]);
}
}
my $p = HTML::Parser->new
(api_version => 3,
handlers => { start => [ sub {
my ($self, $tagname, $attrs) = @_;
# print STDERR "\033[1;31m parsing tag: $tagname\033[0m\n";
# following we skip words that have already been marked as "fixed".
if ($tagname eq "span" and $attrs->{class} =~ /HA-spellcheck-fixed/) {
$self->handler(text => undef);
}
}, "self, tagname, attr"
],
end => [ sub {
my ($self, $tagname) = @_;
# print STDERR "\033[1;32m END tag: $tagname\033[0m\n";
$self->handler(text => \&text_handler, 'offset, length, dtext, is_cdata');
}, "self, tagname"
]
}
);
$p->handler(text => \&text_handler, 'offset, length, dtext, is_cdata');
$p->case_sensitive(1);
my $file_content = $cgi->param('content');
if ($debug) {
open (FOO, '>:encoding(UTF-8)', '/tmp/spell-check-before');
print FOO $file_content, "\n";
close(FOO);
}
$p->parse($file_content);
$p->eof();
foreach (reverse @replacements) {
substr($file_content, $_->[0], $_->[1], $_->[2]);
}
# we output UTF-8
binmode(STDOUT, ':encoding(UTF-8)'); # apparently, this sucks.
print "Content-type: text/html; charset: utf-8\n\n";
print qq^
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" media="all" href="spell-check-style.css" />
</head>
<body onload="window.parent.finishedSpellChecking();">^;
print $file_content;
if ($cgi->param('init') eq '1') {
my @dicts = $speller->dictionary_info();
my $dictionaries = '';
foreach my $i (@dicts) {
$dictionaries .= ',' . $i->{name} unless $i->{jargon};
}
$dictionaries =~ s/^,//;
print qq^
<div id="HA-spellcheck-dictionaries"
>$dictionaries</div>
^;
}
if ($debug) {
open (FOO, '>:encoding(UTF-8)', '/tmp/spell-check-after');
print FOO $file_content, "\n";
close(FOO);
}
print '</body></html>';
# Perl is beautiful.
sub spellcheck {
my $text = shift;
sub check { # called for each word in the text
# input is in UTF-8
my $U_word = shift;
my $word = encode($speller->get_option('encoding'), $U_word);
print DEBUG "*$U_word* ----> |$word|\n" if $debug;
if ($speller->check($word)) {
return $U_word; # we return the word in UTF-8
} else {
# we should have suggestions; give them back to browser in UTF-8
my $suggestions = decode($speller->get_option('encoding'), join(',', $speller->suggest($word)));
my $ret = '<span class="HA-spellcheck-error">'.$U_word.'</span><span class="HA-spellcheck-suggestions">'.$suggestions.'</span>';
return $ret;
}
}
$text =~ s/([[:word:]']+)/check($1)/egs;
# $text =~ s/(\w+)/check($1)/egs;
# the following is definitely what we want to use; too bad it sucks most.
# $text =~ s/(\p{IsWord}+)/check($1)/egs;
return $text;
}

View File

@ -0,0 +1,10 @@
.HA-spellcheck-error { border-bottom: 2px dotted #f00; cursor: default; }
.HA-spellcheck-same { background-color: #ff8; color: #000; }
.HA-spellcheck-hover { background-color: #433; color: white; }
.HA-spellcheck-fixed { border-bottom: 1px dotted #0b8; }
.HA-spellcheck-current { background-color: #7be; color: #000; }
.HA-spellcheck-suggestions { display: none; }
#HA-spellcheck-dictionaries { display: none; }
a:link, a:visited { color: #55e; }

View File

@ -0,0 +1,119 @@
<!--
Strangely, IE sucks with or without the DOCTYPE switch.
I thought it would only suck without it.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Spell Checker Plugin for HTMLArea-3.0
Implementation by Mihai Bazon. Sponsored by www.americanbible.org
htmlArea v3.0 - Copyright (c) 2003 interactivetools.com, inc.
This notice MUST stay intact for use (see license.txt).
A free WYSIWYG editor replacement for <textarea> fields.
For full source code and docs, visit http://www.interactivetools.com/
Version 3.0 developed by Mihai Bazon for InteractiveTools.
http://students.infoiasi.ro/~mishoo
$Id$
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Spell Checker</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="spell-check-ui.js"></script>
<style type="text/css">
html, body { height: 100%; margin: 0px; padding: 0px; background-color: #fff;
color: #000; }
a:link, a:visited { color: #00f; text-decoration: none; }
a:hover { color: #f00; text-decoration: underline; }
table { background-color: ButtonFace; color: ButtonText;
font-family: tahoma,verdana,sans-serif; font-size: 11px; }
iframe { background-color: #fff; color: #000; }
.controls { width: 13em; }
.controls .sectitle { /* background-color: #736c6c; color: #fff;
border-top: 1px solid #000; border-bottom: 1px solid #fff; */
text-align: center;
font-weight: bold; padding: 2px 4px; }
.controls .secbody { margin-bottom: 10px; }
button, select { font-family: tahoma,verdana,sans-serif; font-size: 11px; }
button { width: 6em; padding: 0px; }
input, select { font-family: fixed,"andale mono",monospace; }
#v_currentWord { color: #f00; font-weight: bold; font-size: 120%; }
#statusbar { padding: 7px 0px 0px 5px; }
#status { font-weight: bold; }
</style>
</head>
<body onload="initDocument()">
<form style="display: none;" action="spell-check-logic.cgi"
method="post" target="framecontent"
accept-charset="utf-8"
><input type="hidden" name="content" id="f_content"
/><input type="hidden" name="dictionary" id="f_dictionary"
/><input type="hidden" name="init" id="f_init" value="1"
/></form>
<table style="height: 100%; width: 100%; border-collapse: collapse;" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" style="height: 1em; padding: 2px;">
<div style="float: right; padding: 2px;"><span>Dictionary</span>
<select id="v_dictionaries" style="width: 10em"></select>
<button id="b_recheck">Re-check</button>
</div>
<span id="status">Please wait. Calling spell checker.</span>
</td>
</tr>
<tr>
<td valign="top" class="controls">
<div class="sectitle">Original word</div>
<div class="secbody" id="v_currentWord" style="text-align: center">pliz weit ;-)</div>
<div class="sectitle">Replace with</div>
<div class="secbody">
<input type="text" id="v_replacement" style="width: 94%; margin-left: 3%;" /><br />
<div style="text-align: center; margin-top: 2px;">
<button id="b_replace">Replace</button><button
id="b_replall">Replace all</button><br /><button
id="b_ignore">Ignore</button><button
id="b_ignall">Ignore all</button>
</div>
</div>
<div class="sectitle">Suggestions</div>
<div class="secbody">
<select size="11" style="width: 94%; margin-left: 3%;" id="v_suggestions"></select>
</div>
</td>
<td>
<iframe src="about:blank" width="100%" height="100%"
id="i_framecontent" name="framecontent"></iframe>
</td>
</tr>
<tr>
<td style="height: 1em;" colspan="2">
<div style="padding: 4px 2px 2px 2px; float: right;">
<button id="b_ok">OK</button>
<button id="b_cancel">Cancel</button>
</div>
<div id="statusbar"></div>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,334 @@
// Spell Checker Plugin for HTMLArea-3.0
// Implementation by Mihai Bazon. Sponsored by www.americanbible.org
//
// htmlArea v3.0 - Copyright (c) 2002 interactivetools.com, inc.
// This notice MUST stay intact for use (see license.txt).
//
// A free WYSIWYG editor replacement for <textarea> fields.
// For full source code and docs, visit http://www.interactivetools.com/
//
// Version 3.0 developed by Mihai Bazon for InteractiveTools.
// http://students.infoiasi.ro/~mishoo
//
// $Id$
// internationalization file was already loaded in parent ;-)
var SpellChecker = window.opener.SpellChecker;
var i18n = SpellChecker.I18N;
var is_ie = window.opener.HTMLArea.is_ie;
var editor = SpellChecker.editor;
var frame = null;
var currentElement = null;
var wrongWords = null;
var modified = false;
var allWords = {};
function makeCleanDoc(leaveFixed) {
// document.getElementById("status").innerHTML = 'Please wait: rendering valid HTML';
for (var i in wrongWords) {
var el = wrongWords[i];
if (!(leaveFixed && /HA-spellcheck-fixed/.test(el.className))) {
el.parentNode.insertBefore(el.firstChild, el);
el.parentNode.removeChild(el.nextSibling);
el.parentNode.removeChild(el);
} else {
el.className = "HA-spellcheck-fixed";
el.parentNode.removeChild(el.nextSibling);
}
}
// we should use innerHTML here, but IE6's implementation fucks up the
// HTML to such extent that our poor Perl parser doesn't understand it
// anymore.
return window.opener.HTMLArea.getHTML(frame.contentWindow.document.body, leaveFixed);
};
function recheckClicked() {
document.getElementById("status").innerHTML = i18n["Please wait: changing dictionary to"] + ': "' + document.getElementById("f_dictionary").value + '".';
var field = document.getElementById("f_content");
field.value = makeCleanDoc(true);
field.form.submit();
};
function saveClicked() {
if (modified) {
editor.setHTML(makeCleanDoc(false));
}
window.close();
return false;
};
function cancelClicked() {
var ok = true;
if (modified) {
ok = confirm(i18n["QUIT_CONFIRMATION"]);
}
if (ok) {
window.close();
}
return false;
};
function replaceWord(el) {
var replacement = document.getElementById("v_replacement").value;
modified = (el.innerHTML != replacement);
if (el) {
el.className = el.className.replace(/\s*HA-spellcheck-(hover|fixed)\s*/g, " ");
}
el.className += " HA-spellcheck-fixed";
el.__msh_fixed = true;
if (!modified) {
return false;
}
el.innerHTML = replacement;
};
function replaceClicked() {
replaceWord(currentElement);
var start = currentElement.__msh_id;
var index = start;
do {
++index;
if (index == wrongWords.length) {
index = 0;
}
} while ((index != start) && wrongWords[index].__msh_fixed);
if (index == start) {
index = 0;
alert(i18n["Finished list of mispelled words"]);
}
wrongWords[index].onclick();
return false;
};
function replaceAllClicked() {
var replacement = document.getElementById("v_replacement").value;
var ok = true;
var spans = allWords[currentElement.__msh_origWord];
if (spans.length == 0) {
alert("An impossible condition just happened. Call FBI. ;-)");
} else if (spans.length == 1) {
replaceClicked();
return false;
}
/*
var message = "The word \"" + currentElement.__msh_origWord + "\" occurs " + spans.length + " times.\n";
if (replacement == currentElement.__msh_origWord) {
ok = confirm(message + "Ignore all occurrences?");
} else {
ok = confirm(message + "Replace all occurrences with \"" + replacement + "\"?");
}
*/
if (ok) {
for (var i in spans) {
if (spans[i] != currentElement) {
replaceWord(spans[i]);
}
}
// replace current element the last, so that we jump to the next word ;-)
replaceClicked();
}
return false;
};
function ignoreClicked() {
document.getElementById("v_replacement").value = currentElement.__msh_origWord;
replaceClicked();
return false;
};
function ignoreAllClicked() {
document.getElementById("v_replacement").value = currentElement.__msh_origWord;
replaceAllClicked();
return false;
};
function learnClicked() {
alert("Not [yet] implemented");
return false;
};
function internationalizeWindow() {
var types = ["div", "span", "button"];
for (var i in types) {
var tag = types[i];
var els = document.getElementsByTagName(tag);
for (var j = els.length; --j >= 0;) {
var el = els[j];
if (el.childNodes.length == 1 && /\S/.test(el.innerHTML)) {
var txt = el.innerHTML;
if (typeof i18n[txt] != "undefined") {
el.innerHTML = i18n[txt];
}
}
}
}
};
function initDocument() {
internationalizeWindow();
modified = false;
frame = document.getElementById("i_framecontent");
var field = document.getElementById("f_content");
field.value = editor.getHTML();
field.form.submit();
document.getElementById("f_init").value = "0";
// assign some global event handlers
var select = document.getElementById("v_suggestions");
select.onchange = function() {
document.getElementById("v_replacement").value = this.value;
};
if (is_ie) {
select.attachEvent("ondblclick", replaceClicked);
} else {
select.addEventListener("dblclick", replaceClicked, true);
}
document.getElementById("b_replace").onclick = replaceClicked;
// document.getElementById("b_learn").onclick = learnClicked;
document.getElementById("b_replall").onclick = replaceAllClicked;
document.getElementById("b_ignore").onclick = ignoreClicked;
document.getElementById("b_ignall").onclick = ignoreAllClicked;
document.getElementById("b_recheck").onclick = recheckClicked;
document.getElementById("b_ok").onclick = saveClicked;
document.getElementById("b_cancel").onclick = cancelClicked;
select = document.getElementById("v_dictionaries");
select.onchange = function() {
document.getElementById("f_dictionary").value = this.value;
};
};
function wordClicked() {
if (currentElement) {
var a = allWords[currentElement.__msh_origWord];
currentElement.className = currentElement.className.replace(/\s*HA-spellcheck-current\s*/g, " ");
for (var i in a) {
var el = a[i];
if (el != currentElement) {
el.className = el.className.replace(/\s*HA-spellcheck-same\s*/g, " ");
}
}
}
currentElement = this;
this.className += " HA-spellcheck-current";
var a = allWords[currentElement.__msh_origWord];
for (var i in a) {
var el = a[i];
if (el != currentElement) {
el.className += " HA-spellcheck-same";
}
}
document.getElementById("b_replall").disabled = (a.length <= 1);
document.getElementById("b_ignall").disabled = (a.length <= 1);
var txt;
if (a.length == 1) {
txt = "one occurrence";
} else if (a.length == 2) {
txt = "two occurrences";
} else {
txt = a.length + " occurrences";
}
document.getElementById("statusbar").innerHTML = "Found " + txt +
' for word "<b>' + currentElement.__msh_origWord + '</b>"';
var select = document.getElementById("v_suggestions");
for (var i = select.length; --i >= 0;) {
select.remove(i);
}
var suggestions;
suggestions = this.nextSibling.firstChild.data.split(/,/);
for (var i = 0; i < suggestions.length; ++i) {
var txt = suggestions[i];
var option = document.createElement("option");
option.value = txt;
option.appendChild(document.createTextNode(txt));
select.appendChild(option);
}
document.getElementById("v_currentWord").innerHTML = this.__msh_origWord;
if (suggestions.length > 0) {
select.selectedIndex = 0;
select.onchange();
} else {
document.getElementById("v_replacement").value = this.innerHTML;
}
return false;
};
function wordMouseOver() {
this.className += " HA-spellcheck-hover";
};
function wordMouseOut() {
this.className = this.className.replace(/\s*HA-spellcheck-hover\s*/g, " ");
};
function finishedSpellChecking() {
// initialization of global variables
currentElement = null;
wrongWords = null;
allWords = {};
document.getElementById("status").innerHTML = "HTMLArea Spell Checker (<a href='readme-tech.html' target='_blank' title='Technical information'>info</a>)";
var doc = frame.contentWindow.document;
var spans = doc.getElementsByTagName("span");
var sps = [];
var id = 0;
for (var i = 0; i < spans.length; ++i) {
var el = spans[i];
if (/HA-spellcheck-error/.test(el.className)) {
sps.push(el);
el.onclick = wordClicked;
el.onmouseover = wordMouseOver;
el.onmouseout = wordMouseOut;
el.__msh_id = id++;
var txt = (el.__msh_origWord = el.firstChild.data);
el.__msh_fixed = false;
if (typeof allWords[txt] == "undefined") {
allWords[txt] = [el];
} else {
allWords[txt].push(el);
}
}
}
wrongWords = sps;
if (sps.length == 0) {
if (!modified) {
alert(i18n["NO_ERRORS_CLOSING"]);
window.close();
} else {
alert(i18n["NO_ERRORS"]);
}
return false;
}
(currentElement = sps[0]).onclick();
var as = doc.getElementsByTagName("a");
for (var i = as.length; --i >= 0;) {
var a = as[i];
a.onclick = function() {
if (confirm(i18n["CONFIRM_LINK_CLICK"] + ":\n" +
this.href + "\n" + i18n["I will open it in a new page."])) {
window.open(this.href);
}
return false;
};
}
var dicts = doc.getElementById("HA-spellcheck-dictionaries");
if (dicts) {
dicts.parentNode.removeChild(dicts);
dicts = dicts.innerHTML.split(/,/);
var select = document.getElementById("v_dictionaries");
for (var i = select.length; --i >= 0;) {
select.remove(i);
}
for (var i = 0; i < dicts.length; ++i) {
var txt = dicts[i];
var option = document.createElement("option");
option.value = txt;
option.appendChild(document.createTextNode(txt));
select.appendChild(option);
}
}
};

View File

@ -0,0 +1,72 @@
// Spell Checker Plugin for HTMLArea-3.0
// Implementation by Mihai Bazon. Sponsored by www.americanbible.org
//
// htmlArea v3.0 - Copyright (c) 2002 interactivetools.com, inc.
// This notice MUST stay intact for use (see license.txt).
//
// A free WYSIWYG editor replacement for <textarea> fields.
// For full source code and docs, visit http://www.interactivetools.com/
//
// Version 3.0 developed by Mihai Bazon for InteractiveTools.
// http://students.infoiasi.ro/~mishoo
//
// $Id$
function SpellChecker(editor) {
this.editor = editor;
var cfg = editor.config;
var tt = SpellChecker.I18N;
var bl = SpellChecker.btnList;
var self = this;
// register the toolbar buttons provided by this plugin
var toolbar = [];
for (var i in bl) {
var btn = bl[i];
if (!btn) {
toolbar.push("separator");
} else {
var id = "SC-" + btn[0];
cfg.registerButton(id, tt[id], "plugins/SpellChecker/img/" + btn[0] + ".gif", false,
function(editor, id) {
// dispatch button press event
self.buttonPress(editor, id);
}, btn[1]);
toolbar.push(id);
}
}
for (var i in toolbar) {
cfg.toolbar[0].push(toolbar[i]);
}
};
SpellChecker.btnList = [
null, // separator
["spell-check"]
];
SpellChecker.prototype.buttonPress = function(editor, id) {
switch (id) {
case "SC-spell-check":
SpellChecker.editor = editor;
SpellChecker.init = true;
var uiurl = editor.config.editorURL + "plugins/SpellChecker/spell-check-ui.html";
var win;
if (HTMLArea.is_ie) {
win = window.open(uiurl, "SC_spell_checker",
"toolbar=no,location=no,directories=no,status=no,menubar=no," +
"scrollbars=no,resizable=yes,width=600,height=400");
} else {
win = window.open(uiurl, "SC_spell_checker",
"toolbar=no,menubar=no,personalbar=no,width=600,height=400," +
"scrollbars=no,resizable=yes");
}
win.focus();
break;
}
};
// this needs to be global, it's accessed from spell-check-ui.html
SpellChecker.editor = null;

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

View File

@ -0,0 +1,90 @@
// I18N constants
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
// FOR TRANSLATORS:
//
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
// (at least a valid email address)
//
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
// (if this is not possible, please include a comment
// that states what encoding is necessary.)
TableOperations.I18N = {
"Align": "Align",
"All four sides": "All four sides",
"Background": "Background",
"Baseline": "Baseline",
"Border": "Border",
"Borders": "Borders",
"Bottom": "Bottom",
"CSS Style": "Style [CSS]",
"Caption": "Caption",
"Cell Properties": "Cell Properties",
"Center": "Center",
"Char": "Char",
"Collapsed borders": "Collapsed borders",
"Color": "Color",
"Description": "Description",
"FG Color": "FG Color",
"Float": "Float",
"Frames": "Frames",
"Height": "Height",
"How many columns would you like to merge?": "How many columns would you like to merge?",
"How many rows would you like to merge?": "How many rows would you like to merge?",
"Image URL": "Image URL",
"Justify": "Justify",
"Layout": "Layout",
"Left": "Left",
"Margin": "Margin",
"Middle": "Middle",
"No rules": "No rules",
"No sides": "No sides",
"None": "None",
"Padding": "Padding",
"Please click into some cell": "Please click into some cell",
"Right": "Right",
"Row Properties": "Row Properties",
"Rules will appear between all rows and columns": "Rules will appear between all rows and columns",
"Rules will appear between columns only": "Rules will appear between columns only",
"Rules will appear between rows only": "Rules will appear between rows only",
"Rules": "Rules",
"Spacing and padding": "Spacing and padding",
"Spacing": "Spacing",
"Summary": "Summary",
"TO-cell-delete": "Delete cell",
"TO-cell-insert-after": "Insert cell after",
"TO-cell-insert-before": "Insert cell before",
"TO-cell-merge": "Merge cells",
"TO-cell-prop": "Cell properties",
"TO-cell-split": "Split cell",
"TO-col-delete": "Delete column",
"TO-col-insert-after": "Insert column after",
"TO-col-insert-before": "Insert column before",
"TO-col-split": "Split column",
"TO-row-delete": "Delete row",
"TO-row-insert-above": "Insert row before",
"TO-row-insert-under": "Insert row after",
"TO-row-prop": "Row properties",
"TO-row-split": "Split row",
"TO-table-prop": "Table properties",
"Table Properties": "Table Properties",
"Text align": "Text align",
"The bottom side only": "The bottom side only",
"The left-hand side only": "The left-hand side only",
"The right and left sides only": "The right and left sides only",
"The right-hand side only": "The right-hand side only",
"The top and bottom sides only": "The top and bottom sides only",
"The top side only": "The top side only",
"Top": "Top",
"Unset color": "Unset color",
"Vertical align": "Vertical align",
"Width": "Width",
"not-del-last-cell": "HTMLArea cowardly refuses to delete the last cell in row.",
"not-del-last-col": "HTMLArea cowardly refuses to delete the last column in table.",
"not-del-last-row": "HTMLArea cowardly refuses to delete the last row in table.",
"percent": "percent",
"pixels": "pixels"
};

View File

@ -0,0 +1,66 @@
TableOperations.I18N = {
"Align": "Kohdistus",
"All four sides": "Kaikki neljä sivua",
"Background": "Tausta",
"Baseline": "Takaraja",
"Border": "Reuna",
"Borders": "Reunat",
"Bottom": "Alle",
"CSS Style": "Tyyli [CSS]",
"Caption": "Otsikko",
"Cell Properties": "Solun asetukset",
"Center": "Keskelle",
"Char": "Merkki",
"Collapsed borders": "Luhistetut reunat",
"Color": "Väri",
"Description": "Kuvaus",
"FG Color": "FG Väri",
"Frames": "Kehykset",
"Image URL": "Kuvan osoite",
"Layout": "Sommittelu",
"Left": "Vasen",
"Margin": "Marginaali",
"Middle": "Keskelle",
"No rules": "Ei viivoja",
"No sides": "Ei sivuja",
"Padding": "Palstantäyte",
"Right": "Oikea",
"Row Properties": "Rivin asetukset",
"Rules will appear between all rows and columns": "Viivat jokaisen rivin ja sarakkeen välillä",
"Rules will appear between columns only": "Viivat ainoastaan sarakkeiden välillä",
"Rules will appear between rows only": "Viivat ainoastaan rivien välillä",
"Rules": "Viivat",
"Spacing": "Palstatila",
"Summary": "Yhteenveto",
"TO-cell-delete": "Poista solu",
"TO-cell-insert-after": "Lisää solu perään",
"TO-cell-insert-before": "Lisää solu ennen",
"TO-cell-merge": "Yhdistä solut",
"TO-cell-prop": "Solun asetukset",
"TO-cell-split": "Jaa solu",
"TO-col-delete": "Poista sarake",
"TO-col-insert-after": "Lisää sarake perään",
"TO-col-insert-before": "Lisää sarake ennen",
"TO-col-split": "Jaa sarake",
"TO-row-delete": "Poista rivi",
"TO-row-insert-above": "Lisää rivi yläpuolelle",
"TO-row-insert-under": "Lisää rivi alapuolelle",
"TO-row-prop": "Rivin asetukset",
"TO-row-split": "Jaa rivi",
"TO-table-prop": "Taulukon asetukset",
"Top": "Ylös",
"Table Properties": "Taulukon asetukset",
"The bottom side only": "Ainoastaan alapuolelle",
"The left-hand side only": "Ainoastaan vasenreuna",
"The right and left sides only": "Oikea- ja vasenreuna",
"The right-hand side only": "Ainoastaan oikeareuna",
"The top and bottom sides only": "Ylä- ja alapuoli.",
"The top side only": "Ainoastaan yläpuoli",
"Vertical align": "Vertikaali kohdistus",
"Width": "Leveys",
"not-del-last-cell": "Ei voida poistaa viimeistä solua rivistä.",
"not-del-last-col": "Ei voida poistaa viimeistä saraketta taulusta.",
"not-del-last-row": "Ei voida poistaa viimeistä riviä taulusta.",
"percent": "prosenttia",
"pixels": "pikseliä"
};

View File

@ -0,0 +1,90 @@
// I18N constants
// LANG: "ro", ENCODING: UTF-8
// Author: Mihai Bazon, <mishoo@infoiasi.ro>
// FOR TRANSLATORS:
//
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
// (at least a valid email address)
//
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
// (if this is not possible, please include a comment
// that states what encoding is necessary.)
TableOperations.I18N = {
"Align": "Aliniere",
"All four sides": "Toate părţile",
"Background": "Fundal",
"Baseline": "Baseline",
"Border": "Chenar",
"Borders": "Chenare",
"Bottom": "Jos",
"CSS Style": "Stil [CSS]",
"Caption": "Titlu de tabel",
"Cell Properties": "Proprietăţile celulei",
"Center": "Centru",
"Char": "Caracter",
"Collapsed borders": "Chenare asimilate",
"Color": "Culoare",
"Description": "Descriere",
"FG Color": "Culoare text",
"Float": "Poziţie",
"Frames": "Chenare",
"Height": "Înălţimea",
"How many columns would you like to merge?": "Câte coloane vrei să uneşti?",
"How many rows would you like to merge?": "Câte linii vrei să uneşti?",
"Image URL": "URL-ul imaginii",
"Justify": "Justify",
"Layout": "Aranjament",
"Left": "Stânga",
"Margin": "Margine",
"Middle": "Mijloc",
"No rules": "Fără linii",
"No sides": "Fără părţi",
"None": "Nimic",
"Padding": "Spaţiere",
"Please click into some cell": "Vă rog să daţi click într-o celulă",
"Right": "Dreapta",
"Row Properties": "Proprietăţile liniei",
"Rules will appear between all rows and columns": "Vor apărea linii între toate rândurile şi coloanele",
"Rules will appear between columns only": "Vor apărea doar linii verticale",
"Rules will appear between rows only": "Vor apărea doar linii orizontale",
"Rules": "Linii",
"Spacing and padding": "Spaţierea",
"Spacing": "Între celule",
"Summary": "Sumar",
"TO-cell-delete": "Şterge celula",
"TO-cell-insert-after": "Inserează o celulă la dreapta",
"TO-cell-insert-before": "Inserează o celulă la stânga",
"TO-cell-merge": "Uneşte celulele",
"TO-cell-prop": "Proprietăţile celulei",
"TO-cell-split": "Împarte celula",
"TO-col-delete": "Şterge coloana",
"TO-col-insert-after": "Inserează o coloană la dreapta",
"TO-col-insert-before": "Inserează o coloană la stânga",
"TO-col-split": "Împarte coloana",
"TO-row-delete": "Şterge rândul",
"TO-row-insert-above": "Inserează un rând înainte",
"TO-row-insert-under": "Inserează un rând după",
"TO-row-prop": "Proprietăţile rândului",
"TO-row-split": "Împarte rândul",
"TO-table-prop": "Proprietăţile tabelei",
"Table Properties": "Proprietăţile tabelei",
"Text align": "Aliniere",
"The bottom side only": "Doar partea de jos",
"The left-hand side only": "Doar partea din stânga",
"The right and left sides only": "Partea din stânga şi cea din dreapta",
"The right-hand side only": "Doar partea din dreapta",
"The top and bottom sides only": "Partea de sus si cea de jos",
"The top side only": "Doar partea de sus",
"Top": "Sus",
"Unset color": "Dezactivează culoarea",
"Vertical align": "Aliniere pe verticală",
"Width": "Lăţime",
"not-del-last-cell": "HTMLArea refuză cu laşitate să şteargă ultima celulă din rând.",
"not-del-last-col": "HTMLArea refuză cu laşitate să şteargă ultima coloamă din tabela.",
"not-del-last-row": "HTMLArea refuză cu laşitate să şteargă ultimul rând din tabela.",
"percent": "procente",
"pixels": "pixeli"
};

View File

@ -0,0 +1,369 @@
/** This file is derived from PopupDiv, developed by Mihai Bazon for
* SamWare.net. Modifications were needed to make it usable in HTMLArea.
* HTMLArea is a free WYSIWYG online HTML editor from InteractiveTools.com.
*
* This file does not function standalone. It is dependent of global functions
* defined in HTMLArea-3.0 (htmlarea.js).
*
* Please see file htmlarea.js for further details.
**/
var is_ie = ( (navigator.userAgent.toLowerCase().indexOf("msie") != -1) &&
(navigator.userAgent.toLowerCase().indexOf("opera") == -1) );
var is_compat = (document.compatMode == "BackCompat");
function PopupDiv(editor, titleText, handler, initFunction) {
var self = this;
this.editor = editor;
this.doc = editor._mdoc;
this.handler = handler;
var el = this.doc.createElement("div");
el.className = "content";
var popup = this.doc.createElement("div");
popup.className = "dialog popupdiv";
this.element = popup;
var s = popup.style;
s.position = "absolute";
s.left = "0px";
s.top = "0px";
var title = this.doc.createElement("div");
title.className = "title";
this.title = title;
popup.appendChild(title);
HTMLArea._addEvent(title, "mousedown", function(ev) {
self._dragStart(is_ie ? window.event : ev);
});
var button = this.doc.createElement("div");
button.className = "button";
title.appendChild(button);
button.innerHTML = "&#x00d7;";
title.appendChild(this.doc.createTextNode(titleText));
this.titleText = titleText;
button.onmouseover = function() {
this.className += " button-hilite";
};
button.onmouseout = function() {
this.className = this.className.replace(/\s*button-hilite\s*/g, " ");
};
button.onclick = function() {
this.className = this.className.replace(/\s*button-hilite\s*/g, " ");
self.close();
};
popup.appendChild(el);
this.content = el;
this.doc.body.appendChild(popup);
this.dragging = false;
this.onShow = null;
this.onClose = null;
this.modal = false;
initFunction(this);
};
PopupDiv.currentPopup = null;
PopupDiv.prototype.showAtElement = function(el, mode) {
this.defaultSize();
var pos, ew, eh;
var popup = this.element;
popup.style.display = "block";
var w = popup.offsetWidth;
var h = popup.offsetHeight;
popup.style.display = "none";
if (el != window) {
pos = PopupDiv.getAbsolutePos(el);
ew = el.offsetWidth;
eh = el.offsetHeight;
} else {
pos = {x:0, y:0};
var size = PopupDiv.getWindowSize();
ew = size.x;
eh = size.y;
}
var FX = false, FY = false;
if (mode.indexOf("l") != -1) {
pos.x -= w;
FX = true;
}
if (mode.indexOf("r") != -1) {
pos.x += ew;
FX = true;
}
if (mode.indexOf("t") != -1) {
pos.y -= h;
FY = true;
}
if (mode.indexOf("b") != -1) {
pos.y += eh;
FY = true;
}
if (mode.indexOf("c") != -1) {
FX || (pos.x += Math.round((ew - w) / 2));
FY || (pos.y += Math.round((eh - h) / 2));
}
this.showAt(pos.x, pos.y);
};
PopupDiv.prototype.defaultSize = function() {
var s = this.element.style;
var cs = this.element.currentStyle;
var addX = (is_ie && is_compat) ? (parseInt(cs.borderLeftWidth) +
parseInt(cs.borderRightWidth) +
parseInt(cs.paddingLeft) +
parseInt(cs.paddingRight)) : 0;
var addY = (is_ie && is_compat) ? (parseInt(cs.borderTopWidth) +
parseInt(cs.borderBottomWidth) +
parseInt(cs.paddingTop) +
parseInt(cs.paddingBottom)) : 0;
s.display = "block";
s.width = (this.content.offsetWidth + addX) + "px";
s.height = (this.content.offsetHeight + this.title.offsetHeight) + "px";
s.display = "none";
};
PopupDiv.prototype.showAt = function(x, y) {
this.defaultSize();
var s = this.element.style;
s.display = "block";
s.left = x + "px";
s.top = y + "px";
this.hideShowCovered();
PopupDiv.currentPopup = this;
HTMLArea._addEvents(this.doc.body, ["mousedown", "click"], PopupDiv.checkPopup);
HTMLArea._addEvents(this.editor._doc.body, ["mousedown", "click"], PopupDiv.checkPopup);
if (is_ie && this.modal) {
this.doc.body.setCapture(false);
this.doc.body.onlosecapture = function() {
(PopupDiv.currentPopup) && (this.doc.body.setCapture(false));
};
}
window.event && HTMLArea._stopEvent(window.event);
if (typeof this.onShow == "function") {
this.onShow();
} else if (typeof this.onShow == "string") {
eval(this.onShow);
}
var field = this.element.getElementsByTagName("input")[0];
if (!field) {
field = this.element.getElementsByTagName("select")[0];
}
if (!field) {
field = this.element.getElementsByTagName("textarea")[0];
}
if (field) {
field.focus();
}
};
PopupDiv.prototype.close = function() {
this.element.style.display = "none";
PopupDiv.currentPopup = null;
this.hideShowCovered();
HTMLArea._removeEvents(this.doc.body, ["mousedown", "click"], PopupDiv.checkPopup);
HTMLArea._removeEvents(this.editor._doc.body, ["mousedown", "click"], PopupDiv.checkPopup);
is_ie && this.modal && this.doc.body.releaseCapture();
if (typeof this.onClose == "function") {
this.onClose();
} else if (typeof this.onClose == "string") {
eval(this.onClose);
}
this.element.parentNode.removeChild(this.element);
};
PopupDiv.prototype.getForm = function() {
var forms = this.content.getElementsByTagName("form");
return (forms.length > 0) ? forms[0] : null;
};
PopupDiv.prototype.callHandler = function() {
var tags = ["input", "textarea", "select"];
var params = new Object();
for (var ti in tags) {
var tag = tags[ti];
var els = this.content.getElementsByTagName(tag);
for (var j = 0; j < els.length; ++j) {
var el = els[j];
params[el.name] = el.value;
}
}
this.handler(this, params);
return false;
};
PopupDiv.getAbsolutePos = function(el) {
var r = { x: el.offsetLeft, y: el.offsetTop };
if (el.offsetParent) {
var tmp = PopupDiv.getAbsolutePos(el.offsetParent);
r.x += tmp.x;
r.y += tmp.y;
}
return r;
};
PopupDiv.getWindowSize = function() {
if (window.innerHeight) {
return { y: window.innerHeight, x: window.innerWidth };
}
if (this.doc.body.clientHeight) {
return { y: this.doc.body.clientHeight, x: this.doc.body.clientWidth };
}
return { y: this.doc.documentElement.clientHeight, x: this.doc.documentElement.clientWidth };
};
PopupDiv.prototype.hideShowCovered = function () {
var self = this;
function isContained(el) {
while (el) {
if (el == self.element) {
return true;
}
el = el.parentNode;
}
return false;
};
var tags = new Array("applet", "select");
var el = this.element;
var p = PopupDiv.getAbsolutePos(el);
var EX1 = p.x;
var EX2 = el.offsetWidth + EX1;
var EY1 = p.y;
var EY2 = el.offsetHeight + EY1;
if (el.style.display == "none") {
EX1 = EX2 = EY1 = EY2 = 0;
}
for (var k = tags.length; k > 0; ) {
var ar = this.doc.getElementsByTagName(tags[--k]);
var cc = null;
for (var i = ar.length; i > 0;) {
cc = ar[--i];
if (isContained(cc)) {
cc.style.visibility = "visible";
continue;
}
p = PopupDiv.getAbsolutePos(cc);
var CX1 = p.x;
var CX2 = cc.offsetWidth + CX1;
var CY1 = p.y;
var CY2 = cc.offsetHeight + CY1;
if ((CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
cc.style.visibility = "visible";
} else {
cc.style.visibility = "hidden";
}
}
}
};
PopupDiv.prototype._dragStart = function (ev) {
if (this.dragging) {
return false;
}
this.dragging = true;
PopupDiv.currentPopup = this;
var posX = ev.clientX;
var posY = ev.clientY;
if (is_ie) {
posY += this.doc.body.scrollTop;
posX += this.doc.body.scrollLeft;
} else {
posY += window.scrollY;
posX += window.scrollX;
}
var st = this.element.style;
this.xOffs = posX - parseInt(st.left);
this.yOffs = posY - parseInt(st.top);
HTMLArea._addEvent(this.doc, "mousemove", PopupDiv.dragIt);
HTMLArea._addEvent(this.doc, "mouseover", HTMLArea._stopEvent);
HTMLArea._addEvent(this.doc, "mouseup", PopupDiv.dragEnd);
HTMLArea._stopEvent(ev);
};
PopupDiv.dragIt = function (ev) {
var popup = PopupDiv.currentPopup;
if (!(popup && popup.dragging)) {
return false;
}
is_ie && (ev = window.event);
var posX = ev.clientX;
var posY = ev.clientY;
if (is_ie) {
posY += this.doc.body.scrollTop;
posX += this.doc.body.scrollLeft;
} else {
posY += window.scrollY;
posX += window.scrollX;
}
popup.hideShowCovered();
var st = popup.element.style;
st.left = (posX - popup.xOffs) + "px";
st.top = (posY - popup.yOffs) + "px";
HTMLArea._stopEvent(ev);
};
PopupDiv.dragEnd = function () {
var popup = PopupDiv.currentPopup;
if (!popup) {
return false;
}
popup.dragging = false;
HTMLArea._removeEvent(popup.doc, "mouseup", PopupDiv.dragEnd);
HTMLArea._removeEvent(popup.doc, "mouseover", HTMLArea._stopEvent);
HTMLArea._removeEvent(popup.doc, "mousemove", PopupDiv.dragIt);
popup.hideShowCovered();
};
PopupDiv.checkPopup = function (ev) {
is_ie && (ev = window.event);
var el = is_ie ? ev.srcElement : ev.target;
var cp = PopupDiv.currentPopup;
for (; (el != null) && (el != cp.element); el = el.parentNode);
if (el == null) {
cp.modal || ev.type == "mouseover" || cp.close();
HTMLArea._stopEvent(ev);
}
};
PopupDiv.prototype.addButtons = function() {
var self = this;
var div = this.doc.createElement("div");
this.content.appendChild(div);
div.className = "buttons";
for (var i = 0; i < arguments.length; ++i) {
var btn = arguments[i];
var button = this.doc.createElement("button");
div.appendChild(button);
button.innerHTML = HTMLArea.I18N.buttons[btn];
switch (btn) {
case "ok":
button.onclick = function() {
self.callHandler();
self.close();
};
break;
case "cancel":
button.onclick = function() {
self.close();
};
break;
}
}
};

View File

@ -0,0 +1,55 @@
<html style="width: 380px; height: 250px;">
<head><title>About HTMLArea</title>
<script type="text/javascript" src="popup.js"></script>
<script type="text/javascript">
function closeAbout() {
__dlg_close(null);
}
</script>
<style>
html,body,textarea { font-family: tahoma,verdana,arial; font-size: 11px;
padding: 0px; margin: 0px; }
tt { font-size: 120%; }
body { padding: 0px; background: ButtonFace; color: ButtonText; }
a:link, a:visited { color: #00f; }
a:hover { color: #f00; }
a:active { color: #f80; }
button { font: 11px tahoma,verdana,sans-serif; }
</style></head>
<body onload="__dlg_init()">
<div style="background-color: #fff; color: #000; padding: 3px; border-bottom: 1px solid #000;">
<div style="font-family: 'arial black',arial,sans-serif; font-size: 28px;
letter-spacing: -1px;">
<span style="position: relative; top: -0.2em">H</span><span
style="position: relative; top: 0.1em">T</span><span
style="position: relative; top: -0.1em">M</span><span
style="position: relative; top: 0.2em">L</span> Area
3.0 <span style="position: relative; top: -0.6em; font-size: 50%; font-weight: normal">[ rev. beta ]</span></div>
<div style="text-align: right; font-size: 90%; margin-bottom: 1em">
Released on Aug 11, 2003 [21:30] GMT
</div>
</div>
<div style="margin: 1em">
<p>A free WYSIWYG editor replacement for <tt>&lt;textarea&gt;</tt> fields.</p>
<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></p>
<p>Version 3.0 developed and maintained by <a href="http://students.infoiasi.ro/~mishoo/" target="_blank">mishoo</a>.</p>
<p>&copy; 2002, 2003 <a href="http://interactivetools.com" target="_blank">interactivetools.com</a>, inc. All Rights Reserved.</p>
</div>
<div style="text-align: right; padding: 0px 3px 3px 0px;">
<button type="button" onclick="closeAbout()">I agree it's cool</button>
</div>
</body></html>

View File

View File

@ -0,0 +1,35 @@
<html style="width:300px; Height: 60px;">
<head>
<title>Select Phrase</title>
<script language="javascript">
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
}
</script>
</head>
<body bgcolor="#FFFFFF" topmargin=15 leftmargin=0>
<form method=get onSubmit="Set(document.all.ColorHex.value); return false;">
<div align=center>
<select name="textPulldown">
<option>The quick brown</option>
<option>fox jumps over</option>
<option>the lazy dog.</option>
</select>
<input type="button" value=" Go " onClick="returnSelected()">
</div>
</form>
</body></html>

Some files were not shown because too many files have changed in this diff Show More