added: "EditArea" code highlighter and editing tool for WebGUI::Form::Codearea, used

in Template, Snippet, SQLReport, and more
This commit is contained in:
Doug Bell 2008-10-14 00:06:08 +00:00
parent 8848a71d52
commit 810c8247cc
138 changed files with 12642 additions and 7 deletions

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>About</h1>
</div>
<div class='content'>
<h2>General information</h2>
<p>EditArea is a free javascript editor for source code. It allow to write
well formated source code. That's no way a WYSIWYG editor.
</p>
<p>
EditArea is developed by Christophe Dolivet
(<a href='http://www.cdolivet.net/index.php?page=Contact'>contact</a>)
and is currently released
under the "LGPL" license, read the license agreement for details.
</p>
<h2>Features</h2>
<ul>
<li>Easy to integrate, takes only a couple lines of code.</li>
<li>Live syntax highlight.</li>
<li>Search and replace (with regexp).</li>
<li>Line numerotation.</li>
<li>International language support.</li>
<li>Allow to create new syntax or translation files.</li>
<li>Multiple instance on the same page.</li>
<li>Multiple browser support (see <a href='compatibility.html'>compatibility chart</a>
for more information).</li>
<li>Font resizing.</li>
<li>Toolbar customization.</li>
<li>Load and save callback function.</li>
<li>Possibility to use a gzip compressed version of the script (only 20Kb).</li>
</ul>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>Compatiblity Chart</h1>
</div>
<div class='content'>
<h2>Browser support</h2>
<p>EditArea uses advanced JavaScript and tries to be as smart as possible when it comes to
different browsers. But as every browser (and every version of thoses browser) manage
css and javascript implementation with some little change, it will probably be bad
displayed on other browser.
The table was reset to only show the browsers I take care of.
</p>
<p> Since I have no mac, I can't make test for safari, neither testing multi-plateform browsers.
Let me know if you constat that such browsers are working.
</p>
<p>
<table border="1" cellspacing="0" cellpadding="4">
<tr>
<td>&nbsp;</td>
<td>Windows XP</td>
<td>Linux</td>
<td>MacOS X</td>
</tr>
<tr>
<td>MSIE 7 & 6</td>
<td>OK</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Firefox 3 & 2 & 1.5</td>
<td>OK</td>
<td>OK</td>
<td>OK</td>
</tr>
<tr>
<td>Safari 3.0 & 3.1</td>
<td>OK</td>
<td>&nbsp;</td>
<td>OK</td>
</tr>
<tr>
<td>Chrome</td>
<td>OK</td>
<td>???</td>
<td>???</td>
</tr>
<tr>
<td>Opera 9 & 9.5</td>
<td>OK</td>
<td>OK</td>
<td>OK</td>
</tr>
<tr>
<td>Camino 1.2</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>OK</td>
</tr>
</table>
</p>
<p>
(1) - Partialy working<br />
(2) - Buggy browser version
</p>
<br />
<strong>Notices:</strong>
<ul>
<li>The Opera 9 full compatibility is nearly impossible due to some javascript implementation bugs in Opera.</li>
<li>Iceweasel is considered to be the same as Firefox.</li>
<li>As Mozilla is replaced by Firefox, I don't include it in my testcase.</li>
<li>As Netscape 8 is not a world release I also don't include it in my testcase.</li>
</ul>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>Configuration reference</h1>
</div>
<div class='content'>
<p>This document is the index/reference page for all available core configuration
options in EditArea.</p>
<div class="separator"></div>
<h2>Configuration options</h2>
<p>All configuration options below is to be placed within the init JavaScript call.<br />
<ul class='optionlist'>
<li><strong>Needed option</strong>
<ul>
<li><strong>id</strong>: should contain the id of the textarea that should be converted into an editor
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: null</li>
</ul>
<br />
</li>
<li><strong>General</strong>
<ul>
<li><strong>language</strong>: should contain a code of the language pack to be used for translation. If EditArea doesn't have a language pack for your language you could always write your own and contribute this back to this project by uploading it as a Patch at <a href='http://sourceforge.net/projects/editarea/'>SourceForge</a>.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: "en"
</li>
<li><strong>syntax</strong>: should contain a code of the syntax definition file that must be used for the highlight mode.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>start_highlight</strong>: set if the editor should start with highlighted syntax displayed.
<br /><span class='underline'>Type</span>: Boolean
<br /><span class='underline'>Default</span>: false
</li>
<li><strong>is_multi_files</strong>: determine if the editor load the content of the textarea (false) or if it wait for an openFile() call for allowing file editing.
<br /><span class='underline'>Type</span>: Boolean
<br /><span class='underline'>Default</span>: false
</li>
<li><strong>min_width</strong>: define the minimum width of the editor
<br /><span class='underline'>Type</span>: Integer
<br /><span class='underline'>Default</span>: 400
</li>
<li><strong>min_height</strong>: define the minimum height of the editor
<br /><span class='underline'>Type</span>: Integer
<br /><span class='underline'>Default</span>: 100
</li>
<li><strong>allow_resize</strong>: define one with axis the editor can be resized by the user.
<br /><span class='underline'>Type</span>: String ("no" (no resize allowed), "both" (x and y axis), "x", "y")
<br /><span class='underline'>Default</span>: "both"
</li>
<li><strong>allow_toggle</strong>: define if a toggle button must be added under the editor in order to allow to toggle between the editor and the orginal textarea.
<br /><span class='underline'>Type</span>: Boolean
<br /><span class='underline'>Default</span>: true
</li>
<li><strong>plugins</strong>: a comma separated list of plugins to load.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>browsers</strong>: define if the editor must be loaded only when the user navigotr is known to be a working one, or if it will be loaded for all navigators.
<br /><span class='underline'>Type</span>: String ("all" or "known")
<br /><span class='underline'>Default</span>: "known"
</li>
<li><strong>display</strong>: specify when the textarea will be converted into an editor. If set to &quot;later&quot;, the toogle button will be displayed to allow later conversion.
<br /><span class='underline'>Type</span>: String ("onload" or "later")
<br /><span class='underline'>Default</span>: "onload"
</li>
<li><strong>toolbar</strong>: define the toolbar that will be displayed, each element being separated by a ",".
<br /><span class='underline'>Type</span>: String (combinaison of: "|", "*", "search", "go_to_line", "undo", "redo", "change_smooth_selection", "reset_highlight", "highlight", "help", "save", "load", "new_document", "syntax_selection")
<br />"|" or "separator" make appears a separator in the toolbar.
<br />"*" or "return" make appears a line-break in the toolbar
<br /><span class='underline'>Default</span>: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, |, help"
</li>
<li><strong>begin_toolbar</strong>: toolbar button list to add before the toolbar defined by the "toolbar" option.
<br /><span class='underline'>Type</span>: String (cf. "toolbar" option)
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>end_toolbar</strong>: toolbar button list to add after the toolbar defined by the "toolbar" option.
<br /><span class='underline'>Type</span>: String (cf. "toolbar" option)
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>font_size</strong>: define the font-size used to display the text in the editor.
<br /><span class='underline'>Type</span>: Integer
<br /><span class='underline'>Default</span>: 10
</li>
<li><strong>font_family</strong>: define the font-familly used to display the text in the editor. (eg: "monospace" or "verdana,monospace"). Opera will always use "monospace".
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: "monospace"
</li>
</li>
<li><strong>gecko_spellcheck</strong>: allow to disable/enable the Firefox 2 spellchecker
<br /><span class='underline'>Type</span>: Boolean
<br /><span class='underline'>Default</span>: false
</li>
<li><strong>max_undo</strong>: number of undo action allowed
<br /><span class='underline'>Type</span>: Integer
<br /><span class='underline'>Default</span>: 20
</li>
<li><strong>fullscreen</strong>: determine if EditArea start in fullscreen mode or not
<br /><span class='underline'>Type</span>: Boolean
<br /><span class='underline'>Default</span>: false
</li>
<li><strong>is_editable</strong>: determine if EditArea display only the highlighted syntax (no edition possiblities, no toolbars).
It's possible to switch the editable mode whenever you want (code example for a toggle edit mode: <em>editAreaLoader.execCommand('editor_id', 'set_editable', !editAreaLoader.execCommand('editor_id', 'is_editable'));</em>).
<br /><span class='underline'>Type</span>: Boolean
<br /><span class='underline'>Default</span>: true
</li>
<li><strong>replace_tab_by_spaces</strong>: define the number of spaces that will replace tabulations (\t) in text. If tabulation should stay tabulation, set this option to false.
<br /><span class='underline'>Type</span>: Integer (or false)
<br /><span class='underline'>Default</span>: false
</li>
<li><strong>debug</strong>: used to display some debug information into a newly created textarea. Can be usefull to display trace info in it if you want to modify the code.
<br /><span class='underline'>Type</span>: Boolean
<br /><span class='underline'>Default</span>: false
</li>
</ul>
<br />
</li>
<li><strong>Callback</strong>
<ul>
<li><strong>load_callback</strong>: the function name that will be called when the user will press the "load" button in the toolbar. This function will reveice one parameter that will be the id of the textarea. You can update the content of the textarea by using "editAreaLoader.setValue(the_id, new_value);".
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>save_callback</strong>: the function name that will be called when the user will press the "save" button in the toolbar. This function will reveice two parameters, the first being the id of the textarea and the second containing the content of the textarea.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>change_callback</strong>: the function name that will be called when the onchange event of the textarea of EditArea will be triggered. This function will reveice one parameter that will be the id of the textarea. Will be triggered only is EditArea is displayed.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>submit_callback</strong>: the function name that will be called when the form containing the EditArea will be submitted. This function will reveice one parameter that will be the id of the textarea. Will be triggered regardless the state of EditArea (displayed or not).
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>EA_init_callback</strong>: the function name that will be called just after the editAreaLoader.init() function, once EditAreaLoader will be initalized but still not displayed. This function will receive one parameter that will be the id of the textarea.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>EA_delete_callback</strong>: the function name that will be called when EditArea will be destroyed regardless the fact that it has been displayed or not. This function will reveice one parameter that will be the id of the textarea.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>EA_toggle_on_callback</strong>: the function name that will be called when EditArea will be toogled on for. This function will reveice one parameter that will be the id of the textarea.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>EA_toggle_off_callback</strong>: the function name that will be called when EditArea will be toggled off. This function will reveice one parameter that will be the id of the textarea.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>EA_load_callback</strong>: the function name that will be called when EditArea will be displayed for the first time. This function will reveice one parameter that will be the id of the textarea.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>EA_unload_callback</strong>: the function name that will be called when EditArea will be destroyed (if it have been displayed at least one time). This function will reveice one parameter that will be the id of the textarea.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>EA_file_switch_on_callback</strong>: the function name that will be called when the tabulation of the file will be selected. This function will reveice one parameter that will be an associative array containing all file's infos.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>EA_file_switch_off_callback</strong>: the function name that will be called when the tabulation of the file will be blur (the file was selected, and another file receive focus). This function will reveice one parameter that will be an associative array containing all file infos.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
<li><strong>EA_file_close_callback</strong>: the function name that will be called when the tabulation of a file will be closed. This function will reveice one parameter that will be an associative array containing all file infos. If the callback function return false, the file won't be closed.
<br /><span class='underline'>Type</span>: String
<br /><span class='underline'>Default</span>: ""
</li>
</ul>
<br />
</li>
</ul>
<div class="separator"></div>
<h2>Initialization of EditArea</h2>
<p>In order to initialize EditArea the following code must be placed within HEAD element
of a document. The following example is configurated to convert the TEXTAREA element
which has &quot;textarea_1&quot; as id into editor when the page loads. The &quot;id&quot;
option is the only obligatory option.
<pre>
&lt;html&gt;
&lt;head&gt;
<strong>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;/editarea/edit_area/edit_area_full.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
editAreaLoader.init({
id : &quot;textarea_1&quot; // textarea id
,syntax: "css" // syntax to be uses for highgliting
,start_highlight: true // to display with highlight mode on start-up
});
&lt;/script&gt;</strong>
&lt;/head&gt;
</pre>
</p>
<p>See the <a href='include.html'>include</a> document to learn more about the way to use the best script include.
</p>
<p>If you want to convert several textarea on your webpage, just call several time the init function with a different id parameter.</p>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>Credits</h1>
</div>
<div class='content'>
<h2>Special thanks</h2>
<p>
I would like to make a special thanks to <a href='http://tinymce.moxiecode.com'>TinyMCE</a>
developpers. I have taken some of their WYSIWYG editor functions
(managing the toolbar buttons),
and it give me inspiration for some point (gzip compression, translation, documentation)
of my project.
</p>
<h2>Contributors</h2>
<p> These are the people that have contributed in some way to the EditArea project.
If you feel we are missing someone please inform me right away and I will correct this
in future versions of EditArea.
</p>
<ul>
<li>Global help
<ul>
<li>Gildas Noël</li>
</ul>
</li>
<li>Languages translation
<ul>
<li>Olaf Brambrink &amp; Felix Riesterer &amp; Christoph Pinkel (deutsh)</li>
<li>Peter Klein (danish)</li>
<li>Leonardo Sapucaia (portuguese)</li>
<li>Ishitoya Kentaro (japanese)</li>
<li>Piotr Furman (polish)</li>
<li>Luciano Vernaschi (italian)</li>
<li>Ivan Vucica and Davor Cihlar (croatian)</li>
<li>Garito (spanish)</li>
<li>Gabriel Schwardy (slovak)</li>
<li>Olivier (esperento)</li>
</ul>
</li>
<li>Syntax definitions
<ul>
<li>Martin Gottlieb (VB)</li>
<li>Ivan Vucica and Davor Cihlar (Basic, C, CPP, Pascal and Brainfuck)</li>
<li>Philippe Lewicki (SQL)</li>
<li>Pavle Ggardijan (Robots.txt)</li>
<li>Miladin Joksic (T-SQL)</li>
<li>Christoph Pinkel (Perl)</li>
<li>Max Leynov (Coldfusion)</li>
</ul>
</li>
<li>Donation
<ul>
<li>Jupiter</li>
</ul>
</li>
</ul>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>Customization - Creating a language translation</h1>
</div>
<div class='content'>
<h2>Making language file</h2>
<p>Language packs are simply JavaScript name/value arrays placed in the &quot;.js&quot;
files in the &quot;lang&quot; directory. Notice there are two kinds of language packs.</p>
<ul>
<li><p>The first one is the general one located at &quot;edit_area/langs/&quot; and used by the EditArea core.
The example below shows how the search and replace texts are lang packed.</p>
<pre>editAreaLoader.lang["en"]={
search: "search",
replace: "replace"
};</pre>
</li>
<li><p>The second ones are plugins specific language packs. These are contained in
&quot;edit_area/plugins/&lt;plugin_name&gt;/langs/&quot;. Here is the example of the test plugin.</p>
<pre>editArea.add_lang("en",{
test_select: "select tag",
test_but: "test button"
});</pre>
<p>For creating a new plugin, remember to always use the &quot;&lt;plugin_name&gt;&quot;
prefix for these value names so that they don't override other variables in the templates.
</p>
</li>
</ul>
<p>
Remember, the last translation line should not have a , character at the end.
</p>
<h3>Files to edit</h3>
<p>
When translating EditArea, these are the files that currently needs to be translated:
</p>
<p>
edit_area/langs/en.js<br />
edit_area/plugins/&lt;plugin_name&gt;/langs/en.js<br />
</p>
<h3>Contributing your language pack</h3>
<p>
Go to the <a href="http://sourceforge.net/tracker/?atid=829999&group_id=164008&func=browse">sourceforge patch page</a>
and upload a zip containing all the language files in the correct directory structure.<br /><br />
Please translate all the plugins, even if you aren't using them.<br />
</p>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>Customization - Creating a plugin</h1>
</div>
<div class='content'>
<h2>Creating your own plugins</h2>
<p>
Creating you own plugins for EditArea is fairly easy if you know the basics of HTML, CSS and Javascript.
The most easy way is to copy the &quot;test&quot; directory and work from there. The &quot;test&quot;
directory is a tutorial plugin that shows how to create a plugin. After you copy the template you need to
change the red sections marked below to the name of your plugin this is needed so that plugins don't
overlap in other words it gives the plugin a unique name. Notice that when you write a new plugin,
you have to end each javascript instructions by ";", even if it's optionnal in javascript.
</p>
<p>If you want you may add plugin specific options/settings but remember to namespace them in the
following format &quot;&lt;your plugin&gt;_&lt;option&gt;&quot; for example &quot;yourplugin_someoption&quot;.</p>
<p>Specific callback functions that you don't need or doesn't do anything can be removed.</p>
<p>If you want you can try the test plugin by adding the following parameters to the EditAreaLoader.init command.</p>
<pre>end_toolbar: "*,test_but, |,test_select",
plugins: "test",</pre>
<div class="separator"></div>
<h3>Plugin directory structure</h3>
<p>
<table class="btable">
<thead>
<th>File/Directory</td>
<th>Description</td>
</thead>
<tbody>
<tr><td>css</td><td>Plugin specific CSS files</td></tr>
<tr><td>images</td><td>Plugin specific images</td></tr>
<tr><td>langs</td><td>Plugin specific language files</td></tr>
<tr><td>&lt;your_plugin&gt;.js</td><td>Main plugin file</td></tr>
</table>
</p>
<div class="separator"></div>
<h3>Plugin example source</h3>
<p>
The example below shows a simple empty plugin and all possible callbacks.
</p>
<p>
<div class="example">
<pre>/**
* Plugin designed for test prupose. It add a button (that manage an alert) and a select (that allow to insert tags) in the toolbar.
* This plugin also disable the "f" key in the editarea, and load a CSS and a JS file
*/
var EditArea_<span class='marked'>test</span>= {
/**
* Get called once this file is loaded (editArea still not initialized)
*
* @return nothing
*/
init: function(){
// alert("test init: "+ this._someInternalFunction(2, 3));
editArea.load_css(this.baseURL+"css/test.css");
editArea.load_script(this.baseURL+"test2.js");
}
/**
* Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
* A control can be a button, select list or any other HTML item to present in the EditArea user interface.
* Language variables such as {$lang_somekey} will also be replaced with contents from
* the language packs.
*
* @param {string} ctrl_name: the name of the control to add
* @return HTML code for a specific control or false.
* @type string or boolean
*/
,get_control_html: function(ctrl_name){
switch(ctrl_name){
case "<span class='marked'>test_but</span>":
// Control id, button img, isFileSpecific, command
return parent.editAreaLoader.get_button_html('<span class='marked'>test_but</span>', '<span class='marked'>test.gif</span>', '<span class='marked'>test_cmd</span>', false, this.baseURL);
case "<span class='marked'>test_select</span>":
html= "&lt;select id='<span class='marked'>test_select</span>' onchange='javascript:editArea.execCommand(\"<span class='marked'>test_select_change</span>\")'&gt;"
+" &lt;option value='-1'&gt;<span class='marked'>{$test_select}</span>&lt;/option&gt;"
+" &lt;option value='h1'&gt;h1&lt;/option&gt;"
+" &lt;option value='h2'&gt;h2&lt;/option&gt;"
+" &lt;option value='h3'&gt;h3&lt;/option&gt;"
+" &lt;option value='h4'&gt;h4&lt;/option&gt;"
+" &lt;option value='h5'&gt;h5&lt;/option&gt;"
+" &lt;option value='h6'&gt;h6&lt;/option&gt;"
+" &lt;/select&gt;";
return html;
}
return false;
}
/**
* Get called once EditArea is fully loaded and initialised
*
* @return nothing
*/
,onload: function(){
alert("test load");
}
/**
* Is called each time the user touch a keyboard key.
*
* @param (event) e: the keydown event
* @return true - pass to next handler in chain, false - stop chain execution
* @type boolean
*/
,onkeydown: function(e){
var str= String.fromCharCode(e.keyCode);
// desactivate the "f" character
if(str.toLowerCase()=="f"){
return true;
}
return false;
}
/**
* Executes a specific command, this function handles plugin commands.
*
* @param {string} cmd: the name of the command being executed
* @param {unknown} param: the parameter of the command
* @return true - pass to next handler in chain, false - stop chain execution
* @type boolean
*/
,execCommand: function(cmd, param){
// Handle commands
switch(cmd){
case "<span class='marked'>test_select_change</span>":
var val= document.getElementById("test_select").value;
if(val!=-1)
parent.editAreaLoader.insertTags(editArea.id, "&lt;"+val+"&gt;", "&lt;/"+val+"&gt;");
document.getElementById("test_select").options[0].selected=true;
return false;
case "<span class='marked'>test_cmd</span>":
alert("user clicked on test_cmd");
return false;
}
// Pass to next handler in chain
return true;
}
/**
* This is just an internal plugin method, prefix all internal methods with a _ character.
* The prefix is needed so they doesn't collide with future EditArea callback functions.
*
* @param {string} a Some arg1.
* @param {string} b Some arg2.
* @return Some return.
* @type unknown
*/
,_someInternalFunction : function(a, b) {
return a+b;
}
};
// Adds the plugin class to the list of available EditArea plugins
editArea.add_plugin("<span class='marked'>test</span>", EditArea_<span class='marked'>test</span>);</pre>
<br />
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>Customization - Creating a syntax definition file</h1>
</div>
<div class='content'>
<h3>Creating your own syntax definition file</h3>
<p>Creating you own syntax definition file for EditArea is fairly easy. You just have to know the language syntax,
it's kewords, and then fill a javascript array with thoses values.</p>
<p>If your want to create a new syntax file for a given language, choose a language abbreviation for it
(&lt;language_abbr&gt;) in lowercase. Then create the file &quot;edit_area/reg_syntax/&lt;language_abbr&gt;.js&quot;.</p>
<p>Here is a &quot;css&quot; example:</p>
<pre>editAreaLoader.load_syntax["css"] = { <strong>// here &lt;language_abbr&gt; is &quot;css&quot; so the file is &quot;css.js&quot;</strong>
'COMMENT_SINGLE' : ['@'] <strong>// Array: possible single line comments</strong>
,'COMMENT_MULTI' : {'/*' : '*/'} <strong>// associated Array: possible multiple line comments</strong>
<strong>// ("open_mark1" : "close mark1", "open_mark2" : "close_mark2"}</strong>
,'QUOTEMARKS' : ['"', "'"] <strong>// Array: the different possible quotemarks that delimitate strings</strong>
,'KEYWORD_CASE_SENSITIVE' : false <strong>// Boolean: define if the language is case-sensitive</strong>
,'KEYWORDS' : { <strong>// Array: an array of array containing the different keywords class</strong>
'attributes' : [ <strong>// the name 'attribute' can be changed with no problem. I</strong>
<strong>// it's only used to define the matching style class</strong>
'aqua', 'azimuth', 'background-attachment', 'background-color' <strong>// etc...</strong>
]
,'values' : [
'absolute', 'block', 'bold', 'bolder', 'both' <strong>// etc...</strong>
]
,'specials' : [
'important'
]
}
,'OPERATORS' :[ <strong>// Array: the operators to highlight (eg, can also contain: +, -, * or / in other languages).</strong>
':', ';', '!', '.', '#'
]
,'DELIMITERS' :[ <strong>// Array: the block code delimiters to highlight</strong>
'{', '}'
]
,'STYLES' : { <strong>// Array: an array of array, containing all style to apply for categories defined before.</strong>
<strong>// Better to define color style only. </strong>
'COMMENTS': 'color: #AAAAAA;'
,'QUOTESMARKS': 'color: #6381F8;'
,'KEYWORDS' : { <strong>// contain the associated style foreach keywords categories</strong>
'attributes' : 'color: #48BDDF;'
,'values' : 'color: #2B60FF;'
,'specials' : 'color: #FF0000;'
}
,'OPERATORS' : 'color: #FF00FF;'
,'DELIMITERS' : 'color: #60CA00;'
}
};</pre>
<p>After reading this example you should be able to create your own syntax file.</p>
<div class='separator'></div>
<h3>Advanced syntax definition</h3>
<pre>editAreaLoader.load_syntax["xml"] = {
'COMMENT_SINGLE' : {}
,'COMMENT_MULTI' : {'&lt;!--' : '--&gt;'}
,'QUOTEMARKS' : {1: "'", 2: '"'}
,'KEYWORD_CASE_SENSITIVE' : false
,'KEYWORDS' : {
}
,'OPERATORS' :[
]
,'DELIMITERS' :[
]
,'REGEXPS' : { <strong>// advance syntax highlight through regexp</strong>
'xml' : { <strong>// the name 'doctype' can be changed with no problem.</strong>
'search' : '()(&lt;\\?[^&gt;]*?\\?&gt;)()' <strong>// the regexp</strong>
,'class' : 'xml' <strong>// the css class</strong>
,'modifiers' : 'g' <strong>// the modifier (&quot;g&quot; and/or &quot;i&quot;)</strong>
,'execute' : 'before' <strong>// &quot;before&quot; or &quot;after&quot;. Determine if the regexp must </strong>
<strong>// be done before or after the main highlight process</strong>
}
,'cdatas' : {
'search' : '()(&lt;!\\[CDATA\\[.*?\\]\\]&gt;)()'
,'class' : 'cdata'
,'modifiers' : 'g'
,'execute' : 'before'
}
,'tags' : {
'search' : '(&lt;)(/?[a-z][^ \r\n\t&gt;]*)([^&gt;]*&gt;)'
,'class' : 'tags'
,'modifiers' : 'gi'
,'execute' : 'before'
}
,'attributes' : {
'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
,'class' : 'attributes'
,'modifiers' : 'g'
,'execute' : 'before'
}
}
,'STYLES' : {
'COMMENTS': 'color: #AAAAAA;'
,'QUOTESMARKS': 'color: #6381F8;'
,'KEYWORDS' : {
}
,'OPERATORS' : 'color: #E775F0;'
,'DELIMITERS' : ''
,'REGEXPS' : {
'attributes': 'color: #B1AC41;'
,'tags': 'color: #800080;'
,'xml': 'color: #8DCFB5;'
,'cdata': 'color: #50B020;'
}
}
};</pre>
<p>Well, as you can see in this example, the syntax highlight for xml is not based on keywords but on regexp.
The text that will be highlighted, is the one between the second parentheses. The search parameter should always
be like this:
</p>
<pre>(&lt;before_highlight&gt;)(&lt;code_to_highlight&gt;)(&lt;after_highlight&gt;)</pre>
<p>For the pattern modifier, &quot;g&quot; signify that all occurences will be highlighted, &quot;i&quot; signify
that the regexp will be case-insensitive.</p>
<div class='separator'></div>
<h3>Contributing your syntax definition file</h3>
<p>
Go to the <a href="http://sourceforge.net/tracker/?atid=829999&group_id=164008&func=browse">sourceforge patch page</a>
and upload the syntax file.
</p>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -0,0 +1,120 @@
body {
background-color: #FFFFFF;
font-family: Verdana, Arial, helvetica, sans-serif;
font-size: 12px;
}
h1{
font-size: 18px;
font-weight: bold;
padding: 0;
margin: 4px;
}
h2 {
font-size: 14px;
font-weight: bold;
padding: 0;
margin: 0;
margin-top: 4px;
margin-bottom: 4px;
}
h3 {
font-size: 11px;
font-weight: bold;
padding: 0;
margin: 0;
margin-bottom: 3px;
}
h4, h5, h6{
margin: 0;
padding: 0;
}
pre, code{
margin: 0;
padding: 0 5px;
background-color: #E6EBF1;
}
a:hover{
color: #666666;
text-decoration: underline;
}
a{
color: #666666;
text-decoration: underline;
}
ul, ol{
padding: 0px;
margin: 3px 0 3px 10px;
}
li{
padding: 0;
margin: 3px 0 3px 10px;
}
li li{
padding: 0;
margin-left: 30px;
}
table{
border-collapse: collapse;
}
td, th{
padding: 4px;
border: 2px groove #000000;
}
thead {
background-color: #E6EBF1;
}
.header{
border: #E0E0E0 solid 1px;
}
.footer{
border: #E0E0E0 solid 1px;
height: 1.3em;
padding: 2px;
}
.content{
padding: 10px 0 10px 10px;
}
.indexlink{
float: right;
}
.separator {
border-bottom: 1px solid #E6EBF1;
margin-top: 10px;
margin-bottom: 10px;
}
.optionlist li li{
text-indent: -15px;
padding-left: 15px;
line-height: 1.3em;
}
.optionlist .underline{
background-color: #E6EBF1;
border-bottom: dashed #000000 1px;
}
.marked{
color: #FF0000;
font-weight: bold;
}

View file

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>Main script include</h1>
</div>
<div class='content'>
<p>As you have seen it before in <a href='installation.html'>installation</a> and
<a href='configuration.html'>configuration</a>, in order to make EditArea work on a
webpage, you must include one external javascript file and call an init
function for each textarea you want to convert.
In thoses examples the file "edit_area_full.js" whas the file included,
but in fact there are 5 possible files to include EditArea scripts
into your webpage. All thoses files are in the same directory,
and they all have advantage and inconvenient.
</p>
<h2>edit_area_full.js</h2>
<blockquote>
<p>This is the easier file to use for script integration. The file is nearly 100Kb length.
<pre>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;/editarea/edit_area/edit_area_full.js&quot;&gt;&lt;/script&gt;</pre>
<br />
<h3>Advantage:</h3>
<ul>
<li>The simplest choice.</li>
<li>Load the core script in one call to server.</li>
</ul>
<h3>Inconvient:</h3>
<ul>
<li>Not designed to allow core script modification.</li>
<li>Need to make additional server calls for plugins.</li>
</ul>
<br />
</p>
</blockquote>
<div class='separator'></div>
<h2>edit_area_compressor.php</h2>
<blockquote>
<p>This php file send in a gzipped file the whole core script to the brower (if the browser
has not already an updated version in cache).
<br />
If the source core script files have changed, it take thoses files and merge them into one file.
Then it remove all comments, white-spaces, etc... and save it in
"edit_area_full.js". It also save a gzip version in
"edit_area_full.gz". Then it send the gzip content to the browser (except for IE for which it is not gzipped due to IE bug with compression).
<pre>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;/editarea/edit_area/edit_area_compressor.php&quot;&gt;&lt;/script&gt;</pre>
<br />
<h3>Advantage:</h3>
<ul>
<li>The script is very small if gzip is supported (~25Ko).</li>
<li>Designed to allow core script modification.</li>
<li>Load the core script in one call to server.</li>
</ul>
<h3>Inconvient:</h3>
<ul>
<li>Need PHP to be installed on the server (and allowed to write in editarea directory for disk caching).</li>
<li>Need to make additional server calls for plugins.</li>
</ul>
<br />
</p>
<p>If you plan to use &quot;edit_area_compressor.php&quot; be sure that PHP scripts are allowed
to write in editarea directory (at the same level than the file &quot;edit_area_compressor.php&quot;)
for disk caching.
</p>
</blockquote>
<div class='separator'></div>
<h2>edit_area_compressor.php?plugins</h2>
<h5 class='marked'>recommanded version</h5>
<blockquote>
<p>This include is very similar to &quot;edit_area_compressor.php&quot;. The difference is that
with &quot;plugins&quot; parameter, the compressor also include the main script of all the plugins
in the merged file and also compress them. This will avoid later server calls for plugin main script.
<br />
In this case, the saved files are "edit_area_full_with_plugins.js" and "edit_area_full_with_plugins.gz".
<pre>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;/editarea/edit_area/edit_area_compressor.php?plugins&quot;&gt;&lt;/script&gt;</pre>
<br />
<h3>Advantage:</h3>
<ul>
<li>The script is very small if gzip is supported.</li>
<li>Designed to allow core script modification.</li>
<li>Load the core script in one call to server.</li>
<li>Load plugins script in the same call.</li>
</ul>
<h3>Inconvient:</h3>
<ul>
<li>Need PHP to be installed on the server (and allowed to write in editarea directory for disk caching).</li>
</ul>
<br />
</p>
<p>If you plan to use &quot;edit_area_compressor.php&quot; be sure that PHP scripts are allowed
to write in editarea directory (at the same level than the file &quot;edit_area_compressor.php&quot;)
for disk caching.
</p>
</blockquote>
<div class='separator'></div>
<h2>edit_area_full.gz</h2>
<blockquote>
<p>This is the smaller file to use for script integration. The file is gzipped and is only 20Kb
length.
<pre>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;/editarea/edit_area/edit_area_full.gz&quot;&gt;&lt;/script&gt;</pre>
<br />
<h3>Advantage:</h3>
<ul>
<li>The script is only 20Kb length.</li>
<li>Load the core script in one call to server.</li>
</ul>
<h3>Inconvient:</h3>
<ul>
<li>Is server dependant: It will work only on servers that will return a
"Content-Encoding: gzip" for *.gz files (can work with Apache).
So you must test if it work on your server.</li>
<li>Not designed to allow core script modification.</li>
<li>Need to make additional server calls for plugins.</li>
</ul>
<br />
</p>
</blockquote>
<div class='separator'></div>
<h2>edit_area_loader.js</h2>
<blockquote>
<p>This is the original loading script of EditArea. Use this one only if you can't use
any of the 3 other loading files. There is no code epuration nor gzip compression.
<pre>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;/editarea/edit_area/edit_area_loader.js&quot;&gt;&lt;/script&gt;</pre>
<br />
<h3>Advantage:</h3>
<ul>
<li>Designed to allow core script modification.</li>
</ul>
<h3>Inconvient:</h3>
<ul>
<li>Load the core scripts in 12 call to the server.</li>
<li>Need to make additional server calls for plugins.</li>
</ul>
<br />
</p>
</blockquote>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>EditArea documentation</h1>
</div>
<div class='content'>
<ul>
<li><a href='about.html'>About</a></li>
<li><a href='installation.html'>Installation</a></li>
<li><strong>Reference</strong>
<ul>
<li><a href='configuration.html'>Configuration</a></li>
<li><a href='javascript_functions.html'>JavaScript functions</a></li>
</ul>
</li>
<li><strong>Customization</strong>
<ul>
<li><a href='customization_plugin.html'>Creating a plugin</a></li>
<li><a href='customization_language.html'>Creating a language translation</a></li>
<li><a href='customization_syntax.html'>Creating a syntax definition file</a></li>
</ul>
</li>
<li><a href='compatibility.html'>Compatibility chart</a></li>
<li><a href='credits.html'>Credits</a></li>
<li><a href='license.html'>License</a></li>
</ul>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>Installation instructions</h1>
</div>
<div class='content'>
<p>Installing EditArea is very simple, follow the instructions here. Also look at the
<a href="configuration.html">options for configuration</a> and the different
<a href='include.html'>javascript load possibility</a>.
</p>
<div class="separator"></div>
<h2>Requirements</h2>
<p>EditArea has no direct requirements except for <a href="compatiblity.html">browser
compatibility</a> and of course JavaScript needs to be turned on.
For developpers there is also a PHP compressor that is included in the release.
</p>
<div class="separator"></div>
<h2>Downloading</h2>
<p>For downloading check the <a href="https://sourceforge.net/projects/editarea/">
sourceforge web site.</a>
</p>
<div class="separator"></div>
<h2>Extracting the archives</h2>
<p>On windows you could use <a href="http://www.winzip.com">WinZip</a> or something similar.
And on other operating systems such as Linux you simply extract the archive with
the tar command.
</p>
<p>
You should extract EditArea somewhere in your website. Notice that EditArea loads additionnal files
while being used (language translation, syntax definition and images), so don't delete any of the
file in the archive, and be sure that any files can be accessed.
</p>
<p>
If you plan to use &quot;edit_area_compressor.php&quot; be sure that PHP scripts are allowed
to write in editarea repertory (at the same level than the file &quot;edit_area_compressor.php&quot;)
in order to allow disk caching.
</p>
<div class="separator"></div>
<h2>Making changes on your web site</h2>
<p>Once you have extracted the archive you will need to edit the pages
to include the configuration and javascript for EditArea.
Please note that you should probably only include the EditArea javascript on the pages
that need it, not all the pages of the web site. Remember to change the URL to
the .js below to match your installation path.</p>
<p>
<h3>The most basic page integration (converts one textarea into editor):</h3>
<p>
<pre>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;EditArea Test&lt;/title&gt;
<strong>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;/editarea/edit_area/edit_area_full.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
editAreaLoader.init({
id : &quot;textarea_1&quot; // textarea id
,syntax: "css" // syntax to be uses for highgliting
,start_highlight: true // to display with highlight mode on start-up
});
&lt;/script&gt;</strong>
&lt;/head&gt;
&lt;body&gt;
&lt;form method=&quot;post&quot;&gt;
&lt;textarea id=&quot;textarea_1&quot; name=&quot;content&quot; cols=&quot;80&quot; rows=&quot;15&quot;&gt;
/*This is some css that will be editable with EditArea.*/
body, html{
margin: 0;
padding: 0;
height: 100%;
border: none;
overflow: hidden;
}&lt;/textarea&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
</p>
<p>
See the <a href='configuration.html'>configuration help</a> to learn about
initialization options,
and the <a href='include.html'>include help</a> to learn more about the way
to use the best script include (there is 4 possible files for EditArea loading).
</p>
<p>
Here is an example of EditArea possibilities: <a href="../exemples/exemple_full.html">Full exemple</a>.
</p>
<p>
If you have any problems, you could contact me on
<a href='http://www.cdolivet.net/index.php?page=Contact'>my website</a>.
Just be sure you've read the documentation before...
</p>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,484 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>EditArea documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="doc_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class='header'>
<h1>EditArea license (LGPL)</h1>
</div>
<div class='content'>
<p>
Visit <a href='http://www.fsf.org'>http://www.fsf.org</a> for more information about Open-Source licenses.
</p>
<pre>
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
</pre>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet - 2007</div>
<br style="clear: both" />
</div>
</body>
</html>