Merge branch 'master' of git@github.com:plainblack/webgui

This commit is contained in:
daviddelikat 2009-10-14 10:51:56 -05:00
commit ae257f4e37
153 changed files with 246 additions and 13731 deletions

View file

@ -17,6 +17,7 @@
- fixed #11107: linked image with caption
- fixed #10914: Shop: No email notifications sent when the cart has net value 0
- fixed #11126: WebGUI database has varchar fields
- fixed #10989: DataForm List: No pagination
7.8.1
- mark $session->datetime->time as deprecated and remove its use from core code

View file

@ -31,6 +31,7 @@ use WebGUI::Utility;
use WebGUI::Group;
use WebGUI::AssetCollateral::DataForm::Entry;
use WebGUI::Form::SelectRichEditor;
use WebGUI::Paginator;
use JSON ();
our @ISA = qw(WebGUI::Asset::Wobject);
@ -697,9 +698,10 @@ A hash reference. New template variables will be appended to it.
=cut
sub getListTemplateVars {
my $self = shift;
my $var = shift;
my $i18n = WebGUI::International->new($self->session,"Asset_DataForm");
my $self = shift;
my $session = $self->session;
my $var = shift;
my $i18n = WebGUI::International->new($session,"Asset_DataForm");
$var->{"back.url"} = $self->getFormUrl;
$var->{"back.label"} = $i18n->get('go to form');
my $fieldConfig = $self->getFieldConfig;
@ -713,7 +715,9 @@ sub getListTemplateVars {
} @{ $self->getFieldOrder };
$var->{field_loop} = \@fieldLoop;
my @recordLoop;
my $entryIter = $self->entryClass->iterateAll($self);
my $p = WebGUI::Paginator->new($session);
$p->setDataByCallback(sub { return $self->entryClass->iterateAll($self, { offset => $_[0], limit => $_[1], }); });
my $entryIter = $p->getPageIterator();
while ( my $entry = $entryIter->() ) {
my $entryData = $entry->fields;
my @dataLoop;
@ -734,9 +738,9 @@ sub getListTemplateVars {
%dataVars,
"record.ipAddress" => $entry->ipAddress,
"record.edit.url" => $self->getFormUrl("func=view;entryId=".$entry->getId),
"record.edit.icon" => $self->session->icon->edit("func=view;entryId=".$entry->getId, $self->get('url')),
"record.edit.icon" => $session->icon->edit("func=view;entryId=".$entry->getId, $self->get('url')),
"record.delete.url" => $self->getUrl("func=deleteEntry;entryId=".$entry->getId),
"record.delete.icon" => $self->session->icon->delete("func=deleteEntry;entryId=".$entry->getId, $self->get('url'), $i18n->get('Delete entry confirmation')),
"record.delete.icon" => $session->icon->delete("func=deleteEntry;entryId=".$entry->getId, $self->get('url'), $i18n->get('Delete entry confirmation')),
"record.username" => $entry->username,
"record.userId" => $entry->userId,
"record.submissionDate.epoch" => $entry->submissionDate->epoch,
@ -746,6 +750,7 @@ sub getListTemplateVars {
};
}
$var->{record_loop} = \@recordLoop;
$p->appendTemplateVars($var);
return $var;
}

View file

@ -207,7 +207,7 @@ sub getId {
#-------------------------------------------------------------------
=head2 iterateAll ( $asset )
=head2 iterateAll ( $asset, [ $options ] )
This class method returns an iterator set to iterate over all entries for a Dataform.
@ -215,13 +215,33 @@ This class method returns an iterator set to iterate over all entries for a Data
A reference to a Dataform object.
=head3 $options
A hashreference of options.
=head4 offset
The record number to start the iterator at. Defaults to 0 if not set.
=head4 limit
The number of records for the iterator to return. Defaults to a very large number if not set.
=cut
sub iterateAll {
my $class = shift;
my $asset = shift;
my $sth = $asset->session->dbSlave->read("SELECT `DataForm_entryId`, `userId`, `username`, `ipAddress`, `submissionDate`, `entryData` FROM `DataForm_entry` WHERE `assetId` = ? ORDER BY `submissionDate` DESC", [$asset->getId]);
my $sub = sub {
my $class = shift;
my $asset = shift;
my $options = shift;
my $sql = "SELECT SQL_CALC_FOUND_ROWS `DataForm_entryId`, `userId`, `username`, `ipAddress`, `submissionDate`, `entryData` FROM `DataForm_entry` WHERE `assetId` = ? ORDER BY `submissionDate` DESC LIMIT ?,?";
my $placeHolders = [ $asset->getId ];
push @{ $placeHolders }, exists $options->{offset} ? $options->{offset} : 0;
push @{ $placeHolders }, exists $options->{limit} ? $options->{limit} : 1234567890;
my $slave = $asset->session->dbSlave; ##Use the same slave to calculate the number of rows
my $sth = $slave->read($sql, $placeHolders);
my $allRows = $slave->quickScalar('SELECT FOUND_ROWS()');
my $sub = sub {
return $allRows if $_[0] eq 'rowCount';
if (defined wantarray) {
my $properties = $sth->hashRef;
if ($properties) {

View file

@ -141,6 +141,9 @@ our $HELP = {
{ namespace => "Asset_Template",
tag => "template variables"
},
{ namespace => "WebGUI",
tag => "pagination template variables"
},
],
fields => [],
variables => [

View file

@ -63,7 +63,7 @@ Private method which retrieves a data set from a database and replaces whatever
This method should only ever be called by the public setDataByQuery method and is only called in the case that dynamicPageNumberKey is set.
The public setDataByQuery method is not capable of efficiently handling requests that dyncmically set the page number by value
The public setDataByQuery method is not capable of efficiently handling requests that dynamically set the page number by value
due to the fact that only one page of results is ever returned. In this method, all the results are returned making this possible.
=head3 query
@ -405,7 +405,7 @@ sub getPage {
=head2 getPageData ( [ pageNumber ] )
Returns the data from the page specified as an array reference.
Returns the data from the specified page as an array reference.
=head3 pageNumber
@ -414,40 +414,41 @@ Defaults to the page you're currently viewing. This is mostly here as an overrid
=cut
sub getPageData {
my $self = shift;
my $pageNumber = shift || $self->getPageNumber;
my $allRows = $self->{_rowRef};
my $pageCount = $self->getNumberOfPages;
return [] if ($pageNumber > $pageCount);
my $self = shift;
my $pageNumber = shift || $self->getPageNumber;
my $allRows = $self->{_rowRef};
my $pageCount = $self->getNumberOfPages;
return [] if ($pageNumber > $pageCount);
if($self->{_setByQuery}) {
#Return the cached page
return $allRows if($pageNumber == $self->getPageNumber);
return [];
}
}
#Handle setByArrayRef or the old setDataByQuery method
my @pageRows = ();
#Handle setByArrayRef or the old setDataByQuery method
my @pageRows = ();
my $rowsPerPage = $self->{_rpp};
my $pageStartRow = ($pageNumber*$rowsPerPage)-$rowsPerPage;
my $pageEndRow = $pageNumber*$rowsPerPage;
for (my $i=$pageStartRow; $i<$pageEndRow; $i++) {
$pageRows[$i-$pageStartRow] = $allRows->[$i] if ($i <= $#{$self->{_rowRef}});
}
return \@pageRows;
$pageRows[$i-$pageStartRow] = $allRows->[$i] if ($i <= $#{$self->{_rowRef}});
}
return \@pageRows;
}
#-------------------------------------------------------------------
=head2 getPageNumber ( )
=head2 getPageIterator ( )
Returns the current page number. If no page number can be found then it returns 1.
Returns the iterator that was created by setDataByCallback
=cut
sub getPageNumber {
return $_[0]->{_pn};
sub getPageIterator {
my $self = shift;
return $self->{_iteratorObj};
}
#-------------------------------------------------------------------
@ -458,7 +459,7 @@ Returns links to all pages in this paginator.
=head3 limit
An integer representing the maximum number of page links to return. Defaultly all page links will be returned.
An integer representing the maximum number of page links to return. By default, all page links will be returned.
=cut
@ -523,6 +524,18 @@ sub getPageLinks {
}
#-------------------------------------------------------------------
=head2 getPageNumber ( )
Returns the current page number. If no page number can be found then it returns 1.
=cut
sub getPageNumber {
return $_[0]->{_pn};
}
#-------------------------------------------------------------------
=head2 getPreviousPageLink ( )
@ -589,13 +602,13 @@ By default the page number will be determined by looking at $self->session->form
=cut
sub new {
my $class = shift;
my $session = shift;
my $currentURL = shift;
my $rowsPerPage = shift || 25;
my $formVar = shift || "pn";
my $pn = shift || $session->form->process($formVar) || 1;
bless {_session=>$session, _url => $currentURL, _rpp => $rowsPerPage, _formVar => $formVar, _pn => $pn}, $class;
my $class = shift;
my $session = shift;
my $currentURL = shift;
my $rowsPerPage = shift || 25;
my $formVar = shift || "pn";
my $pn = shift || $session->form->process($formVar) || 1;
bless {_session=>$session, _url => $currentURL, _rpp => $rowsPerPage, _formVar => $formVar, _pn => $pn}, $class;
}
#-------------------------------------------------------------------
@ -651,6 +664,42 @@ sub setDataByArrayRef {
}
#-------------------------------------------------------------------
=head2 setDataByCallback ( callback )
Provide the paginator with data by giving it a callback. This interface does not support
having alphabetical keys ala C<setAlphabeticalKey> because the data is never stored in
the Paginator object.
=head3 callback
A callback to invoke that returns an iterator. The callback method should
accept two optional parameters, an offset to start, and the rows per page
to return. The iterator should return the total number of rows in
the query, without limits, when the first argument it is passed is 'rowCount'.
=cut
sub setDataByCallback {
my $self = shift;
my $callback = shift;
my $pageNumber = $self->getPageNumber;
my $rowsPerPage = $self->{_rpp};
my $start = ( ($pageNumber - 1) * $rowsPerPage );
my $obj = $callback->($start, $rowsPerPage);
$self->{_totalRows} = $obj->('rowCount');
$self->{_iteratorObj} = $obj;
$self->{_setByQuery} = 0;
$self->{_setByArrayRef} = 0;
$self->{_setByCallback} = 1;
return '';
}
#-------------------------------------------------------------------
=head2 setDataByQuery ( query [, dbh, unconditional, placeholders, dynamicPageNumberKey, dynamicPageNumberValue ] )

View file

@ -29,7 +29,7 @@ my $df = WebGUI::Asset->getImportNode($session)->addChild( {
className => 'WebGUI::Asset::Wobject::DataForm',
} );
WebGUI::Test->tagsToRollback( WebGUI::VersionTag->getWorking( $session ) );
addToCleanup( WebGUI::VersionTag->getWorking( $session ) );
# Add fields to the dataform
$df->createField( "name", { type => "text", } );
@ -49,18 +49,20 @@ my @entryProperties = (
}
);
my $birthday = WebGUI::Test->webguiBirthday;
my @entries = ();
for my $properties (@entryProperties) {
my $entry = $df->entryClass->newFromHash( $df, $properties );
$entry->submissionDate(WebGUI::DateTime->new($session, $birthday++));
$entry->save;
push @entries, $entry;
sleep 1;
}
#----------------------------------------------------------------------------
# Tests
plan tests => 2; # Increment this number for each test you create
plan tests => 6; # Increment this number for each test you create
#----------------------------------------------------------------------------
# Test getListTemplateVars
@ -184,8 +186,63 @@ cmp_deeply(
'getListTemplateVars is complete and correct',
);
is($tmplVar->{'pagination.pageCount'}, 1, '... and has pagination variables');
#----------------------------------------------------------------------------
# Cleanup
#-------------------------------------
#Shove in a bunch of data to test pagination
my @quoteDb = (
{ name => "Red", message => "That tall drink of water", },
{ name => "Norton", message => "Do you enjoy working in the laundry?", },
{ name => "Andy", message => "They say it has no memory", },
{ name => "Boggs", message => "Hey, we all need friends in here", },
{ name => "Andy", message => "It's my life. Don't you understand?", },
{ name => "Red", message => "Rehabilitated? Well, now let me see.", },
{ name => "Red", message => "I know what *you* think it means, sonny.", },
{ name => "Red", message => "I know what *you* think it means, sonny.", },
{ name => "Andy", message => "How can you be so obtuse?", },
{ name => "Red", message => "The man likes to play chess; let's get him some rocks. ", },
{ name => "Brooks", message => "Easy peasy japanesey.", },
{ name => "Hadley", message => "What is your malfunction?", },
{ name => "Red", message => "Hope is a dangerous thing. Hope can drive a man insane. ", },
{ name => "Red", message => "They send you here for life, and that's exactly what they take.", },
{ name => "Red", message => "Truth is, I don't want to know. Some things are best left unsaid.", },
{ name => "Andy", message => "That's the beauty of music.", },
{ name => "Red", message => "I played a mean harmonica as a younger man.", },
{ name => "Tommy", message => "I don't read so good.", },
{ name => "Andy", message => "You don't read so *well*.", },
{ name => "Red", message => "Murder, same as you.", },
{ name => "Norton", message => "Salvation lies within.", },
{ name => "Andy", message => "Remember Red, hope is a good thing.", },
{ name => "Hadley", message => "Drink up while it's cold, ladies.", },
{ name => "Red", message => "We sat and drank with the sun on our shoulders and felt like free men.", },
{ name => "Andy", message => "You see that's tax deductible, you can write that off. ", },
{ name => "Norton", message => "Lord! It's a miracle!", },
{ name => "Red", message => "I don't have her stuffed down the front of my pants right now, I'm sorry to say, but I'll get her.", },
{ name => "Andy", message => "Get busy living, or get busy dying.", },
{ name => "Brooks", message => "The world went and got itself in a big damn hurry.", },
{ name => "Andy", message => "Everybody's innocent in here. Didn't you know that?", },
);
for my $quote (@quoteDb) {
my $entry = $df->entryClass->newFromHash( $df, $quote );
$entry->submissionDate(WebGUI::DateTime->new($session, $birthday++));
$entry->save;
push @entries, $entry;
}
$tmplVar = $df->getListTemplateVars({});
is @{ $tmplVar->{record_loop} }, 25, 'list variables are paginated';
ok $tmplVar->{'pagination.pageCount.isMultiple'}, 'pagination: has multiple pages';
$session->request->setup_body({ pn => 2, });
$tmplVar = $df->getListTemplateVars({});
is @{ $tmplVar->{record_loop} }, 7, '7 entries in the 2nd page';
#vim:ft=perl

View file

@ -25,7 +25,7 @@ use Data::Dumper;
my $session = WebGUI::Test->session;
plan tests => 26; # increment this value for each test you create
plan tests => 32; # increment this value for each test you create
my $startingRowNum = 0;
my $endingRowNum = 99;
@ -107,6 +107,12 @@ is('100', $p->getPage(5), '(101) page 5 stringification okay');
is($p->getPageNumber, 1, 'Default page number is 1'); ##Additional page numbers are specified at instantiation
########################################################################
#
# getPageLinks with limits
#
########################################################################
$expectedPages = [ map { +{
'pagination.text' => ( $_ + 1 ),
'pagination.range' => ( 25 * $_ + 1 ) . "-" . ( $_ * 25 + 25 <= $endingRowNum + 1 ? $_ * 25 + 25 : $endingRowNum + 1 ), # First row number - Last row number
@ -115,12 +121,6 @@ $expectedPages = [ map { +{
$expectedPages->[0]->{'pagination.activePage'} = 'true';
########################################################################
#
# getPageLinks with limits
#
########################################################################
cmp_deeply(
($p->getPageLinks)[0],
$expectedPages,
@ -217,3 +217,65 @@ cmp_deeply(
\@pageWindow,
'set of last 10 pages selected correctly, (20/20)',
);
########################################################################
#
# iterator based paginator
#
########################################################################
my $callback = sub {
my ($start, $rowsPerPage) = @_;
my $state = $start * 2;
my $counter = 0;
my $iterator = sub {
return 50 if $_[0] eq 'rowCount';
return if ($counter >= $rowsPerPage);
$state += 2;
++$counter;
return if $state > 50;
return $state;
};
return $iterator;
};
my $p1 = WebGUI::Paginator->new($session, '/neighborhood', 5);
$p1->setDataByCallback($callback);
my $pIterator = $p1->getPageIterator;
isa_ok($pIterator, 'CODE', 'getPageIterator');
is($pIterator->('rowCount'), 50, 'generated iterator returns the correct maximum number of rows');
is($p1->getNumberOfPages, 10, 'getNumberOfPages works with an iterator');
cmp_deeply(drainIterator($pIterator, 10), [2, 4, 6, 8, 10], 'setDataByCallback: iterator returned page 1 data');
$p1->setPageNumber(2);
$p1->setDataByCallback($callback);
$pIterator = $p1->getPageIterator;
cmp_deeply(drainIterator($pIterator, 10), [12, 14, 16, 18, 20], '... iterator returned page 2 data');
$expectedPages = [ map { +{
'pagination.text' => ( $_ + 1 ),
'pagination.range' => ( 5 * $_ + 1 ) . "-" . ( ($_+1) * 5 ), # First row number - Last row number
'pagination.url' => ( $_ != 1 ? '/neighborhood' . '?pn=' . ( $_ + 1 ) : '' ), # Current page has no URL
} } (0..9) ];
$expectedPages->[1]->{'pagination.activePage'} = 'true';
cmp_deeply(
($p1->getPageLinks())[0],
$expectedPages,
'getPageLinks works with a paginator'
);
sub drainIterator {
my $iterator = shift;
my $terminalCount = shift;
my $pageData = [];
my $infiniteLoopCount = 0;
while (defined(my $item = $pIterator->())) {
push @{ $pageData }, $item;
last if ++$infiniteLoopCount >= $terminalCount;
}
return $pageData;
}

View file

@ -1,281 +0,0 @@
**** v 0.8.1.1 ****
- Fix bug of frequent syntax desynchronisation when the first character of the textarea was highlighted
- In unload now check that parent.editareaLoader still exists before calling it
- Now consider that gecko and webkit based browser are valid browsers (but I won't test them all)
**** v 0.8.1 ****
- Improved speed of text highlighting process for huge file. Now we try to only insert or delete the changed caracters inside DOM text node instead of refreshing the whole area. (3 time faster in firefox)
- Greatly improved speed of line-height management in word-wrap context
- Add java syntax (thanks to Dawson Goodell)
- Use faster regexp for matching quoted strings
- Bug fix: if a highlighted quote or comment string contains cariage return, editing text on one of the lines was causin a highlight desynchronisation
- Bug fix: text war blur on Safari 3.2 (thanks to spellcoder)
- Bug fix: there had several mistake with non-monospace font (thanks to spellcoder)
- Bug fix: if show_line_colors was disabled and word wrap enable, highlighted text wasn't refreshed if a new line appears
- Bug fix: in multi file edition, closing the last tab was throwing an error in Firefox and let the content of the textarea displayed
- Browser bug detection: when using non-monospace font Firefox will sometime have strange behavior on text-width (the highlighted text-width in the background may change fron textarea one and simply can change after beeing updated); look likes a browser rendering bug
**** v 0.8 ****
- Word-wrap is now supported (except for opera...). The new init() option is 'word_wrap' to set to 'true' (default is false). A new button appears in the default toolbar (button_code: 'word_wrap' )
- We can now clearly see the selected text
- Add Internet explorer 8 support (but sadly I must use IE7 emulate mode in iframe due to a bug with tabulation width not beeing resized in IE's textarea)
- Add Safari 4 support
- Add Chrome 2 support
- Better support of Opera 9.6
- Add Simplified Chinese translation "zh" (thanks to Abentian)
- Add Bulgarian translation "bg" (thanks to Valentin Hristov)
- Rename internal function $() by _$()
- Delete EditArea.add_event() method (duplicate af editAreaLoader.add_event() method)
- Do some code cleanup-up
- Bug fix: highlight optimisation process was not working under IE (don't known how long it remain broken but must be since a long time)
- Bug fix: EditArea.update_size sometimes uses undefined variable (fix this possibility and cleanup events)
- Bug fix: Template.html was not valid XHTML
- Bug fix: The checked attribute of the toogle button was not defined in xhtml syntax
- Bug fix: If the editArea was loaded on a page related to a domain which was itself an iframe comming from another domain a JS error was thrown on load
- Bug fix: When EditArea is used to replace a textarea which has style="visibility:hidden;", switching off EditArea would throw an error under IE
**** v 0.7.3 ****
- Add Finnish transaltion (thanks to Janne Mäntyharju)
- Add 'cursor_position' init() option for defining where the cursor should be when the editor is show on the first time ('auto' or 'begin'). This was like 'auto' before now this is like 'begin' by default
- better add_style method (faster than old one) thanks to Spellcoder
- Bug fix: fix bug with mootools 1.2
- Bug fix: if page had no stylesheets when editarea load, it would generate an error
**** v 0.7.2.3 ****
- it's now released under both LGPL, Apache, BSD license (you can use the one you prefer)
- add support for bonEcho browser
**** v 0.7.2.2 ****
- Fix bug regression introduced in 0.7.2 that make IE7 not working
- add Esperento translation (thanks to Olivier)
- add Coldfusion syntax (thanks to Max Leynov)
**** v 0.7.2.1 ****
- fix bug for firefox rendering of highlighted lines that doesn't begin with a tab
- support for browser with grandParadisio agent instead of firefox
**** v 0.7.2 ****
- add Chrome support
- add show_line_colors init() option for enabling syntax color display and update on the currently edited line (disable the blue bar) (default to false)
- Add Perl syntax definition file (thanks to Christoph Pinkel)
- Bug fix: there allways was an horizontal scrollbar even if the content fit in the area.
**** v 0.7.1.3 ****
- Fix a bug introduced in Firefox 3.0.1 => the browser is no more able to render properly "pre" element with left padding...
- Add Robots.txt (thanks to Pavle Ggardijan) and T-SQL syntax definition files (thanks to Miladin Joksic)
**** v 0.7.1.2 ****
- Fix a bug on the full screen mode (regression added on 0.7.1.1)
**** v 0.7.1.1 ****
- Firefox 3 RC1 compatibility
- Code size reduction: 120Ko => 107Ko for edit_area_full.js
**** v 0.7.1 ****
- released under both LGPL and Apache license (you can use the one you prefer)
- it's now possible to get a readonly mode:
* new EditAreaLoader.init()'s option: "is_editable": true/false
* Possibility to switch edition mode by using the execCommand function: editAreaLoader.execCommand('editor_id', 'set_editable', !editAreaLoader.execCommand('editor_id', 'is_editable'));
- Added Ruby syntax (thanks to Patrice De Saint Steban)
- Fix a bug where the textarea lose the focus under firefox for Mac
- Minor other bug fixes
**** v 0.7.0.2 ****
- Fixed a bug with translation files containing non-latin caracters. Translations files must be in UTF-8.
- Added Czech, Macedionian and Russian translations
**** v 0.7.0.1 ****
- in multiple file mode, it's now possible to cancel the 'EA_file_close_callback' function. if the callback return false, the edited file won't be closed
- bug fix: if no syntax was defined in the main init() function in multifile mode, the first time the text was not highlighted
**** v 0.7 ****
- it's now possible to edit multiple files into one instance of EditArea. This (sponsored by Jupiter) feature comes with:
* new EditAreaLoader.init()'s option: "is_multi_files": true
* new editAreaLoader's functions: editAreaLoader.getCurrentFile(editArea_id), editAreaLoader.getFile(editArea_id, file_id), editAreaLoader.getAllFiles(editArea_id), editAreaLoader.openFile(editArea_id, file_infos), editAreaLoader.closeFile(editArea_id, file_id), editAreaLoader.setFileEditedMode(editArea_id, file_id, edited_mode)
* new callabacks: EA_file_switch_on_callback, EA_file_switch_off_callback, EA_file_close_callback
- look likes Safari 3 is working with EditArea
- add spanish translation (thanks Garito)
- add slovak translation (thanks Gabriel Schwardy)
- add SQL syntax definition file (thanks to Philippe Lewicki)
- the syntax selection plugin has been integrated to editarea core and load only needed files (the plugins was loading all the possible syntax files...). Toolbar button name: "syntax_selection", comma separated available syntax list: "syntax_selection_allow"
- add a 'compression' option in edit_area_compressor.php that allow to set where the code should be compressed or just packed (simple packed mode usefull for debugging)
- the yellow area that indicate the current edited line is now blue
- bug fix: parenthesis matching was not working correctly if there where an "<" between parenthesis
**** v 0.6.7 ****
- add a new plugin that allow the user to change the syntax definition in use. It adds a select in the toolbar. - plugin name to add to the plugin list: "syntax_selection". - plugin name to add to the toolbar list: "syntax_selection". - possible parameter to add to EditAreaLoader.init():
"syntax_selection_allow": (String) define a list separated by "," of possible language syntax to use (eg: "php,js,python,html")
- add Croatian translation (HR) (thanks to Ivan Vucica and Davor Cihlar)
- add BASIC, Brainf*ck, C, C++ and Pascal syntax definition files (thanks to Ivan Vucica and Davor Cihlar)
- add Iceweasel as a known working navigator (its a clone of Firefox)
- improved the php syntax by highlighting the variables ($...)
- reactivate gzip compression for IE7 (was desactivate for IE as it sometimes failed). (Let me know if you see that the load fails under IE7)
- pressing "enter" while being in the search box now perform a search.
- add Camino as a supported browser
- bug fix: when clicking between the bottom toolbar and the textarea (when there is only few lines of text), the textarea didn't get the focus
- bug fix: under IE the delete_instance() method was throwing an error
- bug fix: if the textarea to convert in an EditArea was in a frame (or iframe) getting back from fullscreen to normal display was not restoring the correct settings to the frame containing the textarea.
- bug fix (at least I hope): in IE if the textarea to convert in an EditArea was in a frame, resizing the frame was not correctly resizing the editor if it was in fullscreen.
- bug fix: in Opera the selectionned line was not rendered correctly if containing \t caracters (bug introduced in one of the latest version...)
- bug fix: "altgr+f" was openning the searchbox and avoid to write "[" and "]" in croatian keyboards.
- bug fix: in Firefox "ctrl+tab" was inserting a tabulation while switching active tab (window)
Note: v 0.6.5 and v 0.6.6 have been private release (change log is regrouped in v 0.6.7)
**** v 0.6.4 ****
- add replace_tab_by_spaces init() option which allow to replace all tabulation caracters typped in the text by a given number of spaces
- add min_width and min_height init() option for the minimum size in pixel for the editor
- add dutch translation files (NL) (thanks to Bart Bosma)
- pressing Shift+Tab when no text is selected now delete the tabulation before the cursor (if a tabulation is present directly behing the cursor)
- improve Python syntax (thanks to Andre Roberge)
- bug fix: the fullpage plugin was not working correctly when the Editor was placed inside several divs that have positioning of there own
- bug fix: one regexp used in edit_area_compressor.php was not compatible with latest PCRE version
- fix the my_load and my_save functions of the 'exemple_full.html' page
**** v 0.6.3.1 ****
- regression: restore monospace as default font
- add little improvements to the PHP compressor: allow to win 7 Ko on edit_area_full.js
- add the version number in the about popup
- bug fix: fix a regexp that was not compliant with newer version of PCRE
- bug fix: fix some bug with the fullscreen mode (still not perfect in Opera)
- bug fix: the close button of the help popup was not correctly translated
- bug fix: when deleting an instance of editArea toggle_off was called even if the editArea was not displayed
**** v 0.6.3 ****
- allow to use non monospace font using the font_family init option. Firefox get smaller tabulation with non monospace fonts. IE doesn't change the tabulation width and Opera doesn't take this option into account... new default font-familly: 'verdana,monospace'
- add fullscreen option in the toolbar and as an init() option.
- if the based textarea has a width (or height) in '%', EditArea will get the same '%' width (or height), allowing EditArea to be resized in the same time than the window.
- add many callback possibility: submit_callback, EA_load_callback, EA_unload_callback, EA_init_callback, EA_toggle_on_callback, EA_toggle_off_callback, EA_delete_callback (see documentation for more information)
- bug fix: when toggling from textarea to editarea, IE was almost of the time not keeping the selection
- bug fix: the brackets where still highlighted in red when being deleted
- bug fix: brackets where not placed correctly when the line contains html entitites (&amp; &quot; etc....)
**** v 0.6.2 ****
WARNING => POSSIBLE BREAK COMPATIBILITY:
- the load_callback now receive the 'id' of the textarea and no more a reference to the textarea. Developpers should use editAreaLoder methods rather than modfying directly the textarea.
- the save_callback now receive the 'id' of the textarea as first argument, and it's content in the second argument.
- EditArea is now compatible with javascript libraries like "prototype" (1.5) and "mootools" (release 83)
- add two function to EditAreaLoader: hide(id) and show(id), that will allow to completly hide/restore both EditArea and normal textarea (usefull when EditArea is included in tabs).
- it's no more possible to move the search window out of the frame.
- gecko_spellcheck option is now set to false by default.
- add a onchange_callback option (cf doc)
- bug fix: in IE when syntax highlight was on, clicking on the textarea outside the range of the text, the click wasn't taking into account.
- bug fix: references to the orginal textarea could be lost while using EditArea.
- bug fix: using insertTags, getSelectionRange when editArea was not focused, IE failed
- bug fix: main script could fail to load additionnal files in certain specific cases
**** v 0.6.1 ****
- compatiblity with Firefox 2 checked (was already compatible before).
- compatiblity with IE7 checked (was already compatible before).
- added possibility to call the editAreaLoader.init() function at any moment (no more limited to window load). Allow to replace an EditArea instance by a new one with other options.
- added new gecko_spellcheck option, this enables you to disable/enable the FF 2.0 spellchecker.
- added editAreaLoader.delete_instance(id) to allow to delete an EditArea instance
- Fix a bug where "Ctrl+G" wasn't openning anymore the go to line prompt box.
**** v 0.6.0.1 ****
- add italian translation (thanks to Luciano Vernaschi)
- add polish translation (thanks to Piotr Furman)
- improve deutsh translation (thanks to Felix Riesterer)
- add a little style improvement for buttons in search popup. they can't be splited in two line anymore
- change color for tags in html and xml syntax due to visibility problems
**** v 0.6 ****
- add plugins possibilies
- add editAreaLoader.insertTags function to allow easy tags insertion.
- improve undo & redo functionnality
- improve php compression: "edit_area_full.js" is 9 Ko smaller
- improve syntax highlight regexp for quotted string. \\" or \\' (or \\\\", etc...) will now effectively close quotted string
- add scrollbars to the popups when the popup's height is smaller than the editor's height
- add japanese translation file (thanks to ISHITOYA Kentaro)
- add possibility to add line-break in toolbar ("*")
- disable gzip compression for IE (see: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312496)
- bug fix: when submitting form while editarea toggled off, the post value was equals to the old content of editarea and not the visible textarea
- bug fix: under IE the editor was scrolling when pressing enter
- bug fix: when insterting text on first line there was an highlight desynchronization
**** v 0.5.3 ****
WARNING => POSSIBLE BREAK COMPATIBILITY:
- correct a spelling error: "toogle" become "toggle" in the whole code. This can perturb the initialization with the "allow_toggle" init parameters
- add a case sensitive option in syntax definition files
- improve html syntax definition file
- add xml syntax definition file
- add vb syntax definition file (thanks to Martin Gottlieb)
- add some function that will allow dynamic EditArea content management, taking into account if the editor is displayed or toggled off (editAreaLodaer.getValue(), editAreaLoader.setValue(), editAreaLoader.getSelectedText(), editAreaLoader.setSelectedText(), editAreaLoader.getSelectionRange and editAreaLoader.setSelectionRange()). See "javascript functions" documentation for more informations
- add a generic function (editaAreaLoader.execCommand) to allow to access EditArea's functions and datas
- add portuguese translation file (thanks to Leonardo Sapucaia)
- add compatibility to IE7 RC1
**** v 0.5.2 ****
- Opera improvement: text indentation is now working, and "go to line" is now working as in other browsers
- Bug fix: It was still possible to select text in search popup
- Bug fix: the "go to line" popup wasn't displaying anymore
- There was still some hard codded word in the search field => added them to translation files
- Bug fix: when multiple languages were used in the same page, there could have translation exchange between the different editors
**** v 0.5.1 ****
- Bug fix: the highlighted bracket was displayed on line 1 when it should be in line 2
- Bug fix: the highlighted bracket were bad displayed in IE
- Bug fix: their was some error in the optimisation process of the highlight mode
- Bug fix: their was a bug when moving the search popup on IE
**** v 0.5 ****
- Now released under LGPL
- Rewrite nearly from scratch
- Added Danish translation file (thanks to Peter Klein)
- Add python syntax
WARNING => BREAK COMPATIBILITY:
- the whole loading process (javascript include and init function call) is changed (but it's similar to the old version)
- the languages translation files are not stored in the same variable
IMPROVEMENTS:
- The whole code is more stable
- Allow several instance on the same page
- Faster to load
- The highlight process is more stable and there is nearly no more to use the "re sync" button
- Add support of Opera 9 (even if its still not perfect)
- Add the possibility to load a new compressed script of only 20Ko for the whole core script even if PHP is not installed
- The textarea can be toggled to an EditArea on window load or later
- The EditArea is loaded in a iframe => there is no more interaction with user css
- Support the reset action of a form
- Add support for "page up" & "page down" button
- There is now a waiting screen when toggling on the highlight syntax (but it can't be an animated one, even gif are not animated due to CPU load)
- All supported browsers can now change font-size
BUG FIXES:
- Sometimes while using the "toggle editor" button to turn of the editor, the standard textarea was expanded to the full size of the textarea content.
- When resizing the area the selection was lost
- Allow translation for some forgotten hard-coded word (the "move" button for search popup, and "font size", and keys word in help panel).
- It was possible to "drag" the buttons from the Search/Replace popup into the content of the textarea.
- On first display (when the files are not in cache) or with xhtml doctype there is a display bug (the content of the textarea exceed of 4px)
- when the cursor was at the beginning of the 1st line of the textarea, the caracter position was set to 0 instead of 1
***v 0.4****
- Increases syntax highlight proccess speed by 5 => allow a better live editing mode with syntax highlight.
- Now syntax highlight has a real language syntax. Text is parsing with rules depending of the language definition file. (limitation: there is only one language on the same time > doesn't allow to parse html and php on the same page).
- Syntax highlight can be easily extended with new code languages (there is currently: php, css, js, html).
- Add german language file (thanks to Olaf Brambrink).
- Fix some little bugs.
***v0.33***
- First release.

View file

@ -1,49 +0,0 @@
<?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
and is currently released
under the "LGPL", "Apache" and "BSD" licenses (use the one you want), read the licenses agreement for details.
</p>
<h2>Features</h2>
<ul>
<li>Easy to integrate, only one script include and one function call</li>
<li>Tabulation support (allow to write well formated source code)</li>
<li>Customizable real-time syntax highlighting (currently: PHP, CSS, Javascript, Python, HTML, XML, VB, C, CPP, SQL, Pascal, Basic, Brainf*ck, and probably more...)</li>
<li>Word-wrap support</li>
<li>Search and replace (with regexp)</li>
<li>Auto-indenting new lines</li>
<li>Line numerotation</li>
<li>Multilanguage support (currently: Croatian, Czech, Danish, Dutch, English, Esperanto, French, German, Italian, Japanese, Macedonian, Polish, Portuguese, Russian, Slovak, Spanish, and probably more...)</li>
<li>Possible PHP gzip compression (compress the core files to one file of ~25Ko)</li>
<li>Allow multiple instances</li>
<li>Full screen mode</li>
<li>Possible plugin integration</li>
<li>Possible save and load callback functions</li>
<li>Possible dynamic content management</li>
<li>Can work in the same environment than "prototype" and "mootools"'s like libraries.</li>
</ul>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet 2007-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,90 +0,0 @@
<?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 and currently have no computer under linux, I can't 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 6 & 7 & 8</td>
<td>OK</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Firefox 1.5 & 2 & 3</td>
<td>OK</td>
<td>OK</td>
<td>OK</td>
</tr>
<tr>
<td>Safari 3.0 & 3.1 & 4</td>
<td>OK</td>
<td>&nbsp;</td>
<td>OK</td>
</tr>
<tr>
<td>Chrome 1 & 2</td>
<td>OK</td>
<td>???</td>
<td>???</td>
</tr>
<tr>
<td>Opera 9 & 9.6</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-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,224 +0,0 @@
<?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", "word_wrap", "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, word_wrap, |, 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><strong>cursor_position</strong>: define if the cursor should be placed where it was in the textarea before replacement (auto) or at the beginning of the file (begin).
<br /><span class='underline'>Type</span>: String ("begin" or "auto")
<br /><span class='underline'>Default</span>: "begin"
</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>word_wrap</strong>: determine if the text will be automatically wrapped to the next line when it reach the end of a line. This is linked ot the word_wrap icon available in the toolbar.
<br /><span class='underline'>Type</span>: Boolean
<br /><span class='underline'>Default</span>: false
</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-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,76 +0,0 @@
<?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>
<li>Spellcoder</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>
<li>Janne Mäntyharju (Finnish)</li>
<li>Abentian (Simplified chinese)</li>
<li>Valentin Hristov (Bulgarian)</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>
<li>Dawson Goodel (Java)</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-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,65 +0,0 @@
<?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-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,175 +0,0 @@
<?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-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,139 +0,0 @@
<?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-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,120 +0,0 @@
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

@ -1,159 +0,0 @@
<?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-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,41 +0,0 @@
<?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'>Licenses</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-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,108 +0,0 @@
<?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>
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-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -1,48 +0,0 @@
<?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 licenses</h1>
</div>
<div class='content'>
<p>
EditArea is released under "LGPL", "Apache" and "BSD" licenses, which mean that you can use EditArea if you follow at least one of thoses licenses.
</p>
</div>
<div class='header'>
<h1>LGPL</h1>
</div>
<div class='content'>
<p>
Visit <a href='http://www.gnu.org/copyleft/lesser.html'>http://www.gnu.org/copyleft/lesser.html</a> for more information about LGPL license.
</p>
</div>
<div class='header'>
<h1>BSD</h1>
</div>
<div class='content'>
<p>
Visit <a href='http://www.opensource.org/licenses/bsd-license.php'>http://www.opensource.org/licenses/bsd-license.php</a> for more information about BSD license.
</p>
</div>
<div class='header'>
<h1>APACHE</h1>
</div>
<div class='content'>
<p>
Visit <a href='http://www.apache.org/licenses/LICENSE-2.0'>http://www.apache.org/licenses/LICENSE-2.0</a> for more information about Apache license.
</p>
</div>
<div class='footer'>
<div class="indexlink"><a href="index.html">Index</a></div>
<div class='copyright'>EditArea - &copy; Christophe Dolivet 2007-2008</div>
<br style="clear: both" />
</div>
</body>
</html>

View file

@ -1,491 +0,0 @@
/**
* Autocompletion class
*
* An auto completion box appear while you're writing. It's possible to force it to appear with Ctrl+Space short cut
*
* Loaded as a plugin inside editArea (everything made here could have been made in the plugin directory)
* But is definitly linked to syntax selection (no need to do 2 different files for color and auto complete for each syntax language)
* and add a too important feature that many people would miss if included as a plugin
*
* - init param: autocompletion_start
* - Button name: "autocompletion"
*/
var EditArea_autocompletion= {
/**
* Get called once this file is loaded (editArea still not initialized)
*
* @return nothing
*/
init: function(){
// alert("test init: "+ this._someInternalFunction(2, 3));
if(editArea.settings["autocompletion"])
this.enabled= true;
else
this.enabled= false;
this.current_word = false;
this.shown = false;
this.selectIndex = -1;
this.forceDisplay = false;
this.isInMiddleWord = false;
this.autoSelectIfOneResult = false;
this.delayBeforeDisplay = 100;
this.checkDelayTimer = false;
this.curr_syntax_str = '';
this.file_syntax_datas = {};
}
/**
* 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 'autocompletion':
// Control id, button img, command
return parent.editAreaLoader.get_button_html('autocompletion_but', 'autocompletion.gif', 'toggle_autocompletion', false, this.baseURL);
break;
}
return false;
}*/
/**
* Get called once EditArea is fully loaded and initialised
*
* @return nothing
*/
,onload: function(){
if(this.enabled)
{
var icon= document.getElementById("autocompletion");
if(icon)
editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
}
this.container = document.createElement('div');
this.container.id = "auto_completion_area";
editArea.container.insertBefore( this.container, editArea.container.firstChild );
// add event detection for hiding suggestion box
parent.editAreaLoader.add_event( document, "click", function(){ editArea.plugins['autocompletion']._hide();} );
parent.editAreaLoader.add_event( editArea.textarea, "blur", function(){ editArea.plugins['autocompletion']._hide();} );
}
/**
* 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){
if(!this.enabled)
return true;
if (EA_keys[e.keyCode])
letter=EA_keys[e.keyCode];
else
letter=String.fromCharCode(e.keyCode);
// shown
if( this._isShown() )
{
// if escape, hide the box
if(letter=="Esc")
{
this._hide();
return false;
}
// Enter
else if( letter=="Entrer")
{
var as = this.container.getElementsByTagName('A');
// select a suggested entry
if( this.selectIndex >= 0 && this.selectIndex < as.length )
{
as[ this.selectIndex ].onmousedown();
return false
}
// simply add an enter in the code
else
{
this._hide();
return true;
}
}
else if( letter=="Tab" || letter=="Down")
{
this._selectNext();
return false;
}
else if( letter=="Up")
{
this._selectBefore();
return false;
}
}
// hidden
else
{
}
// show current suggestion list and do autoSelect if possible (no matter it's shown or hidden)
if( letter=="Space" && CtrlPressed(e) )
{
//parent.console.log('SHOW SUGGEST');
this.forceDisplay = true;
this.autoSelectIfOneResult = true;
this._checkLetter();
return false;
}
// wait a short period for check that the cursor isn't moving
setTimeout("editArea.plugins['autocompletion']._checkDelayAndCursorBeforeDisplay();", editArea.check_line_selection_timer +5 );
this.checkDelayTimer = false;
return true;
}
/**
* 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){
switch( cmd ){
case 'toggle_autocompletion':
var icon= document.getElementById("autocompletion");
if(!this.enabled)
{
if(icon != null){
editArea.restoreClass(icon);
editArea.switchClassSticky(icon, 'editAreaButtonSelected', true);
}
this.enabled= true;
}
else
{
this.enabled= false;
if(icon != null)
editArea.switchClassSticky(icon, 'editAreaButtonNormal', false);
}
return true;
}
return true;
}
,_checkDelayAndCursorBeforeDisplay: function()
{
this.checkDelayTimer = setTimeout("if(editArea.textarea.selectionStart == "+ editArea.textarea.selectionStart +") EditArea_autocompletion._checkLetter();", this.delayBeforeDisplay - editArea.check_line_selection_timer - 5 );
}
// hide the suggested box
,_hide: function(){
this.container.style.display="none";
this.selectIndex = -1;
this.shown = false;
this.forceDisplay = false;
this.autoSelectIfOneResult = false;
}
// display the suggested box
,_show: function(){
if( !this._isShown() )
{
this.container.style.display="block";
this.selectIndex = -1;
this.shown = true;
}
}
// is the suggested box displayed?
,_isShown: function(){
return this.shown;
}
// setter and getter
,_isInMiddleWord: function( new_value ){
if( typeof( new_value ) == "undefined" )
return this.isInMiddleWord;
else
this.isInMiddleWord = new_value;
}
// select the next element in the suggested box
,_selectNext: function()
{
var as = this.container.getElementsByTagName('A');
// clean existing elements
for( var i=0; i<as.length; i++ )
{
if( as[i].className )
as[i].className = as[i].className.replace(/ focus/g, '');
}
this.selectIndex++;
this.selectIndex = ( this.selectIndex >= as.length || this.selectIndex < 0 ) ? 0 : this.selectIndex;
as[ this.selectIndex ].className += " focus";
}
// select the previous element in the suggested box
,_selectBefore: function()
{
var as = this.container.getElementsByTagName('A');
// clean existing elements
for( var i=0; i<as.length; i++ )
{
if( as[i].className )
as[i].className = as[ i ].className.replace(/ focus/g, '');
}
this.selectIndex--;
this.selectIndex = ( this.selectIndex >= as.length || this.selectIndex < 0 ) ? as.length-1 : this.selectIndex;
as[ this.selectIndex ].className += " focus";
}
,_select: function( content )
{
cursor_forced_position = content.indexOf( '{@}' );
content = content.replace(/{@}/g, '' );
editArea.getIESelection();
// retrive the number of matching characters
var start_index = Math.max( 0, editArea.textarea.selectionEnd - content.length );
line_string = editArea.textarea.value.substring( start_index, editArea.textarea.selectionEnd + 1);
limit = line_string.length -1;
nbMatch = 0;
for( i =0; i<limit ; i++ )
{
if( line_string.substring( limit - i - 1, limit ) == content.substring( 0, i + 1 ) )
nbMatch = i + 1;
}
// if characters match, we should include them in the selection that will be replaced
if( nbMatch > 0 )
parent.editAreaLoader.setSelectionRange(editArea.id, editArea.textarea.selectionStart - nbMatch , editArea.textarea.selectionEnd);
parent.editAreaLoader.setSelectedText(editArea.id, content );
range= parent.editAreaLoader.getSelectionRange(editArea.id);
if( cursor_forced_position != -1 )
new_pos = range["end"] - ( content.length-cursor_forced_position );
else
new_pos = range["end"];
parent.editAreaLoader.setSelectionRange(editArea.id, new_pos, new_pos);
this._hide();
}
/**
* Parse the AUTO_COMPLETION part of syntax definition files
*/
,_parseSyntaxAutoCompletionDatas: function(){
//foreach syntax loaded
for(var lang in parent.editAreaLoader.load_syntax)
{
if(!parent.editAreaLoader.syntax[lang]['autocompletion']) // init the regexp if not already initialized
{
parent.editAreaLoader.syntax[lang]['autocompletion']= {};
// the file has auto completion datas
if(parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
{
// parse them
for(var i in parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'])
{
datas = parent.editAreaLoader.load_syntax[lang]['AUTO_COMPLETION'][i];
tmp = {};
if(datas["CASE_SENSITIVE"]!="undefined" && datas["CASE_SENSITIVE"]==false)
tmp["modifiers"]="i";
else
tmp["modifiers"]="";
tmp["prefix_separator"]= datas["REGEXP"]["prefix_separator"];
tmp["match_prefix_separator"]= new RegExp( datas["REGEXP"]["prefix_separator"] +"$", tmp["modifiers"]);
tmp["match_word"]= new RegExp("(?:"+ datas["REGEXP"]["before_word"] +")("+ datas["REGEXP"]["possible_words_letters"] +")$", tmp["modifiers"]);
tmp["match_next_letter"]= new RegExp("^("+ datas["REGEXP"]["letter_after_word_must_match"] +")$", tmp["modifiers"]);
tmp["keywords"]= {};
//console.log( datas["KEYWORDS"] );
for( var prefix in datas["KEYWORDS"] )
{
tmp["keywords"][prefix]= {
prefix: prefix,
prefix_name: prefix,
prefix_reg: new RegExp("(?:"+ parent.editAreaLoader.get_escaped_regexp( prefix ) +")(?:"+ tmp["prefix_separator"] +")$", tmp["modifiers"] ),
datas: []
};
for( var j=0; j<datas["KEYWORDS"][prefix].length; j++ )
{
tmp["keywords"][prefix]['datas'][j]= {
is_typing: datas["KEYWORDS"][prefix][j][0],
// if replace with is empty, replace with the is_typing value
replace_with: datas["KEYWORDS"][prefix][j][1] ? datas["KEYWORDS"][prefix][j][1].replace('§', datas["KEYWORDS"][prefix][j][0] ) : '',
comment: datas["KEYWORDS"][prefix][j][2] ? datas["KEYWORDS"][prefix][j][2] : ''
};
// the replace with shouldn't be empty
if( tmp["keywords"][prefix]['datas'][j]['replace_with'].length == 0 )
tmp["keywords"][prefix]['datas'][j]['replace_with'] = tmp["keywords"][prefix]['datas'][j]['is_typing'];
// if the comment is empty, display the replace_with value
if( tmp["keywords"][prefix]['datas'][j]['comment'].length == 0 )
tmp["keywords"][prefix]['datas'][j]['comment'] = tmp["keywords"][prefix]['datas'][j]['replace_with'].replace(/{@}/g, '' );
}
}
tmp["max_text_length"]= datas["MAX_TEXT_LENGTH"];
parent.editAreaLoader.syntax[lang]['autocompletion'][i] = tmp;
}
}
}
}
}
,_checkLetter: function(){
// check that syntax hasn't changed
if( this.curr_syntax_str != editArea.settings['syntax'] )
{
if( !parent.editAreaLoader.syntax[editArea.settings['syntax']]['autocompletion'] )
this._parseSyntaxAutoCompletionDatas();
this.curr_syntax= parent.editAreaLoader.syntax[editArea.settings['syntax']]['autocompletion'];
this.curr_syntax_str = editArea.settings['syntax'];
//console.log( this.curr_syntax );
}
if( editArea.is_editable )
{
time=new Date;
t1= time.getTime();
editArea.getIESelection();
this.selectIndex = -1;
start=editArea.textarea.selectionStart;
var str = editArea.textarea.value;
var results= [];
for(var i in this.curr_syntax)
{
var last_chars = str.substring(Math.max(0, start-this.curr_syntax[i]["max_text_length"]), start);
var matchNextletter = str.substring(start, start+1).match( this.curr_syntax[i]["match_next_letter"]);
// if not writting in the middle of a word or if forcing display
if( matchNextletter || this.forceDisplay )
{
// check if the last chars match a separator
var match_prefix_separator = last_chars.match(this.curr_syntax[i]["match_prefix_separator"]);
// check if it match a possible word
var match_word= last_chars.match(this.curr_syntax[i]["match_word"]);
//console.log( match_word );
if( match_word )
{
var begin_word= match_word[1];
var match_curr_word= new RegExp("^"+ parent.editAreaLoader.get_escaped_regexp( begin_word ), this.curr_syntax[i]["modifiers"]);
//console.log( match_curr_word );
for(var prefix in this.curr_syntax[i]["keywords"])
{
// parent.console.log( this.curr_syntax[i]["keywords"][prefix] );
for(var j=0; j<this.curr_syntax[i]["keywords"][prefix]['datas'].length; j++)
{
// parent.console.log( this.curr_syntax[i]["keywords"][prefix]['datas'][j]['is_typing'] );
// the key word match or force display
if( this.curr_syntax[i]["keywords"][prefix]['datas'][j]['is_typing'].match(match_curr_word) )
{
// parent.console.log('match');
hasMatch = false;
var before = last_chars.substr( 0, last_chars.length - begin_word.length );
// no prefix to match => it's valid
if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
{
if( ! before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
hasMatch = true;
}
// we still need to check the prefix if there is one
else if( this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
{
if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
hasMatch = true;
}
if( hasMatch )
results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];
}
}
}
}
// it doesn't match any possible word but we want to display something
// we'll display to list of all available words
else if( this.forceDisplay || match_prefix_separator )
{
for(var prefix in this.curr_syntax[i]["keywords"])
{
for(var j=0; j<this.curr_syntax[i]["keywords"][prefix]['datas'].length; j++)
{
hasMatch = false;
// no prefix to match => it's valid
if( !match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length == 0 )
{
hasMatch = true;
}
// we still need to check the prefix if there is one
else if( match_prefix_separator && this.curr_syntax[i]["keywords"][prefix]['prefix'].length > 0 )
{
var before = last_chars; //.substr( 0, last_chars.length );
if( before.match( this.curr_syntax[i]["keywords"][prefix]['prefix_reg'] ) )
hasMatch = true;
}
if( hasMatch )
results[results.length]= [ this.curr_syntax[i]["keywords"][prefix], this.curr_syntax[i]["keywords"][prefix]['datas'][j] ];
}
}
}
}
}
// there is only one result, and we can select it automatically
if( results.length == 1 && this.autoSelectIfOneResult )
{
// console.log( results );
this._select( results[0][1]['replace_with'] );
}
else if( results.length == 0 )
{
this._hide();
}
else
{
// build the suggestion box content
var lines=[];
for(var i=0; i<results.length; i++)
{
var line= "<li><a href=\"#\" class=\"entry\" onmousedown=\"EditArea_autocompletion._select('"+ results[i][1]['replace_with'].replace(new RegExp('"', "g"), "&quot;") +"');return false;\">"+ results[i][1]['comment'];
if(results[i][0]['prefix_name'].length>0)
line+='<span class="prefix">'+ results[i][0]['prefix_name'] +'</span>';
line+='</a></li>';
lines[lines.length]=line;
}
// sort results
this.container.innerHTML = '<ul>'+ lines.sort().join('') +'</ul>';
var cursor = _$("cursor_pos");
this.container.style.top = ( cursor.cursor_top + editArea.lineHeight ) +"px";
this.container.style.left = ( cursor.cursor_left + 8 ) +"px";
this._show();
}
this.autoSelectIfOneResult = false;
time=new Date;
t2= time.getTime();
//parent.console.log( begin_word +"\n"+ (t2-t1) +"\n"+ html );
}
}
};
// Load as a plugin
editArea.settings['plugins'][ editArea.settings['plugins'].length ] = 'autocompletion';
editArea.add_plugin('autocompletion', EditArea_autocompletion);

View file

@ -1,530 +0,0 @@
body, html{
margin: 0;
padding: 0;
height: 100%;
border: none;
overflow: hidden;
background-color: #FFF;
}
body, html, table, form, textarea{
font: 12px monospace, sans-serif;
}
#editor{
border: solid #888 1px;
overflow: hidden;
}
#result{
z-index: 4;
overflow-x: auto;
overflow-y: scroll;
border-top: solid #888 1px;
border-bottom: solid #888 1px;
position: relative;
clear: both;
}
#result.empty{
overflow: hidden;
}
#container{
overflow: hidden;
border: solid blue 0;
position: relative;
z-index: 10;
padding: 0 5px 0 45px;
/*padding-right: 5px;*/
}
#textarea{
position: relative;
top: 0;
left: 0;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 7;
border-width: 0;
background-color: transparent;
resize: none;
}
#textarea, #textarea:hover{
outline: none; /* safari outline fix */
}
#content_highlight{
white-space: pre;
margin: 0;
padding: 0;
position : absolute;
z-index: 4;
overflow: visible;
}
#selection_field, #selection_field_text{
margin: 0;
background-color: #E1F2F9;
/* height: 1px; */
position: absolute;
z-index: 5;
top: -100px;
padding: 0;
white-space: pre;
overflow: hidden;
}
#selection_field.show_colors {
z-index: 3;
background-color:#EDF9FC;
}
#selection_field strong{
font-weight:normal;
}
#selection_field.show_colors *, #selection_field_text * {
visibility: hidden;
}
#selection_field_text{
background-color:transparent;
}
#selection_field_text strong{
font-weight:normal;
background-color:#3399FE;
color: #FFF;
visibility:visible;
}
#container.word_wrap #content_highlight,
#container.word_wrap #selection_field,
#container.word_wrap #selection_field_text,
#container.word_wrap #test_font_size{
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
width: 99%;
}
#line_number{
position: absolute;
overflow: hidden;
border-right: solid black 1px;
z-index:8;
width: 38px;
padding: 0 5px 0 0;
margin: 0 0 0 -45px;
text-align: right;
color: #AAAAAA;
}
#test_font_size{
padding: 0;
margin: 0;
visibility: hidden;
position: absolute;
white-space: pre;
}
pre{
margin: 0;
padding: 0;
}
.hidden{
opacity: 0.2;
filter:alpha(opacity=20);
}
#result .edit_area_cursor{
position: absolute;
z-index:6;
background-color: #FF6633;
top: -100px;
margin: 0;
}
#result .edit_area_selection_field .overline{
background-color: #996600;
}
/* area popup */
.editarea_popup{
border: solid 1px #888888;
background-color: #ECE9D8;
width: 250px;
padding: 4px;
position: absolute;
visibility: hidden;
z-index: 15;
top: -500px;
}
.editarea_popup, .editarea_popup table{
font-family: sans-serif;
font-size: 10pt;
}
.editarea_popup img{
border: 0;
}
.editarea_popup .close_popup{
float: right;
line-height: 16px;
border: 0;
padding: 0;
}
.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{
margin: 0;
padding: 0;
}
.editarea_popup .copyright{
text-align: right;
}
/* Area_search */
div#area_search_replace{
/*width: 250px;*/
}
div#area_search_replace img{
border: 0;
}
div#area_search_replace div.button{
text-align: center;
line-height: 1.7em;
}
div#area_search_replace .button a{
cursor: pointer;
border: solid 1px #888888;
background-color: #DEDEDE;
text-decoration: none;
padding: 0 2px;
color: #000000;
white-space: nowrap;
}
div#area_search_replace a:hover{
/*border: solid 1px #888888;*/
background-color: #EDEDED;
}
div#area_search_replace #move_area_search_replace{
cursor: move;
border: solid 1px #888;
}
div#area_search_replace #close_area_search_replace{
text-align: right;
vertical-align: top;
white-space: nowrap;
}
div#area_search_replace #area_search_msg{
height: 18px;
overflow: hidden;
border-top: solid 1px #888;
margin-top: 3px;
}
/* area help */
#edit_area_help{
width: 350px;
}
#edit_area_help div.close_popup{
float: right;
}
/* area_toolbar */
.area_toolbar{
/*font: 11px sans-serif;*/
width: 100%;
/*height: 21px; */
margin: 0;
padding: 0;
background-color: #ECE9D8;
text-align: center;
}
.area_toolbar, .area_toolbar table{
font: 11px sans-serif;
}
.area_toolbar img{
border: 0;
vertical-align: middle;
}
.area_toolbar input{
margin: 0;
padding: 0;
}
.area_toolbar select{
font-family: 'MS Sans Serif',sans-serif,Verdana,Arial;
font-size: 7pt;
font-weight: normal;
margin: 2px 0 0 0 ;
padding: 0;
vertical-align: top;
background-color: #F0F0EE;
}
table.statusbar{
width: 100%;
}
.area_toolbar td.infos{
text-align: center;
width: 130px;
border-right: solid 1px #888;
border-width: 0 1px 0 0;
padding: 0;
}
.area_toolbar td.total{
text-align: right;
width: 50px;
padding: 0;
}
.area_toolbar td.resize{
text-align: right;
}
/*
.area_toolbar span{
line-height: 1px;
padding: 0;
margin: 0;
}*/
.area_toolbar span#resize_area{
cursor: nw-resize;
visibility: hidden;
}
/* toolbar buttons */
.editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected {
border: 0; margin: 0; padding: 0; background: transparent;
margin-top: 0;
margin-left: 1px;
padding: 0;
}
.editAreaButtonNormal {
border: 1px solid #ECE9D8 !important;
cursor: pointer;
}
.editAreaButtonOver {
border: 1px solid #0A246A !important;
cursor: pointer;
background-color: #B6BDD2;
}
.editAreaButtonDown {
cursor: pointer;
border: 1px solid #0A246A !important;
background-color: #8592B5;
}
.editAreaButtonSelected {
border: 1px solid #C0C0BB !important;
cursor: pointer;
background-color: #F4F2E8;
}
.editAreaButtonDisabled {
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
-moz-opacity:0.3;
opacity: 0.3;
border: 1px solid #F0F0EE !important;
cursor: pointer;
}
.editAreaSeparatorLine {
margin: 1px 2px;
background-color: #C0C0BB;
width: 2px;
height: 18px;
}
/* waiting screen */
#processing{
display: none;
background-color:#ECE9D8;
border: solid #888 1px;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
text-align: center;
}
#processing_text{
position:absolute;
left: 50%;
top: 50%;
width: 200px;
height: 20px;
margin-left: -100px;
margin-top: -10px;
text-align: center;
}
/* end */
/**** tab browsing area ****/
#tab_browsing_area{
display: none;
background-color: #CCC9A8;
border-top: 1px solid #888;
text-align: left;
margin: 0;
}
#tab_browsing_list {
padding: 0;
margin: 0;
list-style-type: none;
white-space: nowrap;
}
#tab_browsing_list li {
float: left;
margin: -1px;
}
#tab_browsing_list a {
position: relative;
display: block;
text-decoration: none;
float: left;
cursor: pointer;
line-height:14px;
}
#tab_browsing_list a span {
display: block;
color: #000;
background: #ECE9D8;
border: 1px solid #888;
border-width: 1px 1px 0;
text-align: center;
padding: 2px 2px 1px 4px;
position: relative; /*IE 6 hack */
}
#tab_browsing_list a b {
display: block;
border-bottom: 2px solid #617994;
}
#tab_browsing_list a .edited {
display: none;
}
#tab_browsing_list a.edited .edited {
display: inline;
}
#tab_browsing_list a img{
margin-left: 7px;
}
#tab_browsing_list a.edited img{
margin-left: 3px;
}
#tab_browsing_list a:hover span {
background: #F4F2E8;
border-color: #0A246A;
}
#tab_browsing_list .selected a span{
background: #046380;
color: #FFF;
}
#no_file_selected{
height: 100%;
width: 150%; /* Opera need more than 100% */
background: #CCC;
display: none;
z-index: 20;
position: absolute;
}
/*** Non-editable mode ***/
.non_editable #editor
{
border-width: 0 1px;
}
.non_editable .area_toolbar
{
display: none;
}
/*** Auto completion ***/
#auto_completion_area
{
background: #FFF;
border: solid 1px #888;
position: absolute;
z-index: 15;
width: 280px;
height: 180px;
overflow: auto;
display:none;
}
#auto_completion_area a, #auto_completion_area a:visited
{
display: block;
padding: 0 2px 1px;
color: #000;
text-decoration:none;
}
#auto_completion_area a:hover, #auto_completion_area a:focus, #auto_completion_area a.focus
{
background: #D6E1FE;
text-decoration:none;
}
#auto_completion_area ul
{
margin: 0;
padding: 0;
list-style: none inside;
}
#auto_completion_area li
{
padding: 0;
}
#auto_completion_area .prefix
{
font-style: italic;
padding: 0 3px;
}

View file

@ -1,525 +0,0 @@
/******
*
* EditArea
* Developped by Christophe Dolivet
* Released under LGPL, Apache and BSD licenses (use the one you want)
*
******/
function EditArea(){
var t=this;
t.error= false; // to know if load is interrrupt
t.inlinePopup= [{popup_id: "area_search_replace", icon_id: "search"},
{popup_id: "edit_area_help", icon_id: "help"}];
t.plugins= {};
t.line_number=0;
parent.editAreaLoader.set_browser_infos(t); // navigator identification
// fix IE8 detection as we run in IE7 emulate mode through X-UA <meta> tag
if( t.isIE >= 8 )
t.isIE = 7;
t.last_selection={};
t.last_text_to_highlight="";
t.last_hightlighted_text= "";
t.syntax_list= [];
t.allready_used_syntax= {};
t.check_line_selection_timer= 50; // the timer delay for modification and/or selection change detection
t.textareaFocused= false;
t.highlight_selection_line= null;
t.previous= [];
t.next= [];
t.last_undo="";
t.files= {};
t.filesIdAssoc= {};
t.curr_file= '';
//t.loaded= false;
t.assocBracket={};
t.revertAssocBracket= {};
// bracket selection init
t.assocBracket["("]=")";
t.assocBracket["{"]="}";
t.assocBracket["["]="]";
for(var index in t.assocBracket){
t.revertAssocBracket[t.assocBracket[index]]=index;
}
t.is_editable= true;
/*t.textarea="";
t.state="declare";
t.code = []; // store highlight syntax for languagues*/
// font datas
t.lineHeight= 16;
/*t.default_font_family= "monospace";
t.default_font_size= 10;*/
t.tab_nb_char= 8; //nb of white spaces corresponding to a tabulation
if(t.isOpera)
t.tab_nb_char= 6;
t.is_tabbing= false;
t.fullscreen= {'isFull': false};
t.isResizing=false; // resize var
// init with settings and ID (area_id is a global var defined by editAreaLoader on iframe creation
t.id= area_id;
t.settings= editAreas[t.id]["settings"];
if((""+t.settings['replace_tab_by_spaces']).match(/^[0-9]+$/))
{
t.tab_nb_char= t.settings['replace_tab_by_spaces'];
t.tabulation="";
for(var i=0; i<t.tab_nb_char; i++)
t.tabulation+=" ";
}else{
t.tabulation="\t";
}
// retrieve the init parameter for syntax
if(t.settings["syntax_selection_allow"] && t.settings["syntax_selection_allow"].length>0)
t.syntax_list= t.settings["syntax_selection_allow"].replace(/ /g,"").split(",");
if(t.settings['syntax'])
t.allready_used_syntax[t.settings['syntax']]=true;
};
EditArea.prototype.init= function(){
var t=this, a, s=t.settings;
t.textarea = _$("textarea");
t.container = _$("container");
t.result = _$("result");
t.content_highlight = _$("content_highlight");
t.selection_field = _$("selection_field");
t.selection_field_text= _$("selection_field_text");
t.processing_screen = _$("processing");
t.editor_area = _$("editor");
t.tab_browsing_area = _$("tab_browsing_area");
t.test_font_size = _$("test_font_size");
a = t.textarea;
if(!s['is_editable'])
t.set_editable(false);
t.set_show_line_colors( s['show_line_colors'] );
if(syntax_selec= _$("syntax_selection"))
{
// set up syntax selection lsit in the toolbar
for(var i=0; i<t.syntax_list.length; i++) {
var syntax= t.syntax_list[i];
var option= document.createElement("option");
option.value= syntax;
if(syntax==s['syntax'])
option.selected= "selected";
option.innerHTML= t.get_translation("syntax_" + syntax, "word");
syntax_selec.appendChild(option);
}
}
// add plugins buttons in the toolbar
spans= parent.getChildren(_$("toolbar_1"), "span", "", "", "all", -1);
for(var i=0; i<spans.length; i++){
id=spans[i].id.replace(/tmp_tool_(.*)/, "$1");
if(id!= spans[i].id){
for(var j in t.plugins){
if(typeof(t.plugins[j].get_control_html)=="function" ){
html=t.plugins[j].get_control_html(id);
if(html!=false){
html= t.get_translation(html, "template");
var new_span= document.createElement("span");
new_span.innerHTML= html;
var father= spans[i].parentNode;
spans[i].parentNode.replaceChild(new_span, spans[i]);
break; // exit the for loop
}
}
}
}
}
// init datas
//a.value = 'a';//editAreas[t.id]["textarea"].value;
if(s["debug"])
{
t.debug=parent.document.getElementById("edit_area_debug_"+t.id);
}
// init size
//this.update_size();
if(_$("redo") != null)
t.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
// insert css rules for highlight mode
if(typeof(parent.editAreaLoader.syntax[s["syntax"]])!="undefined"){
for(var i in parent.editAreaLoader.syntax){
if (typeof(parent.editAreaLoader.syntax[i]["styles"]) != "undefined"){
t.add_style(parent.editAreaLoader.syntax[i]["styles"]);
}
}
}
// init key events
if(t.isOpera)
_$("editor").onkeypress = keyDown;
else
_$("editor").onkeydown = keyDown;
for(var i=0; i<t.inlinePopup.length; i++){
if(t.isOpera)
_$(t.inlinePopup[i]["popup_id"]).onkeypress = keyDown;
else
_$(t.inlinePopup[i]["popup_id"]).onkeydown = keyDown;
}
if(s["allow_resize"]=="both" || s["allow_resize"]=="x" || s["allow_resize"]=="y")
t.allow_resize(true);
parent.editAreaLoader.toggle(t.id, "on");
//a.focus();
// line selection init
t.change_smooth_selection_mode(editArea.smooth_selection);
// highlight
t.execCommand("change_highlight", s["start_highlight"]);
// get font size datas
t.set_font(editArea.settings["font_family"], editArea.settings["font_size"]);
// set unselectable text
children= parent.getChildren(document.body, "", "selec", "none", "all", -1);
for(var i=0; i<children.length; i++){
if(t.isIE)
children[i].unselectable = true; // IE
else
children[i].onmousedown= function(){return false};
/* children[i].style.MozUserSelect = "none"; // Moz
children[i].style.KhtmlUserSelect = "none"; // Konqueror/Safari*/
}
a.spellcheck= s["gecko_spellcheck"];
/** Browser specific style fixes **/
// fix rendering bug for highlighted lines beginning with no tabs
if( t.isFirefox >= '3' ) {
t.content_highlight.style.paddingLeft= "1px";
t.selection_field.style.paddingLeft= "1px";
t.selection_field_text.style.paddingLeft= "1px";
}
if(t.isIE && t.isIE < 8 ){
a.style.marginTop= "-1px";
}
/*
if(t.isOpera){
t.editor_area.style.position= "absolute";
}*/
if( t.isSafari ){
t.editor_area.style.position = "absolute";
a.style.marginLeft ="-3px";
if( t.isSafari < 3.2 ) // Safari 3.0 (3.1?)
a.style.marginTop ="1px";
}
// si le textarea n'est pas grand, un click sous le textarea doit provoquer un focus sur le textarea
parent.editAreaLoader.add_event(t.result, "click", function(e){ if((e.target || e.srcElement)==editArea.result) { editArea.area_select(editArea.textarea.value.length, 0);} });
if(s['is_multi_files']!=false)
t.open_file({'id': t.curr_file, 'text': ''});
t.set_word_wrap( s['word_wrap'] );
setTimeout("editArea.focus();editArea.manage_size();editArea.execCommand('EA_load');", 10);
//start checkup routine
t.check_undo();
t.check_line_selection(true);
t.scroll_to_view();
for(var i in t.plugins){
if(typeof(t.plugins[i].onload)=="function")
t.plugins[i].onload();
}
if(s['fullscreen']==true)
t.toggle_full_screen(true);
parent.editAreaLoader.add_event(window, "resize", editArea.update_size);
parent.editAreaLoader.add_event(parent.window, "resize", editArea.update_size);
parent.editAreaLoader.add_event(top.window, "resize", editArea.update_size);
parent.editAreaLoader.add_event(window, "unload", function(){
// in case where editAreaLoader have been already cleaned
if( parent.editAreaLoader )
{
parent.editAreaLoader.remove_event(parent.window, "resize", editArea.update_size);
parent.editAreaLoader.remove_event(top.window, "resize", editArea.update_size);
}
if(editAreas[editArea.id] && editAreas[editArea.id]["displayed"]){
editArea.execCommand("EA_unload");
}
});
/*date= new Date();
alert(date.getTime()- parent.editAreaLoader.start_time);*/
};
//called by the toggle_on
EditArea.prototype.update_size= function(){
var d=document,pd=parent.document,height,width,popup,maxLeft,maxTop;
if( typeof editAreas != 'undefined' && editAreas[editArea.id] && editAreas[editArea.id]["displayed"]==true){
if(editArea.fullscreen['isFull']){
pd.getElementById("frame_"+editArea.id).style.width = pd.getElementsByTagName("html")[0].clientWidth + "px";
pd.getElementById("frame_"+editArea.id).style.height = pd.getElementsByTagName("html")[0].clientHeight + "px";
}
if(editArea.tab_browsing_area.style.display=='block' && ( !editArea.isIE || editArea.isIE >= 8 ) )
{
editArea.tab_browsing_area.style.height = "0px";
editArea.tab_browsing_area.style.height = (editArea.result.offsetTop - editArea.tab_browsing_area.offsetTop -1)+"px";
}
height = d.body.offsetHeight - editArea.get_all_toolbar_height() - 4;
editArea.result.style.height = height +"px";
width = d.body.offsetWidth -2;
editArea.result.style.width = width+"px";
//alert("result h: "+ height+" w: "+width+"\ntoolbar h: "+this.get_all_toolbar_height()+"\nbody_h: "+document.body.offsetHeight);
// check that the popups don't get out of the screen
for( i=0; i < editArea.inlinePopup.length; i++ )
{
popup = _$(editArea.inlinePopup[i]["popup_id"]);
maxLeft = d.body.offsetWidth - popup.offsetWidth;
maxTop = d.body.offsetHeight - popup.offsetHeight;
if( popup.offsetTop > maxTop )
popup.style.top = maxTop+"px";
if( popup.offsetLeft > maxLeft )
popup.style.left = maxLeft+"px";
}
editArea.manage_size( true );
editArea.fixLinesHeight( editArea.textarea.value, 0,-1);
}
};
EditArea.prototype.manage_size= function(onlyOneTime){
if(!editAreas[this.id])
return false;
if(editAreas[this.id]["displayed"]==true && this.textareaFocused)
{
var area_height,resized= false;
//1) Manage display width
//1.1) Calc the new width to use for display
if( !this.settings['word_wrap'] )
{
var area_width= this.textarea.scrollWidth;
area_height= this.textarea.scrollHeight;
// bug on old opera versions
if(this.isOpera && this.isOpera < 9.6 ){
area_width=10000;
}
//1.2) the width is not the same, we must resize elements
if(this.textarea.previous_scrollWidth!=area_width)
{
this.container.style.width= area_width+"px";
this.textarea.style.width= area_width+"px";
this.content_highlight.style.width= area_width+"px";
this.textarea.previous_scrollWidth=area_width;
resized=true;
}
}
// manage wrap width
if( this.settings['word_wrap'] )
{
newW=this.textarea.offsetWidth;
if( this.isFirefox || this.isIE )
newW-=2;
if( this.isSafari )
newW-=6;
this.content_highlight.style.width=this.selection_field_text.style.width=this.selection_field.style.width=this.test_font_size.style.width=newW+"px";
}
//2) Manage display height
//2.1) Calc the new height to use for display
if( this.isOpera || this.isFirefox || this.isSafari ) {
area_height= this.getLinePosTop( this.last_selection["nb_line"] + 1 );
} else {
area_height = this.textarea.scrollHeight;
}
//2.2) the width is not the same, we must resize elements
if(this.textarea.previous_scrollHeight!=area_height)
{
this.container.style.height= (area_height+2)+"px";
this.textarea.style.height= area_height+"px";
this.content_highlight.style.height= area_height+"px";
this.textarea.previous_scrollHeight= area_height;
resized=true;
}
//3) if there is new lines, we add new line numbers in the line numeration area
if(this.last_selection["nb_line"] >= this.line_number)
{
var newLines= '', destDiv=_$("line_number"), start=this.line_number, end=this.last_selection["nb_line"]+100;
for( i = start+1; i < end; i++ )
{
newLines+='<div id="line_'+ i +'">'+i+"</div>";
this.line_number++;
}
destDiv.innerHTML= destDiv.innerHTML + newLines;
this.fixLinesHeight( this.textarea.value, start, -1 );
}
//4) be sure the text is well displayed
this.textarea.scrollTop="0px";
this.textarea.scrollLeft="0px";
if(resized==true){
this.scroll_to_view();
}
}
if(!onlyOneTime)
setTimeout("editArea.manage_size();", 100);
};
EditArea.prototype.execCommand= function(cmd, param){
for(var i in this.plugins){
if(typeof(this.plugins[i].execCommand)=="function"){
if(!this.plugins[i].execCommand(cmd, param))
return;
}
}
switch(cmd){
case "save":
if(this.settings["save_callback"].length>0)
eval("parent."+this.settings["save_callback"]+"('"+ this.id +"', editArea.textarea.value);");
break;
case "load":
if(this.settings["load_callback"].length>0)
eval("parent."+this.settings["load_callback"]+"('"+ this.id +"');");
break;
case "onchange":
if(this.settings["change_callback"].length>0)
eval("parent."+this.settings["change_callback"]+"('"+ this.id +"');");
break;
case "EA_load":
if(this.settings["EA_load_callback"].length>0)
eval("parent."+this.settings["EA_load_callback"]+"('"+ this.id +"');");
break;
case "EA_unload":
if(this.settings["EA_unload_callback"].length>0)
eval("parent."+this.settings["EA_unload_callback"]+"('"+ this.id +"');");
break;
case "toggle_on":
if(this.settings["EA_toggle_on_callback"].length>0)
eval("parent."+this.settings["EA_toggle_on_callback"]+"('"+ this.id +"');");
break;
case "toggle_off":
if(this.settings["EA_toggle_off_callback"].length>0)
eval("parent."+this.settings["EA_toggle_off_callback"]+"('"+ this.id +"');");
break;
case "re_sync":
if(!this.do_highlight)
break;
case "file_switch_on":
if(this.settings["EA_file_switch_on_callback"].length>0)
eval("parent."+this.settings["EA_file_switch_on_callback"]+"(param);");
break;
case "file_switch_off":
if(this.settings["EA_file_switch_off_callback"].length>0)
eval("parent."+this.settings["EA_file_switch_off_callback"]+"(param);");
break;
case "file_close":
if(this.settings["EA_file_close_callback"].length>0)
return eval("parent."+this.settings["EA_file_close_callback"]+"(param);");
break;
default:
if(typeof(eval("editArea."+cmd))=="function")
{
if(this.settings["debug"])
eval("editArea."+ cmd +"(param);");
else
try{eval("editArea."+ cmd +"(param);");}catch(e){};
}
}
};
EditArea.prototype.get_translation= function(word, mode){
if(mode=="template")
return parent.editAreaLoader.translate(word, this.settings["language"], mode);
else
return parent.editAreaLoader.get_word_translation(word, this.settings["language"]);
};
EditArea.prototype.add_plugin= function(plug_name, plug_obj){
for(var i=0; i<this.settings["plugins"].length; i++){
if(this.settings["plugins"][i]==plug_name){
this.plugins[plug_name]=plug_obj;
plug_obj.baseURL=parent.editAreaLoader.baseURL + "plugins/" + plug_name + "/";
if( typeof(plug_obj.init)=="function" )
plug_obj.init();
}
}
};
EditArea.prototype.load_css= function(url){
try{
link = document.createElement("link");
link.type = "text/css";
link.rel= "stylesheet";
link.media="all";
link.href = url;
head = document.getElementsByTagName("head");
head[0].appendChild(link);
}catch(e){
document.write("<link href='"+ url +"' rel='stylesheet' type='text/css' />");
}
};
EditArea.prototype.load_script= function(url){
try{
script = document.createElement("script");
script.type = "text/javascript";
script.src = url;
script.charset= "UTF-8";
head = document.getElementsByTagName("head");
head[0].appendChild(script);
}catch(e){
document.write("<script type='text/javascript' src='" + url + "' charset=\"UTF-8\"><"+"/script>");
}
};
// add plugin translation to language translation array
EditArea.prototype.add_lang= function(language, values){
if(!parent.editAreaLoader.lang[language])
parent.editAreaLoader.lang[language]={};
for(var i in values)
parent.editAreaLoader.lang[language][i]= values[i];
};
// short cut for document.getElementById()
function _$(id){return document.getElementById( id );};
var editArea = new EditArea();
parent.editAreaLoader.add_event(window, "load", init);
function init(){
setTimeout("editArea.init(); ", 10);
};

View file

@ -1,408 +0,0 @@
<?php
/******
*
* EditArea PHP compressor
* Developped by Christophe Dolivet
* Released under LGPL, Apache and BSD licenses
* v1.1.3 (2007/01/18)
*
******/
// CONFIG
$param['cache_duration']= 3600 * 24 * 10; // 10 days util client cache expires
$param['compress'] = true; // enable the code compression, should be activated but it can be usefull to desactivate it for easier error retrieving (true or false)
$param['debug'] = false; // Enable this option if you need debuging info
$param['use_disk_cache']= true; // If you enable this option gzip files will be cached on disk.
$param['use_gzip']= true; // Enable gzip compression
// END CONFIG
$compressor= new Compressor($param);
class Compressor{
function compressor($param)
{
$this->__construct($param);
}
function __construct($param)
{
$this->start_time= $this->get_microtime();
$this->file_loaded_size=0;
$this->param= $param;
$this->script_list="";
$this->path= dirname(__FILE__)."/";
if(isset($_GET['plugins'])){
$this->load_all_plugins= true;
$this->full_cache_file= $this->path."edit_area_full_with_plugins.js";
$this->gzip_cache_file= $this->path."edit_area_full_with_plugins.gz";
}else{
$this->load_all_plugins= false;
$this->full_cache_file= $this->path."edit_area_full.js";
$this->gzip_cache_file= $this->path."edit_area_full.gz";
}
$this->check_gzip_use();
$this->send_headers();
$this->check_cache();
$this->load_files();
$this->send_datas();
}
function send_headers()
{
header("Content-type: text/javascript; charset: UTF-8");
header("Vary: Accept-Encoding"); // Handle proxies
header(sprintf("Expires: %s GMT", gmdate("D, d M Y H:i:s", time() + $this->param['cache_duration'])) );
if($this->use_gzip)
header("Content-Encoding: ".$this->gzip_enc_header);
}
function check_gzip_use()
{
$encodings = array();
$desactivate_gzip=false;
if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
$encodings = explode(',', strtolower(preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING'])));
// desactivate gzip for IE version < 7
if(preg_match("/(?:msie )([0-9.]+)/i", $_SERVER['HTTP_USER_AGENT'], $ie))
{
if($ie[1]<7)
$desactivate_gzip=true;
}
// Check for gzip header or northon internet securities
if (!$desactivate_gzip && $this->param['use_gzip'] && (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {
$this->gzip_enc_header= in_array('x-gzip', $encodings) ? "x-gzip" : "gzip";
$this->use_gzip=true;
$this->cache_file=$this->gzip_cache_file;
}else{
$this->use_gzip=false;
$this->cache_file=$this->full_cache_file;
}
}
function check_cache()
{
// Only gzip the contents if clients and server support it
if (file_exists($this->cache_file)) {
// check if cache file must be updated
$cache_date=0;
if ($dir = opendir($this->path)) {
while (($file = readdir($dir)) !== false) {
if(is_file($this->path.$file) && $file!="." && $file!="..")
$cache_date= max($cache_date, filemtime($this->path.$file));
}
closedir($dir);
}
if($this->load_all_plugins){
$plug_path= $this->path."plugins/";
if (($dir = @opendir($plug_path)) !== false)
{
while (($file = readdir($dir)) !== false)
{
if ($file !== "." && $file !== "..")
{
if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))
$cache_date= max($cache_date, filemtime("plugins/".$file."/".$file.".js"));
}
}
closedir($dir);
}
}
if(filemtime($this->cache_file) >= $cache_date){
// if cache file is up to date
$last_modified = gmdate("D, d M Y H:i:s",filemtime($this->cache_file))." GMT";
if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) && strcasecmp($_SERVER["HTTP_IF_MODIFIED_SINCE"], $last_modified) === 0)
{
header("HTTP/1.1 304 Not Modified");
header("Last-modified: ".$last_modified);
header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache
header("Pragma:"); // Tells HTTP 1.0 clients to cache
}
else
{
header("Last-modified: ".$last_modified);
header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache
header("Pragma:"); // Tells HTTP 1.0 clients to cache
header('Content-Length: '.filesize($this->cache_file));
echo file_get_contents($this->cache_file);
}
die;
}
}
return false;
}
function load_files()
{
$loader= $this->get_content("edit_area_loader.js")."\n";
// get the list of other files to load
$loader= preg_replace("/(t\.scripts_to_load=\s*)\[([^\]]*)\];/e"
, "\$this->replace_scripts('script_list', '\\1', '\\2')"
, $loader);
$loader= preg_replace("/(t\.sub_scripts_to_load=\s*)\[([^\]]*)\];/e"
, "\$this->replace_scripts('sub_script_list', '\\1', '\\2')"
, $loader);
$this->datas= $loader;
$this->compress_javascript($this->datas);
// load other scripts needed for the loader
preg_match_all('/"([^"]*)"/', $this->script_list, $match);
foreach($match[1] as $key => $value)
{
$content= $this->get_content(preg_replace("/\\|\//i", "", $value).".js");
$this->compress_javascript($content);
$this->datas.= $content."\n";
}
//$this->datas);
//$this->datas= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $this->datas);
// improved compression step 1/2
$this->datas= preg_replace(array("/(\b)EditAreaLoader(\b)/", "/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/"), array("EAL", "eAL", "eAs"), $this->datas);
//$this->datas= str_replace(array("EditAreaLoader", "editAreaLoader", "editAreas"), array("EAL", "eAL", "eAs"), $this->datas);
$this->datas.= "var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;";
// load sub scripts
$sub_scripts="";
$sub_scripts_list= array();
preg_match_all('/"([^"]*)"/', $this->sub_script_list, $match);
foreach($match[1] as $value){
$sub_scripts_list[]= preg_replace("/\\|\//i", "", $value).".js";
}
if($this->load_all_plugins){
// load plugins scripts
$plug_path= $this->path."plugins/";
if (($dir = @opendir($plug_path)) !== false)
{
while (($file = readdir($dir)) !== false)
{
if ($file !== "." && $file !== "..")
{
if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js"))
$sub_scripts_list[]= "plugins/".$file."/".$file.".js";
}
}
closedir($dir);
}
}
foreach($sub_scripts_list as $value){
$sub_scripts.= $this->get_javascript_content($value);
}
// improved compression step 2/2
$sub_scripts= preg_replace(array("/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/", "/(\b)editArea(\b)/", "/(\b)EditArea(\b)/"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);
// $sub_scripts= str_replace(array("editAreaLoader", "editAreas", "editArea", "EditArea"), array("eAL", "eAs", "eA", "EA"), $sub_scripts);
$sub_scripts.= "var editArea= eA;EditArea=EA;";
// add the scripts
// $this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\";\n", $sub_scripts);
// add the script and use a last compression
if( $this->param['compress'] )
{
$last_comp = array( 'Á' => 'this',
'Â' => 'textarea',
'Ã' => 'function',
'Ä' => 'prototype',
'Å' => 'settings',
'Æ' => 'length',
'Ç' => 'style',
'È' => 'parent',
'É' => 'last_selection',
'Ê' => 'value',
'Ë' => 'true',
'Ì' => 'false'
/*,
'Î' => '"',
'Ï' => "\n",
'À' => "\r"*/);
}
else
{
$last_comp = array();
}
$js_replace= '';
foreach( $last_comp as $key => $val )
$js_replace .= ".replace(/". $key ."/g,'". str_replace( array("\n", "\r"), array('\n','\r'), $val ) ."')";
$this->datas.= sprintf("editAreaLoader.iframe_script= \"<script type='text/javascript'>%s</script>\"%s;\n",
str_replace( array_values($last_comp), array_keys($last_comp), $sub_scripts ),
$js_replace);
if($this->load_all_plugins)
$this->datas.="editAreaLoader.all_plugins_loaded=true;\n";
// load the template
$this->datas.= sprintf("editAreaLoader.template= \"%s\";\n", $this->get_html_content("template.html"));
// load the css
$this->datas.= sprintf("editAreaLoader.iframe_css= \"<style>%s</style>\";\n", $this->get_css_content("edit_area.css"));
// $this->datas= "function editArea(){};editArea.prototype.loader= function(){alert('bouhbouh');} var a= new editArea();a.loader();";
}
function send_datas()
{
if($this->param['debug']){
$header=sprintf("/* USE PHP COMPRESSION\n");
$header.=sprintf("javascript size: based files: %s => PHP COMPRESSION => %s ", $this->file_loaded_size, strlen($this->datas));
if($this->use_gzip){
$gzip_datas= gzencode($this->datas, 9, FORCE_GZIP);
$header.=sprintf("=> GZIP COMPRESSION => %s", strlen($gzip_datas));
$ratio = round(100 - strlen($gzip_datas) / $this->file_loaded_size * 100.0);
}else{
$ratio = round(100 - strlen($this->datas) / $this->file_loaded_size * 100.0);
}
$header.=sprintf(", reduced by %s%%\n", $ratio);
$header.=sprintf("compression time: %s\n", $this->get_microtime()-$this->start_time);
$header.=sprintf("%s\n", implode("\n", $this->infos));
$header.=sprintf("*/\n");
$this->datas= $header.$this->datas;
}
$mtime= time(); // ensure that the 2 disk files will have the same update time
// generate gzip file and cahce it if using disk cache
if($this->use_gzip){
$this->gzip_datas= gzencode($this->datas, 9, FORCE_GZIP);
if($this->param['use_disk_cache'])
$this->file_put_contents($this->gzip_cache_file, $this->gzip_datas, $mtime);
}
// generate full js file and cache it if using disk cache
if($this->param['use_disk_cache'])
$this->file_put_contents($this->full_cache_file, $this->datas, $mtime);
// generate output
if($this->use_gzip)
echo $this->gzip_datas;
else
echo $this->datas;
// die;
}
function get_content($end_uri)
{
$end_uri=preg_replace("/\.\./", "", $end_uri); // Remove any .. (security)
$file= $this->path.$end_uri;
if(file_exists($file)){
$this->infos[]=sprintf("'%s' loaded", $end_uri);
/*$fd = fopen($file, 'rb');
$content = fread($fd, filesize($file));
fclose($fd);
return $content;*/
return $this->file_get_contents($file);
}else{
$this->infos[]=sprintf("'%s' not loaded", $end_uri);
return "";
}
}
function get_javascript_content($end_uri)
{
$val=$this->get_content($end_uri);
$this->compress_javascript($val);
$this->prepare_string_for_quotes($val);
return $val;
}
function compress_javascript(&$code)
{
if($this->param['compress'])
{
// remove all comments
// (\"(?:[^\"\\]*(?:\\\\)*(?:\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\]*(?:\\\\)*(?:\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))
$code= preg_replace("/(\"(?:[^\"\\\\]*(?:\\\\\\\\)*(?:\\\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\\\]*(?:\\\\\\\\)*(?:\\\\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);
// remove line return, empty line and tabulation
$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);
// add line break before "else" otherwise navigators can't manage to parse the file
$code= preg_replace('/(\b(else)\b)/', "\n$1", $code);
// remove unnecessary spaces
$code= preg_replace('/( |\t|\r)*(;|\{|\}|=|==|\-|\+|,|\(|\)|\|\||&\&|\:)( |\t|\r)*/', "$2", $code);
}
}
function get_css_content($end_uri){
$code=$this->get_content($end_uri);
// remove comments
$code= preg_replace("/(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "", $code);
// remove spaces
$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $code);
// remove spaces
$code= preg_replace('/( |\t|\r)?(\:|,|\{|\})( |\t|\r)+/', "$2", $code);
$this->prepare_string_for_quotes($code);
return $code;
}
function get_html_content($end_uri){
$code=$this->get_content($end_uri);
//$code= preg_replace('/(\"(?:\\\"|[^\"])*(?:\"|$))|' . "(\'(?:\\\'|[^\'])*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code);
$code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code);
$this->prepare_string_for_quotes($code);
return $code;
}
function prepare_string_for_quotes(&$str){
// prepare the code to be putted into quotes
/*$pattern= array("/(\\\\)?\"/", '/\\\n/' , '/\\\r/' , "/(\r?\n)/");
$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\\\n"$1+"');*/
$pattern= array("/(\\\\)?\"/", '/\\\n/' , '/\\\r/' , "/(\r?\n)/");
if($this->param['compress'])
$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\n');
else
$replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , "\\n\"\n+\"");
$str= preg_replace($pattern, $replace, $str);
}
function replace_scripts($var, $param1, $param2)
{
$this->$var=stripslashes($param2);
return $param1."[];";
}
/* for php version that have not thoses functions */
function file_get_contents($file)
{
$fd = fopen($file, 'rb');
$content = fread($fd, filesize($file));
fclose($fd);
$this->file_loaded_size+= strlen($content);
return $content;
}
function file_put_contents($file, &$content, $mtime=-1)
{
if($mtime==-1)
$mtime=time();
$fp = @fopen($file, "wb");
if ($fp) {
fwrite($fp, $content);
fclose($fp);
touch($file, $mtime);
return true;
}
return false;
}
function get_microtime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
}
?>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,333 +0,0 @@
/****
* This page contains some general usefull functions for javascript
*
****/
// need to redefine this functiondue to IE problem
function getAttribute( elm, aName ) {
var aValue,taName,i;
try{
aValue = elm.getAttribute( aName );
}catch(exept){}
if( ! aValue ){
for( i = 0; i < elm.attributes.length; i ++ ) {
taName = elm.attributes[i] .name.toLowerCase();
if( taName == aName ) {
aValue = elm.attributes[i] .value;
return aValue;
}
}
}
return aValue;
};
// need to redefine this function due to IE problem
function setAttribute( elm, attr, val ) {
if(attr=="class"){
elm.setAttribute("className", val);
elm.setAttribute("class", val);
}else{
elm.setAttribute(attr, val);
}
};
/* return a child element
elem: element we are searching in
elem_type: type of the eleemnt we are searching (DIV, A, etc...)
elem_attribute: attribute of the searched element that must match
elem_attribute_match: value that elem_attribute must match
option: "all" if must return an array of all children, otherwise return the first match element
depth: depth of search (-1 or no set => unlimited)
*/
function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth)
{
if(!option)
var option="single";
if(!depth)
var depth=-1;
if(elem){
var children= elem.childNodes;
var result=null;
var results= [];
for (var x=0;x<children.length;x++) {
strTagName = new String(children[x].tagName);
children_class="?";
if(strTagName!= "undefined"){
child_attribute= getAttribute(children[x],elem_attribute);
if((strTagName.toLowerCase()==elem_type.toLowerCase() || elem_type=="") && (elem_attribute=="" || child_attribute==elem_attribute_match)){
if(option=="all"){
results.push(children[x]);
}else{
return children[x];
}
}
if(depth!=0){
result=getChildren(children[x], elem_type, elem_attribute, elem_attribute_match, option, depth-1);
if(option=="all"){
if(result.length>0){
results= results.concat(result);
}
}else if(result!=null){
return result;
}
}
}
}
if(option=="all")
return results;
}
return null;
};
function isChildOf(elem, parent){
if(elem){
if(elem==parent)
return true;
while(elem.parentNode != 'undefined'){
return isChildOf(elem.parentNode, parent);
}
}
return false;
};
function getMouseX(e){
if(e!=null && typeof(e.pageX)!="undefined"){
return e.pageX;
}else{
return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;
}
};
function getMouseY(e){
if(e!=null && typeof(e.pageY)!="undefined"){
return e.pageY;
}else{
return (e!=null?e.y:event.y)+ document.documentElement.scrollTop;
}
};
function calculeOffsetLeft(r){
return calculeOffset(r,"offsetLeft")
};
function calculeOffsetTop(r){
return calculeOffset(r,"offsetTop")
};
function calculeOffset(element,attr){
var offset=0;
while(element){
offset+=element[attr];
element=element.offsetParent
}
return offset;
};
/** return the computed style
* @param: elem: the reference to the element
* @param: prop: the name of the css property
*/
function get_css_property(elem, prop)
{
if(document.defaultView)
{
return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);
}
else if(elem.currentStyle)
{
var prop = prop.replace(/-\D/gi, function(sMatch)
{
return sMatch.charAt(sMatch.length - 1).toUpperCase();
});
return elem.currentStyle[prop];
}
else return null;
}
/****
* Moving an element
***/
var _mCE; // currently moving element
/* allow to move an element in a window
e: the event
id: the id of the element
frame: the frame of the element
ex of use:
in html: <img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,"area_search_replace", parent.frames["this_frame_id"]);' .../>
or
in javascript: document.getElementById("my_div").onmousedown= start_move_element
*/
function start_move_element(e, id, frame){
var elem_id=(e.target || e.srcElement).id;
if(id)
elem_id=id;
if(!frame)
frame=window;
if(frame.event)
e=frame.event;
_mCE= frame.document.getElementById(elem_id);
_mCE.frame=frame;
frame.document.onmousemove= move_element;
frame.document.onmouseup= end_move_element;
/*_mCE.onmousemove= move_element;
_mCE.onmouseup= end_move_element;*/
//alert(_mCE.frame.document.body.offsetHeight);
mouse_x= getMouseX(e);
mouse_y= getMouseY(e);
//window.status=frame+ " elem: "+elem_id+" elem: "+ _mCE + " mouse_x: "+mouse_x;
_mCE.start_pos_x = mouse_x - (_mCE.style.left.replace("px","") || calculeOffsetLeft(_mCE));
_mCE.start_pos_y = mouse_y - (_mCE.style.top.replace("px","") || calculeOffsetTop(_mCE));
return false;
};
function end_move_element(e){
_mCE.frame.document.onmousemove= "";
_mCE.frame.document.onmouseup= "";
_mCE=null;
};
function move_element(e){
var newTop,newLeft,maxLeft;
if( _mCE.frame && _mCE.frame.event )
e=_mCE.frame.event;
newTop = getMouseY(e) - _mCE.start_pos_y;
newLeft = getMouseX(e) - _mCE.start_pos_x;
maxLeft = _mCE.frame.document.body.offsetWidth- _mCE.offsetWidth;
max_top = _mCE.frame.document.body.offsetHeight- _mCE.offsetHeight;
newTop = Math.min(Math.max(0, newTop), max_top);
newLeft = Math.min(Math.max(0, newLeft), maxLeft);
_mCE.style.top = newTop+"px";
_mCE.style.left = newLeft+"px";
return false;
};
/***
* Managing a textarea (this part need the navigator infos from editAreaLoader
***/
var nav= editAreaLoader.nav;
// allow to get infos on the selection: array(start, end)
function getSelectionRange(textarea){
return {"start": textarea.selectionStart, "end": textarea.selectionEnd};
};
// allow to set the selection
function setSelectionRange(t, start, end){
t.focus();
start = Math.max(0, Math.min(t.value.length, start));
end = Math.max(start, Math.min(t.value.length, end));
if( this.isOpera && this.isOpera < 9.6 ){ // Opera bug when moving selection start and selection end
t.selectionEnd = 1;
t.selectionStart = 0;
t.selectionEnd = 1;
t.selectionStart = 0;
}
t.selectionStart = start;
t.selectionEnd = end;
//textarea.setSelectionRange(start, end);
if(isIE)
set_IE_selection(t);
};
// set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd). should work as a repeated task
function get_IE_selection(t){
var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;
if(t && t.focused)
{
if(!t.ea_line_height)
{ // calculate the lineHeight
div= d.createElement("div");
div.style.fontFamily= get_css_property(t, "font-family");
div.style.fontSize= get_css_property(t, "font-size");
div.style.visibility= "hidden";
div.innerHTML="0";
d.body.appendChild(div);
t.ea_line_height= div.offsetHeight;
d.body.removeChild(div);
}
//t.focus();
range = d.selection.createRange();
try
{
stored_range = range.duplicate();
stored_range.moveToElementText( t );
stored_range.setEndPoint( 'EndToEnd', range );
if(stored_range.parentElement() == t){
// the range don't take care of empty lines in the end of the selection
elem = t;
scrollTop = 0;
while(elem.parentNode){
scrollTop+= elem.scrollTop;
elem = elem.parentNode;
}
// var scrollTop= t.scrollTop + document.body.scrollTop;
// var relative_top= range.offsetTop - calculeOffsetTop(t) + scrollTop;
relative_top= range.offsetTop - calculeOffsetTop(t)+ scrollTop;
// alert("rangeoffset: "+ range.offsetTop +"\ncalcoffsetTop: "+ calculeOffsetTop(t) +"\nrelativeTop: "+ relative_top);
line_start = Math.round((relative_top / t.ea_line_height) +1);
line_nb = Math.round(range.boundingHeight / t.ea_line_height);
range_start = stored_range.text.length - range.text.length;
tab = t.value.substr(0, range_start).split("\n");
range_start += (line_start - tab.length)*2; // add missing empty lines to the selection
t.selectionStart = range_start;
range_end = t.selectionStart + range.text.length;
tab = t.value.substr(0, range_start + range.text.length).split("\n");
range_end += (line_start + line_nb - 1 - tab.length)*2;
t.selectionEnd = range_end;
}
}
catch(e){}
}
setTimeout("get_IE_selection(document.getElementById('"+ t.id +"'));", 50);
};
function IE_textarea_focus(){
event.srcElement.focused= true;
}
function IE_textarea_blur(){
event.srcElement.focused= false;
}
// select the text for IE (take into account the \r difference)
function set_IE_selection( t ){
var nbLineStart,nbLineStart,nbLineEnd,range;
if(!window.closed){
nbLineStart=t.value.substr(0, t.selectionStart).split("\n").length - 1;
nbLineEnd=t.value.substr(0, t.selectionEnd).split("\n").length - 1;
try
{
range = document.selection.createRange();
range.moveToElementText( t );
range.setEndPoint( 'EndToStart', range );
range.moveStart('character', t.selectionStart - nbLineStart);
range.moveEnd('character', t.selectionEnd - nbLineEnd - (t.selectionStart - nbLineStart) );
range.select();
}
catch(e){}
}
};
editAreaLoader.waiting_loading["elements_functions.js"]= "loaded";

View file

@ -1,391 +0,0 @@
// change_to: "on" or "off"
EditArea.prototype.change_highlight= function(change_to){
if(this.settings["syntax"].length==0 && change_to==false){
this.switchClassSticky(_$("highlight"), 'editAreaButtonDisabled', true);
this.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);
return false;
}
if(this.do_highlight==change_to)
return false;
this.getIESelection();
var pos_start= this.textarea.selectionStart;
var pos_end= this.textarea.selectionEnd;
if(this.do_highlight===true || change_to==false)
this.disable_highlight();
else
this.enable_highlight();
this.textarea.focus();
this.textarea.selectionStart = pos_start;
this.textarea.selectionEnd = pos_end;
this.setIESelection();
};
EditArea.prototype.disable_highlight= function(displayOnly){
var t= this, a=t.textarea, new_Obj, old_class, new_class;
t.selection_field.innerHTML="";
t.selection_field_text.innerHTML="";
t.content_highlight.style.visibility="hidden";
// replacing the node is far more faster than deleting it's content in firefox
new_Obj= t.content_highlight.cloneNode(false);
new_Obj.innerHTML= "";
t.content_highlight.parentNode.insertBefore(new_Obj, t.content_highlight);
t.content_highlight.parentNode.removeChild(t.content_highlight);
t.content_highlight= new_Obj;
old_class= parent.getAttribute( a,"class" );
if(old_class){
new_class= old_class.replace( "hidden","" );
parent.setAttribute( a, "class", new_class );
}
a.style.backgroundColor="transparent"; // needed in order to see the bracket finders
//var icon= document.getElementById("highlight");
//setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );
//t.restoreClass(icon);
//t.switchClass(icon,'editAreaButtonNormal');
t.switchClassSticky(_$("highlight"), 'editAreaButtonNormal', true);
t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonDisabled', true);
t.do_highlight=false;
t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonSelected', true);
if(typeof(t.smooth_selection_before_highlight)!="undefined" && t.smooth_selection_before_highlight===false){
t.change_smooth_selection_mode(false);
}
// this.textarea.style.backgroundColor="#FFFFFF";
};
EditArea.prototype.enable_highlight= function(){
var t=this, a=t.textarea, new_class;
t.show_waiting_screen();
t.content_highlight.style.visibility="visible";
new_class =parent.getAttribute(a,"class")+" hidden";
parent.setAttribute( a, "class", new_class );
// IE can't manage mouse click outside text range without this
if( t.isIE )
a.style.backgroundColor="#FFFFFF";
t.switchClassSticky(_$("highlight"), 'editAreaButtonSelected', false);
t.switchClassSticky(_$("reset_highlight"), 'editAreaButtonNormal', false);
t.smooth_selection_before_highlight=t.smooth_selection;
if(!t.smooth_selection)
t.change_smooth_selection_mode(true);
t.switchClassSticky(_$("change_smooth_selection"), 'editAreaButtonDisabled', true);
t.do_highlight=true;
t.resync_highlight();
t.hide_waiting_screen();
};
/**
* Ask to update highlighted text
* @param Array infos - Array of datas returned by EditArea.get_selection_infos()
*/
EditArea.prototype.maj_highlight= function(infos){
// for speed mesure
var debug_opti="",tps_start= new Date().getTime(), tps_middle_opti=new Date().getTime();
var t=this, hightlighted_text, updated_highlight;
var textToHighlight=infos["full_text"], doSyntaxOpti = false, doHtmlOpti = false, stay_begin="", stay_end="", trace_new , trace_last;
if(t.last_text_to_highlight==infos["full_text"] && t.resync_highlight!==true)
return;
// OPTIMISATION: will search to update only changed lines
if(t.reload_highlight===true){
t.reload_highlight=false;
}else if(textToHighlight.length==0){
textToHighlight="\n ";
}else{
// get text change datas
changes = t.checkTextEvolution(t.last_text_to_highlight,textToHighlight);
// check if it can only reparse the changed text
trace_new = t.get_syntax_trace(changes.newTextLine).replace(/\r/g, '');
trace_last = t.get_syntax_trace(changes.lastTextLine).replace(/\r/g, '');
doSyntaxOpti = ( trace_new == trace_last );
// check if the difference comes only from a new line created
// => we have to remember that the editor can automaticaly add tabulation or space after the new line)
if( !doSyntaxOpti && trace_new == "\n"+trace_last && /^[ \t\s]*\n[ \t\s]*$/.test( changes.newText.replace(/\r/g, '') ) && changes.lastText =="" )
{
doSyntaxOpti = true;
}
// we do the syntax optimisation
if( doSyntaxOpti ){
tps_middle_opti=new Date().getTime();
stay_begin= t.last_hightlighted_text.split("\n").slice(0, changes.lineStart).join("\n");
if(changes.lineStart>0)
stay_begin+= "\n";
stay_end= t.last_hightlighted_text.split("\n").slice(changes.lineLastEnd+1).join("\n");
if(stay_end.length>0)
stay_end= "\n"+stay_end;
// Final check to see that we're not in the middle of span tags
if( stay_begin.split('<span').length != stay_begin.split('</span').length
|| stay_end.split('<span').length != stay_end.split('</span').length )
{
doSyntaxOpti = false;
stay_end = '';
stay_begin = '';
}
else
{
if(stay_begin.length==0 && changes.posLastEnd==-1)
changes.newTextLine+="\n";
textToHighlight=changes.newTextLine;
}
}
if(t.settings["debug"]){
var ch =changes;
debug_opti= ( doSyntaxOpti?"Optimisation": "No optimisation" )
+" start: "+ch.posStart +"("+ch.lineStart+")"
+" end_new: "+ ch.posNewEnd+"("+ch.lineNewEnd+")"
+" end_last: "+ ch.posLastEnd+"("+ch.lineLastEnd+")"
+"\nchanged_text: "+ch.newText+" => trace: "+trace_new
+"\nchanged_last_text: "+ch.lastText+" => trace: "+trace_last
//debug_opti+= "\nchanged: "+ infos["full_text"].substring(ch.posStart, ch.posNewEnd);
+ "\nchanged_line: "+ch.newTextLine
+ "\nlast_changed_line: "+ch.lastTextLine
+"\nstay_begin: "+ stay_begin.slice(-100)
+"\nstay_end: "+ stay_end.substr( 0, 100 );
//debug_opti="start: "+stay_begin_len+ "("+nb_line_start_unchanged+") end: "+ (stay_end_len)+ "("+(splited.length-nb_line_end_unchanged)+") ";
//debug_opti+="changed: "+ textToHighlight.substring(stay_begin_len, textToHighlight.length-stay_end_len)+" \n";
//debug_opti+="changed: "+ stay_begin.substr(stay_begin.length-200)+ "----------"+ textToHighlight+"------------------"+ stay_end.substr(0,200) +"\n";
+"\n";
}
// END OPTIMISATION
}
tps_end_opti = new Date().getTime();
// apply highlight
updated_highlight = t.colorize_text(textToHighlight);
tpsAfterReg = new Date().getTime();
/***
* see if we can optimize for updating only the required part of the HTML code
*
* The goal here will be to find the text node concerned by the modification and to update it
*/
//-------------------------------------------
//
if( doSyntaxOpti )
{
try
{
var replacedBloc, i, nbStart = '', nbEnd = '', newHtml, lengthOld, lengthNew;
replacedBloc = t.last_hightlighted_text.substring( stay_begin.length, t.last_hightlighted_text.length - stay_end.length );
lengthOld = replacedBloc.length;
lengthNew = updated_highlight.length;
// find the identical caracters at the beginning
for( i=0; i < lengthOld && i < lengthNew && replacedBloc.charAt(i) == updated_highlight.charAt(i) ; i++ )
{
}
nbStart = i;
// find the identical caracters at the end
for( i=0; i + nbStart < lengthOld && i + nbStart < lengthNew && replacedBloc.charAt(lengthOld-i-1) == updated_highlight.charAt(lengthNew-i-1) ; i++ )
{
}
nbEnd = i;
// get the changes
lastHtml = replacedBloc.substring( nbStart, lengthOld - nbEnd );
newHtml = updated_highlight.substring( nbStart, lengthNew - nbEnd );
// We can do the optimisation only if we havn't touch to span elements
if( newHtml.indexOf('<span') == -1 && newHtml.indexOf('</span') == -1
&& lastHtml.indexOf('<span') == -1 && lastHtml.indexOf('</span') == -1 )
{
var beginStr, nbOpendedSpan, nbClosedSpan, nbUnchangedChars, span, textNode;
doHtmlOpti = true;
beginStr = t.last_hightlighted_text.substr( 0, stay_begin.length + nbStart );
nbOpendedSpan = beginStr.split('<span').length - 1;
nbClosedSpan = beginStr.split('</span').length - 1;
// retrieve the previously opened span (Add 1 for the first level span?)
span = t.content_highlight.getElementsByTagName('span')[ nbOpendedSpan ];
//--------[
// get the textNode to update
// if we're inside a span, we'll take the one that is opened (can be a parent of the current span)
parentSpan = span;
maxStartOffset = maxEndOffset = 0;
// it will be in the child of the root node
if( nbOpendedSpan == nbClosedSpan )
{
while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' )
{
parentSpan = parentSpan.parentNode;
}
}
// get the last opened span
else
{
maxStartOffset = maxEndOffset = beginStr.length + 1;
// move to parent node for each closed span found after the lastest open span
nbClosed = beginStr.substr( Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ).split('</span').length - 1;
while( nbClosed > 0 )
{
nbClosed--;
parentSpan = parentSpan.parentNode;
}
// find the position of the last opended tag
while( parentSpan.parentNode != t.content_highlight && parentSpan.parentNode.tagName != 'PRE' && ( tmpMaxStartOffset = Math.max( 0, beginStr.lastIndexOf( '<span', maxStartOffset - 1 ) ) ) < ( tmpMaxEndOffset = Math.max( 0, beginStr.lastIndexOf( '</span', maxEndOffset - 1 ) ) ) )
{
maxStartOffset = tmpMaxStartOffset;
maxEndOffset = tmpMaxEndOffset;
}
}
// Note: maxEndOffset is no more used but maxStartOffset will be used
if( parentSpan.parentNode == t.content_highlight || parentSpan.parentNode.tagName == 'PRE' )
{
maxStartOffset = Math.max( 0, beginStr.indexOf( '<span' ) );
}
// find the matching text node (this will be one that will be at the end of the beginStr
if( maxStartOffset == beginStr.length )
{
nbSubSpanBefore = 0;
}
else
{
lastEndPos = Math.max( 0, beginStr.lastIndexOf( '>', maxStartOffset ) );
// count the number of sub spans
nbSubSpanBefore = beginStr.substr( lastEndPos ).split('<span').length-1;
}
// there is no sub-span before
if( nbSubSpanBefore == 0 )
{
textNode = parentSpan.firstChild;
}
// we need to find where is the text node modified
else
{
// take the last direct child (no sub-child)
lastSubSpan = parentSpan.getElementsByTagName('span')[ nbSubSpanBefore - 1 ];
while( lastSubSpan.parentNode != parentSpan )
{
lastSubSpan = lastSubSpan.parentNode;
}
// associate to next text node following the last sub span
if( lastSubSpan.nextSibling == null || lastSubSpan.nextSibling.nodeType != 3 )
{
textNode = document.createTextNode('');
lastSubSpan.parentNode.insertBefore( textNode, lastSubSpan.nextSibling );
}
else
{
textNode = lastSubSpan.nextSibling;
}
}
//--------]
//--------[
// update the textNode content
// number of caracters after the last opened of closed span
nbUnchangedChars = beginStr.length - Math.max( 0, beginStr.lastIndexOf( '>' ) + 1 );
// console.log( span, textNode, nbOpendedSpan,nbClosedSpan, span.nextSibling, textNode.length, nbUnchangedChars, lastHtml, lastHtml.length, newHtml, newHtml.length );
// alert( textNode.parentNode.className +'-'+ textNode.parentNode.tagName+"\n"+ textNode.data +"\n"+ nbUnchangedChars +"\n"+ lastHtml.length +"\n"+ newHtml +"\n"+ newHtml.length );
// IE only manage \r for cariage return in textNode and not \n or \r\n
if( t.isIE )
{
nbUnchangedChars -= ( beginStr.substr( beginStr.length - nbUnchangedChars ).split("\n").length - 1 );
//alert( textNode.data.replace(/\r/g, '_r').replace(/\n/g, '_n'));
textNode.replaceData( nbUnchangedChars, lastHtml.replace(/\n/g, '').length, newHtml.replace(/\n/g, '') );
}
else
{
textNode.replaceData( nbUnchangedChars, lastHtml.length, newHtml );
}
//--------]
}
}
// an exception shouldn't occured but if replaceData failed at least it won't break everything
catch( e )
{
// throw e;
// console.log( e );
doHtmlOpti = false;
}
}
/*** END HTML update's optimisation ***/
// end test
// console.log( (TPS6-TPS5), (TPS5-TPS4), (TPS4-TPS3), (TPS3-TPS2), (TPS2-TPS1), _CPT );
// get the new highlight content
tpsAfterOpti2 = new Date().getTime();
hightlighted_text = stay_begin + updated_highlight + stay_end;
if( !doHtmlOpti )
{
// update the content of the highlight div by first updating a clone node (as there is no display in the same time for t node it's quite faster (5*))
var new_Obj= t.content_highlight.cloneNode(false);
if( ( t.isIE && t.isIE < 8 ) || ( t.isOpera && t.isOpera < 9.6 ) )
new_Obj.innerHTML= "<pre><span class='"+ t.settings["syntax"] +"'>" + hightlighted_text + "</span></pre>";
else
new_Obj.innerHTML= "<span class='"+ t.settings["syntax"] +"'>"+ hightlighted_text +"</span>";
t.content_highlight.parentNode.replaceChild(new_Obj, t.content_highlight);
t.content_highlight= new_Obj;
}
t.last_text_to_highlight= infos["full_text"];
t.last_hightlighted_text= hightlighted_text;
tps3=new Date().getTime();
if(t.settings["debug"]){
//lineNumber=tab_text.length;
//t.debug.value+=" \nNB char: "+_$("src").value.length+" Nb line: "+ lineNumber;
t.debug.value= "Tps optimisation "+(tps_end_opti-tps_start)
+" | tps reg exp: "+ (tpsAfterReg-tps_end_opti)
+" | tps opti HTML : "+ (tpsAfterOpti2-tpsAfterReg) + ' '+ ( doHtmlOpti ? 'yes' : 'no' )
+" | tps update highlight content: "+ (tps3-tpsAfterOpti2)
+" | tpsTotal: "+ (tps3-tps_start)
+ "("+tps3+")\n"+ debug_opti;
// t.debug.value+= "highlight\n"+hightlighted_text;*/
}
};
EditArea.prototype.resync_highlight= function(reload_now){
this.reload_highlight=true;
this.last_text_to_highlight="";
this.focus();
if(reload_now)
this.check_line_selection(false);
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 951 B

View file

@ -1,145 +0,0 @@
var EA_keys = {8:"Retour arriere",9:"Tabulation",12:"Milieu (pave numerique)",13:"Entrer",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Verr Maj",27:"Esc",32:"Space",33:"Page up",34:"Page down",35:"End",36:"Begin",37:"Left",38:"Up",39:"Right",40:"Down",44:"Impr ecran",45:"Inser",46:"Suppr",91:"Menu Demarrer Windows / touche pomme Mac",92:"Menu Demarrer Windows",93:"Menu contextuel Windows",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Verr Num",145:"Arret defil"};
function keyDown(e){
if(!e){ // if IE
e=event;
}
// send the event to the plugins
for(var i in editArea.plugins){
if(typeof(editArea.plugins[i].onkeydown)=="function"){
if(editArea.plugins[i].onkeydown(e)===false){ // stop propaging
if(editArea.isIE)
e.keyCode=0;
return false;
}
}
}
var target_id=(e.target || e.srcElement).id;
var use=false;
if (EA_keys[e.keyCode])
letter=EA_keys[e.keyCode];
else
letter=String.fromCharCode(e.keyCode);
var low_letter= letter.toLowerCase();
if(letter=="Page up" && !editArea.isOpera){
editArea.execCommand("scroll_page", {"dir": "up", "shift": ShiftPressed(e)});
use=true;
}else if(letter=="Page down" && !editArea.isOpera){
editArea.execCommand("scroll_page", {"dir": "down", "shift": ShiftPressed(e)});
use=true;
}else if(editArea.is_editable==false){
// do nothing but also do nothing else (allow to navigate with page up and page down)
return true;
}else if(letter=="Tabulation" && target_id=="textarea" && !CtrlPressed(e) && !AltPressed(e)){
if(ShiftPressed(e))
editArea.execCommand("invert_tab_selection");
else
editArea.execCommand("tab_selection");
use=true;
if(editArea.isOpera || (editArea.isFirefox && editArea.isMac) ) // opera && firefox mac can't cancel tabulation events...
setTimeout("editArea.execCommand('focus');", 1);
}else if(letter=="Entrer" && target_id=="textarea"){
if(editArea.press_enter())
use=true;
}else if(letter=="Entrer" && target_id=="area_search"){
editArea.execCommand("area_search");
use=true;
}else if(letter=="Esc"){
editArea.execCommand("close_all_inline_popup", e);
use=true;
}else if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){
switch(low_letter){
case "f":
editArea.execCommand("area_search");
use=true;
break;
case "r":
editArea.execCommand("area_replace");
use=true;
break;
case "q":
editArea.execCommand("close_all_inline_popup", e);
use=true;
break;
case "h":
editArea.execCommand("change_highlight");
use=true;
break;
case "g":
setTimeout("editArea.execCommand('go_to_line');", 5); // the prompt stop the return false otherwise
use=true;
break;
case "e":
editArea.execCommand("show_help");
use=true;
break;
case "z":
use=true;
editArea.execCommand("undo");
break;
case "y":
use=true;
editArea.execCommand("redo");
break;
default:
break;
}
}
// check to disable the redo possibility if the textarea content change
if(editArea.next.length > 0){
setTimeout("editArea.check_redo();", 10);
}
setTimeout("editArea.check_file_changes();", 10);
if(use){
// in case of a control that sould'nt be used by IE but that is used => THROW a javascript error that will stop key action
if(editArea.isIE)
e.keyCode=0;
return false;
}
//alert("Test: "+ letter + " ("+e.keyCode+") ALT: "+ AltPressed(e) + " CTRL "+ CtrlPressed(e) + " SHIFT "+ ShiftPressed(e));
return true;
};
// return true if Alt key is pressed
function AltPressed(e) {
if (window.event) {
return (window.event.altKey);
} else {
if(e.modifiers)
return (e.altKey || (e.modifiers % 2));
else
return e.altKey;
}
};
// return true if Ctrl key is pressed
function CtrlPressed(e) {
if (window.event) {
return (window.event.ctrlKey);
} else {
return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5));
}
};
// return true if Shift key is pressed
function ShiftPressed(e) {
if (window.event) {
return (window.event.shiftKey);
} else {
return (e.shiftKey || (e.modifiers>3));
}
};

View file

@ -1,73 +0,0 @@
/*
* Bulgarian translation
* Author: Valentin Hristov
* Company: SOFTKIT Bulgarian
* Site: http://www.softkit-bg.com
*/
editAreaLoader.lang["bg"]={
new_document: "нов документ",
search_button: "търсене и замяна",
search_command: "търси следващия / отвори прозорец с търсачка",
search: "търсене",
replace: "замяна",
replace_command: "замяна / отвори прозорец с търсачка",
find_next: "намери следващия",
replace_all: "замени всички",
reg_exp: "реголярни изрази",
match_case: "чуствителен към регистъра",
not_found: "няма резултат.",
occurrence_replaced: "замяната е осъществена.",
search_field_empty: "Полето за търсене е празно",
restart_search_at_begin: "До края на документа. Почни с началото.",
move_popup: "премести прозореца с търсачката",
font_size: "--Размер на шрифта--",
go_to_line: "премени към реда",
go_to_line_prompt: "премени към номера на реда:",
undo: "отмени",
redo: "върни",
change_smooth_selection: "включи/изключи някой от функциите за преглед (по красиво, но повече натоварва)",
highlight: "превключване на оцветяване на синтаксиса включена/изключена",
reset_highlight: "въстанови оцветяване на синтаксиса (ако не е синхронизиран с текста)",
word_wrap: "режим на пренасяне на дълги редове",
help: "за програмата",
save: "съхрани",
load: "зареди",
line_abbr: "Стр",
char_abbr: "Стлб",
position: "Позиция",
total: "Всичко",
close_popup: "затвори прозореца",
shortcuts: "Бързи клавиши",
add_tab: "добави табулация в текста",
remove_tab: "премахни табулацията в текста",
about_notice: "Внимание: използвайте функцията оцветяване на синтаксиса само за малки текстове",
toggle: "Превключи редактор",
accesskey: "Бърз клавиш",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Зареждане...",
fullscreen: "на цял екран",
syntax_selection: "--Синтаксис--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "PHP",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "XML",
syntax_c: "C",
syntax_cpp: "C++",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Затвори файла"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["cs"]={
new_document: "Nový dokument",
search_button: "Najdi a nahraď",
search_command: "Hledej další / otevři vyhledávací pole",
search: "Hledej",
replace: "Nahraď",
replace_command: "Nahraď / otevři vyhledávací pole",
find_next: "Najdi další",
replace_all: "Nahraď vše",
reg_exp: "platné výrazy",
match_case: "vyhodnocené výrazy",
not_found: "nenalezené.",
occurrence_replaced: "výskyty nahrazené.",
search_field_empty: "Pole vyhledávání je prázdné",
restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.",
move_popup: "Přesuň vyhledávací okno",
font_size: "--Velikost textu--",
go_to_line: "Přejdi na řádek",
go_to_line_prompt: "Přejdi na řádek:",
undo: "krok zpět",
redo: "znovu",
change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)",
highlight: "Zvýrazňování syntaxe zap./vyp.",
reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)",
word_wrap: "toggle word wrapping mode",
help: "O programu",
save: "Uložit",
load: "Otevřít",
line_abbr: "Ř.",
char_abbr: "S.",
position: "Pozice",
total: "Celkem",
close_popup: "Zavřít okno",
shortcuts: "Zkratky",
add_tab: "Přidat tabulování textu",
remove_tab: "Odtsranit tabulování textu",
about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text",
toggle: "Přepnout editor",
accesskey: "Přístupová klávesa",
tab: "Záložka",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Zpracovávám ...",
fullscreen: "Celá obrazovka",
syntax_selection: "--vyber zvýrazňovač--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["de"]={
new_document: "Neues Dokument",
search_button: "Suchen und Ersetzen",
search_command: "Weitersuchen / &ouml;ffne Suchfeld",
search: "Suchen",
replace: "Ersetzen",
replace_command: "Ersetzen / &ouml;ffne Suchfeld",
find_next: "Weitersuchen",
replace_all: "Ersetze alle Treffer",
reg_exp: "regul&auml;re Ausdr&uuml;cke",
match_case: "passt auf den Begriff<br />",
not_found: "Nicht gefunden.",
occurrence_replaced: "Die Vorkommen wurden ersetzt.",
search_field_empty: "Leeres Suchfeld",
restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation
move_popup: "Suchfenster bewegen",
font_size: "--Schriftgr&ouml;&szlig;e--",
go_to_line: "Gehe zu Zeile",
go_to_line_prompt: "Gehe zu Zeilennummmer:",
undo: "R&uuml;ckg&auml;ngig",
redo: "Wiederherstellen",
change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)",
highlight: "Syntax Highlighting an- und ausschalten",
reset_highlight: "Highlighting zur&uuml;cksetzen (falls mit Text nicht konform)",
word_wrap: "Toggle word wrapping mode",
help: "Info",
save: "Speichern",
load: "&Ouml;ffnen",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Position",
total: "Gesamt",
close_popup: "Popup schlie&szlig;en",
shortcuts: "Shortcuts",
add_tab: "Tab zum Text hinzuf&uuml;gen",
remove_tab: "Tab aus Text entfernen",
about_notice: "Bemerkung: Syntax Highlighting ist nur f&uuml;r kurze Texte",
toggle: "Editor an- und ausschalten",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "In Bearbeitung...",
fullscreen: "Full-Screen",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["dk"]={
new_document: "nyt tomt dokument",
search_button: "s&oslash;g og erstat",
search_command: "find n&aelig;ste / &aring;ben s&oslash;gefelt",
search: "s&oslash;g",
replace: "erstat",
replace_command: "erstat / &aring;ben s&oslash;gefelt",
find_next: "find n&aelig;ste",
replace_all: "erstat alle",
reg_exp: "regular expressions",
match_case: "forskel på store/sm&aring; bogstaver<br />",
not_found: "not found.",
occurrence_replaced: "occurences replaced.",
search_field_empty: "Search field empty",
restart_search_at_begin: "End of area reached. Restart at begin.",
move_popup: "flyt søgepopup",
font_size: "--Skriftstørrelse--",
go_to_line: "g&aring; til linie",
go_to_line_prompt: "gå til linienummer:",
undo: "fortryd",
redo: "gentag",
change_smooth_selection: "sl&aring; display funktioner til/fra (smartere display men mere CPU kr&aelig;vende)",
highlight: "sl&aring; syntax highlight til/fra",
reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)",
word_wrap: "toggle word wrapping mode",
help: "om",
save: "gem",
load: "hent",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Position",
total: "Total",
close_popup: "luk popup",
shortcuts: "Genveje",
add_tab: "tilf&oslash;j tabulation til tekst",
remove_tab: "fjern tabulation fra tekst",
about_notice: "Husk: syntax highlight funktionen b&oslash;r kun bruge til sm&aring; tekster",
toggle: "Sl&aring; editor til / fra",
accesskey: "Accesskey",
tab: "Tab",
shift: "Skift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Processing...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["en"]={
new_document: "new empty document",
search_button: "search and replace",
search_command: "search next / open search area",
search: "search",
replace: "replace",
replace_command: "replace / open search area",
find_next: "find next",
replace_all: "replace all",
reg_exp: "regular expressions",
match_case: "match case",
not_found: "not found.",
occurrence_replaced: "occurences replaced.",
search_field_empty: "Search field empty",
restart_search_at_begin: "End of area reached. Restart at begin.",
move_popup: "move search popup",
font_size: "--Font size--",
go_to_line: "go to line",
go_to_line_prompt: "go to line number:",
undo: "undo",
redo: "redo",
change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)",
highlight: "toggle syntax highlight on/off",
reset_highlight: "reset highlight (if desyncronized from text)",
word_wrap: "toggle word wrapping mode",
help: "about",
save: "save",
load: "load",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Position",
total: "Total",
close_popup: "close popup",
shortcuts: "Shortcuts",
add_tab: "add tabulation to text",
remove_tab: "remove tabulation to text",
about_notice: "Notice: syntax highlight function is only for small text",
toggle: "Toggle editor",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Processing...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["eo"]={
new_document: "nova dokumento (vakigas la enhavon)",
search_button: "ser&#265;i / anstata&#365;igi",
search_command: "pluser&#265;i / malfermi la ser&#265;o-fenestron",
search: "ser&#265;i",
replace: "anstata&#365;igi",
replace_command: "anstata&#365;igi / malfermi la ser&#265;o-fenestron",
find_next: "ser&#265;i",
replace_all: "anstata&#365;igi &#265;ion",
reg_exp: "regula esprimo",
match_case: "respekti la usklecon",
not_found: "ne trovita.",
occurrence_replaced: "anstata&#365;igoj plenumitaj.",
search_field_empty: "La kampo estas malplena.",
restart_search_at_begin: "Fino de teksto &#285;isrirata, &#265;u da&#365;rigi el la komenco?",
move_popup: "movi la ser&#265;o-fenestron",
font_size: "--Tipara grando--",
go_to_line: "iri al la linio",
go_to_line_prompt: "iri al la linio numero:",
undo: "rezigni",
redo: "refari",
change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da &#349;ar&#285;o de la &#265;eforgano)",
highlight: "ebligi/malebligi la sintaksan kolorigon",
reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)",
word_wrap: "toggle word wrapping mode",
help: "pri",
save: "registri",
load: "&#349;ar&#285;i",
line_abbr: "Ln",
char_abbr: "Sg",
position: "Pozicio",
total: "Sumo",
close_popup: "fermi la &#349;prucfenestron",
shortcuts: "Fulmoklavo",
add_tab: "aldoni tabon en la tekston",
remove_tab: "forigi tablon el la teksto",
about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.",
toggle: "baskuligi la redaktilon",
accesskey: "Fulmoklavo",
tab: "Tab",
shift: "Maj",
ctrl: "Ktrl",
esc: "Esk",
processing: "&#349;argante...",
fullscreen: "plenekrane",
syntax_selection: "--Sintakso--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Pitono",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Fermi la dosieron"
};

View file

@ -1,64 +0,0 @@
editAreaLoader.lang["es"]={
new_document: "nuevo documento vacío",
search_button: "buscar y reemplazar",
search_command: "buscar siguiente / abrir área de búsqueda",
search: "buscar",
replace: "reemplazar",
replace_command: "reemplazar / abrir área de búsqueda",
find_next: "encontrar siguiente",
replace_all: "reemplazar todos",
reg_exp: "expresiones regulares",
match_case: "coincidir capitalización",
not_found: "no encontrado.",
occurrence_replaced: "ocurrencias reemplazadas.",
search_field_empty: "Campo de búsqueda vacío",
restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.",
move_popup: "mover la ventana de búsqueda",
font_size: "--Tamaño de la fuente--",
go_to_line: "ir a la línea",
go_to_line_prompt: "ir a la línea número:",
undo: "deshacer",
redo: "rehacer",
change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)",
highlight: "intercambiar resaltado de sintaxis",
reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)",
word_wrap: "toggle word wrapping mode",
help: "acerca",
save: "guardar",
load: "cargar",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Posición",
total: "Total",
close_popup: "recuadro de cierre",
shortcuts: "Atajos",
add_tab: "añadir tabulado al texto",
remove_tab: "borrar tabulado del texto",
about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño",
toggle: "Cambiar editor",
accesskey: "Tecla de acceso",
tab: "Tab",
shift: "Mayúsc",
ctrl: "Ctrl",
esc: "Esc",
processing: "Procesando...",
fullscreen: "pantalla completa",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["fi"]={
new_document: "uusi tyhjä dokumentti",
search_button: "etsi ja korvaa",
search_command: "etsi seuraava / avaa etsintävalikko",
search: "etsi",
replace: "korvaa",
replace_command: "korvaa / avaa etsintävalikko",
find_next: "etsi seuraava",
replace_all: "korvaa kaikki",
reg_exp: "säännölliset lausekkeet",
match_case: "täsmää kirjainkokoon",
not_found: "ei löytynyt.",
occurrence_replaced: "esiintymää korvattu.",
search_field_empty: "Haettava merkkijono on tyhjä",
restart_search_at_begin: "Alueen loppu saavutettiin. Aloitetaan alusta.",
move_popup: "siirrä etsintävalikkoa",
font_size: "--Fontin koko--",
go_to_line: "siirry riville",
go_to_line_prompt: "mene riville:",
undo: "peruuta",
redo: "tee uudelleen",
change_smooth_selection: "kytke/sammuta joitakin näyttötoimintoja (Älykkäämpi toiminta, mutta suurempi CPU kuormitus)",
highlight: "kytke syntaksikorostus päälle/pois",
reset_highlight: "resetoi syntaksikorostus (jos teksti ei ole synkassa korostuksen kanssa)",
word_wrap: "toggle word wrapping mode",
help: "tietoja",
save: "tallenna",
load: "lataa",
line_abbr: "Rv",
char_abbr: "Pos",
position: "Paikka",
total: "Yhteensä",
close_popup: "sulje valikko",
shortcuts: "Pikatoiminnot",
add_tab: "lisää sisennys tekstiin",
remove_tab: "poista sisennys tekstistä",
about_notice: "Huomautus: syntaksinkorostus toimii vain pienelle tekstille",
toggle: "Kytke editori",
accesskey: "Pikanäppäin",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Odota...",
fullscreen: "koko ruutu",
syntax_selection: "--Syntaksi--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Sulje tiedosto"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["fr"]={
new_document: "nouveau document (efface le contenu)",
search_button: "rechercher / remplacer",
search_command: "rechercher suivant / ouvrir la fen&ecirc;tre de recherche",
search: "rechercher",
replace: "remplacer",
replace_command: "remplacer / ouvrir la fen&ecirc;tre de recherche",
find_next: "rechercher",
replace_all: "tout remplacer",
reg_exp: "expr. r&eacute;guli&egrave;re",
match_case: "respecter la casse",
not_found: "pas trouv&eacute;.",
occurrence_replaced: "remplacements &eacute;ffectu&eacute;s.",
search_field_empty: "Le champ de recherche est vide.",
restart_search_at_begin: "Fin du texte atteint, poursuite au d&eacute;but.",
move_popup: "d&eacute;placer la fen&ecirc;tre de recherche",
font_size: "--Taille police--",
go_to_line: "aller &agrave; la ligne",
go_to_line_prompt: "aller a la ligne numero:",
undo: "annuler",
redo: "refaire",
change_smooth_selection: "activer/d&eacute;sactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)",
highlight: "activer/d&eacute;sactiver la coloration syntaxique",
reset_highlight: "r&eacute;initialiser la coloration syntaxique (si d&eacute;syncronis&eacute;e du texte)",
word_wrap: "activer/d&eacute;sactiver les retours &agrave; la ligne automatiques",
help: "&agrave; propos",
save: "sauvegarder",
load: "charger",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Position",
total: "Total",
close_popup: "fermer le popup",
shortcuts: "Racourcis clavier",
add_tab: "ajouter une tabulation dans le texte",
remove_tab: "retirer une tabulation dans le texte",
about_notice: "Note: la coloration syntaxique n'est pr&eacute;vue que pour de courts textes.",
toggle: "basculer l'&eacute;diteur",
accesskey: "Accesskey",
tab: "Tab",
shift: "Maj",
ctrl: "Ctrl",
esc: "Esc",
processing: "chargement...",
fullscreen: "plein &eacute;cran",
syntax_selection: "--Syntaxe--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Fermer le fichier"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["hr"]={
new_document: "Novi dokument",
search_button: "Traži i izmijeni",
search_command: "Traži dalje / Otvori prozor za traženje",
search: "Traži",
replace: "Izmijeni",
replace_command: "Izmijeni / Otvori prozor za traženje",
find_next: "Traži dalje",
replace_all: "Izmjeni sve",
reg_exp: "Regularni izrazi",
match_case: "Bitna vel. slova",
not_found: "nije naðeno.",
occurrence_replaced: "izmjenjenih.",
search_field_empty: "Prazno polje za traženje!",
restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.",
move_popup: "Pomakni prozor",
font_size: "--Velièina teksta--",
go_to_line: "Odi na redak",
go_to_line_prompt: "Odi na redak:",
undo: "Vrati natrag",
redo: "Napravi ponovo",
change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)",
highlight: "Ukljuèi/iskljuèi bojanje sintakse",
reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)",
word_wrap: "toggle word wrapping mode",
help: "O edit_area",
save: "Spremi",
load: "Uèitaj",
line_abbr: "Ln",
char_abbr: "Zn",
position: "Pozicija",
total: "Ukupno",
close_popup: "Zatvori prozor",
shortcuts: "Kratice",
add_tab: "Dodaj tabulaciju",
remove_tab: "Makni tabulaciju",
about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove",
toggle: "Prebaci naèin ureðivanja",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Procesiram...",
fullscreen: "Cijeli prozor",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["it"]={
new_document: "nuovo documento vuoto",
search_button: "cerca e sostituisci",
search_command: "trova successivo / apri finestra di ricerca",
search: "cerca",
replace: "sostituisci",
replace_command: "sostituisci / apri finestra di ricerca",
find_next: "trova successivo",
replace_all: "sostituisci tutti",
reg_exp: "espressioni regolari",
match_case: "confronta maiuscole/minuscole<br />",
not_found: "non trovato.",
occurrence_replaced: "occorrenze sostituite.",
search_field_empty: "Campo ricerca vuoto",
restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.",
move_popup: "sposta popup di ricerca",
font_size: "-- Dimensione --",
go_to_line: "vai alla linea",
go_to_line_prompt: "vai alla linea numero:",
undo: "annulla",
redo: "ripeti",
change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione",
highlight: "abilita/disabilita colorazione della sintassi",
reset_highlight: "aggiorna colorazione (se non sincronizzata)",
word_wrap: "toggle word wrapping mode",
help: "informazioni su...",
save: "salva",
load: "carica",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Posizione",
total: "Totale",
close_popup: "chiudi popup",
shortcuts: "Scorciatoie",
add_tab: "aggiungi tabulazione",
remove_tab: "rimuovi tabulazione",
about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo",
toggle: "Abilita/disabilita editor",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "In corso...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["ja"]={
new_document: "新規作成",
search_button: "検索・置換",
search_command: "次を検索 / 検索窓を表示",
search: "検索",
replace: "置換",
replace_command: "置換 / 置換窓を表示",
find_next: "次を検索",
replace_all: "全置換",
reg_exp: "正規表現",
match_case: "大文字小文字の区別",
not_found: "見つかりません。",
occurrence_replaced: "置換しました。",
search_field_empty: "検索対象文字列が空です。",
restart_search_at_begin: "終端に達しました、始めに戻ります",
move_popup: "検索窓を移動",
font_size: "--フォントサイズ--",
go_to_line: "指定行へ移動",
go_to_line_prompt: "指定行へ移動します:",
undo: "元に戻す",
redo: "やり直し",
change_smooth_selection: "スムース表示の切り替えCPUを使います",
highlight: "構文強調表示の切り替え",
reset_highlight: "構文強調表示のリセット",
word_wrap: "toggle word wrapping mode",
help: "ヘルプを表示",
save: "保存",
load: "読み込み",
line_abbr: "行",
char_abbr: "文字",
position: "位置",
total: "合計",
close_popup: "ポップアップを閉じる",
shortcuts: "ショートカット",
add_tab: "タブを挿入する",
remove_tab: "タブを削除する",
about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。",
toggle: "テキストエリアとeditAreaの切り替え",
accesskey: "アクセスキー",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "処理中です...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["mk"]={
new_document: "Нов документ",
search_button: "Најди и замени",
search_command: "Барај следно / Отвори нов прозорец за пребарување",
search: "Барај",
replace: "Замени",
replace_command: "Замени / Отвори прозорец за пребарување",
find_next: "најди следно",
replace_all: "Замени ги сите",
reg_exp: "Регуларни изрази",
match_case: "Битна е големината на буквите",
not_found: "не е пронајдено.",
occurrence_replaced: "замени.",
search_field_empty: "Полето за пребарување е празно",
restart_search_at_begin: "Крај на областа. Стартувај од почеток.",
move_popup: "Помести го прозорецот",
font_size: "--Големина на текстот--",
go_to_line: "Оди на линија",
go_to_line_prompt: "Оди на линија со број:",
undo: "Врати",
redo: "Повтори",
change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)",
highlight: "Вклучи/исклучи осветлување на синтакса",
reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)",
word_wrap: "toggle word wrapping mode",
help: "За",
save: "Зачувај",
load: "Вчитај",
line_abbr: "Лн",
char_abbr: "Зн",
position: "Позиција",
total: "Вкупно",
close_popup: "Затвори го прозорецот",
shortcuts: "Кратенки",
add_tab: "Додај табулација на текстот",
remove_tab: "Отстрани ја табулацијата",
about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст",
toggle: "Смени начин на уредување",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Обработувам...",
fullscreen: "Цел прозорец",
syntax_selection: "--Синтакса--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Избери датотека"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["nl"]={
new_document: "nieuw leeg document",
search_button: "zoek en vervang",
search_command: "zoek volgende / zoekscherm openen",
search: "zoek",
replace: "vervang",
replace_command: "vervang / zoekscherm openen",
find_next: "volgende vinden",
replace_all: "alles vervangen",
reg_exp: "reguliere expressies",
match_case: "hoofdletter gevoelig",
not_found: "niet gevonden.",
occurrence_replaced: "object vervangen.",
search_field_empty: "Zoek veld leeg",
restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw",
move_popup: "versleep zoek scherm",
font_size: "--Letter grootte--",
go_to_line: "Ga naar regel",
go_to_line_prompt: "Ga naar regel nummer:",
undo: "Ongedaan maken",
redo: "Opnieuw doen",
change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)",
highlight: "zet syntax highlight aan/uit",
reset_highlight: "reset highlight (indien gedesynchronizeerd)",
word_wrap: "toggle word wrapping mode",
help: "informatie",
save: "opslaan",
load: "laden",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Positie",
total: "Totaal",
close_popup: "Popup sluiten",
shortcuts: "Snelkoppelingen",
add_tab: "voeg tabs toe in tekst",
remove_tab: "verwijder tabs uit tekst",
about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst",
toggle: "geavanceerde bewerkingsopties",
accesskey: "Accessknop",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Verwerken...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["pl"]={
new_document: "nowy dokument",
search_button: "znajdź i zamień",
search_command: "znajdź następny",
search: "znajdź",
replace: "zamień",
replace_command: "zamień",
find_next: "następny",
replace_all: "zamień wszystko",
reg_exp: "wyrażenie regularne",
match_case: "uwzględnij wielkość liter<br />",
not_found: "nie znaleziono.",
occurrence_replaced: "wystąpień zamieniono.",
search_field_empty: "Nie wprowadzono tekstu",
restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.",
move_popup: "przesuń okienko wyszukiwania",
font_size: "Rozmiar",
go_to_line: "idź do linii",
go_to_line_prompt: "numer linii:",
undo: "cofnij",
redo: "przywróć",
change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)",
highlight: "włącz/wyłącz podświetlanie składni",
reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)",
word_wrap: "toggle word wrapping mode",
help: "o programie",
save: "zapisz",
load: "otwórz",
line_abbr: "Ln",
char_abbr: "Zn",
position: "Pozycja",
total: "W sumie",
close_popup: "zamknij okienko",
shortcuts: "Skróty klawiaturowe",
add_tab: "dodaj wcięcie do zaznaczonego tekstu",
remove_tab: "usuń wcięcie",
about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów",
toggle: "Włącz/wyłącz edytor",
accesskey: "Alt+",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Przetwarzanie...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["pt"]={
new_document: "Novo documento",
search_button: "Localizar e substituir",
search_command: "Localizar próximo",
search: "Localizar",
replace: "Substituir",
replace_command: "Substituir",
find_next: "Localizar",
replace_all: "Subst. tudo",
reg_exp: "Expressões regulares",
match_case: "Diferenciar maiúsculas e minúsculas",
not_found: "Não encontrado.",
occurrence_replaced: "Ocorrências substituidas",
search_field_empty: "Campo localizar vazio.",
restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.",
move_popup: "Mover janela",
font_size: "--Tamanho da fonte--",
go_to_line: "Ir para linha",
go_to_line_prompt: "Ir para a linha:",
undo: "Desfazer",
redo: "Refazer",
change_smooth_selection: "Opções visuais",
highlight: "Cores de sintaxe",
reset_highlight: "Resetar cores (se não sincronizado)",
word_wrap: "toggle word wrapping mode",
help: "Sobre",
save: "Salvar",
load: "Carregar",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Posição",
total: "Total",
close_popup: "Fechar",
shortcuts: "Shortcuts",
add_tab: "Adicionar tabulação",
remove_tab: "Remover tabulação",
about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos",
toggle: "Exibir editor",
accesskey: "Accesskey",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Processando...",
fullscreen: "fullscreen",
syntax_selection: "--Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["ru"]={
new_document: "новый пустой документ",
search_button: "поиск и замена",
search_command: "искать следующий / открыть панель поиска",
search: "поиск",
replace: "замена",
replace_command: "заменить / открыть панель поиска",
find_next: "найти следующее",
replace_all: "заменить все",
reg_exp: "регулярное выражение",
match_case: "учитывать регистр",
not_found: "не найдено.",
occurrence_replaced: "вхождение заменено.",
search_field_empty: "Поле поиска пустое",
restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.",
move_popup: "переместить окно поиска",
font_size: "--Размер шрифта--",
go_to_line: "перейти к строке",
go_to_line_prompt: "перейти к строке номер:",
undo: "отменить",
redo: "вернуть",
change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)",
highlight: "переключить подсветку синтаксиса включена/выключена",
reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)",
word_wrap: "toggle word wrapping mode",
help: "о программе",
save: "сохранить",
load: "загрузить",
line_abbr: "Стр",
char_abbr: "Стлб",
position: "Позиция",
total: "Всего",
close_popup: "закрыть всплывающее окно",
shortcuts: "Горячие клавиши",
add_tab: "добавить табуляцию в текст",
remove_tab: "убрать табуляцию из текста",
about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов",
toggle: "Переключить редактор",
accesskey: "Горячая клавиша",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Обработка...",
fullscreen: "полный экран",
syntax_selection: "--Синтакс--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Закрыть файл"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["sk"]={
new_document: "nový prázdy dokument",
search_button: "vyhľadaj a nahraď",
search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole",
search: "hľadaj",
replace: "nahraď",
replace_command: "nahraď / otvor vyhľadávacie pole",
find_next: "nájdi ďalšie",
replace_all: "nahraď všetko",
reg_exp: "platné výrazy",
match_case: "zhodujúce sa výrazy",
not_found: "nenájdené.",
occurrence_replaced: "výskyty nahradené.",
search_field_empty: "Pole vyhľadávanie je prádzne",
restart_search_at_begin: "End of area reached. Restart at begin.",
move_popup: "presuň vyhľadávacie okno",
font_size: "--Veľkosť textu--",
go_to_line: "prejdi na riadok",
go_to_line_prompt: "prejdi na riadok:",
undo: "krok späť",
redo: "prepracovať",
change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje väčšie zaťaženie procesora CPU)",
highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp",
reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)",
word_wrap: "toggle word wrapping mode",
help: "o programe",
save: "uložiť",
load: "načítať",
line_abbr: "Ln",
char_abbr: "Ch",
position: "Pozícia",
total: "Spolu",
close_popup: "zavrieť okno",
shortcuts: "Skratky",
add_tab: "pridať tabulovanie textu",
remove_tab: "odstrániť tabulovanie textu",
about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text",
toggle: "Prepnúť editor",
accesskey: "Accesskey",
tab: "Záložka",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "Spracúvam...",
fullscreen: "cel=a obrazovka",
syntax_selection: "--Vyber Syntax--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "Close file"
};

View file

@ -1,67 +0,0 @@
editAreaLoader.lang["zh"]={
new_document: "新建空白文档",
search_button: "查找与替换",
search_command: "查找下一个 / 打开查找框",
search: "查找",
replace: "替换",
replace_command: "替换 / 打开查找框",
find_next: "查找下一个",
replace_all: "全部替换",
reg_exp: "正则表达式",
match_case: "匹配大小写",
not_found: "未找到.",
occurrence_replaced: "处被替换.",
search_field_empty: "查找框没有内容",
restart_search_at_begin: "已到到文档末尾. 从头重新查找.",
move_popup: "移动查找对话框",
font_size: "--字体大小--",
go_to_line: "转到行",
go_to_line_prompt: "转到行:",
undo: "恢复",
redo: "重做",
change_smooth_selection: "启用/禁止一些显示特性(更好看但更耗费资源)",
highlight: "启用/禁止语法高亮",
reset_highlight: "重置语法高亮(当文本显示不同步时)",
word_wrap: "toggle word wrapping mode",
help: "关于",
save: "保存",
load: "加载",
line_abbr: "行",
char_abbr: "字符",
position: "位置",
total: "总计",
close_popup: "关闭对话框",
shortcuts: "快捷键",
add_tab: "添加制表符(Tab)",
remove_tab: "移除制表符(Tab)",
about_notice: "注意:语法高亮功能仅用于较少内容的文本(文件内容太大会导致浏览器反应慢)",
toggle: "切换编辑器",
accesskey: "快捷键",
tab: "Tab",
shift: "Shift",
ctrl: "Ctrl",
esc: "Esc",
processing: "正在处理中...",
fullscreen: "全屏编辑",
syntax_selection: "--语法--",
syntax_css: "CSS",
syntax_html: "HTML",
syntax_js: "Javascript",
syntax_php: "Php",
syntax_python: "Python",
syntax_vb: "Visual Basic",
syntax_xml: "Xml",
syntax_c: "C",
syntax_cpp: "CPP",
syntax_basic: "Basic",
syntax_pas: "Pascal",
syntax_brainfuck: "Bf",
syntax_sql: "SQL",
syntax_ruby: "Ruby",
syntax_robotstxt: "Robots txt",
syntax_tsql: "T-SQL",
syntax_perl: "Perl",
syntax_coldfusion: "Coldfusion",
syntax_java: "Java",
close_tab: "关闭文件"
};

View file

@ -1,504 +0,0 @@
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
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View file

@ -1,7 +0,0 @@
Copyright 2008 Christophe Dolivet
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

View file

@ -1,10 +0,0 @@
Copyright (c) 2008, Christophe Dolivet
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* 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.
* Neither the name of EditArea 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.

View file

@ -1,458 +0,0 @@
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

View file

@ -1,623 +0,0 @@
EditArea.prototype.focus = function() {
this.textarea.focus();
this.textareaFocused=true;
};
EditArea.prototype.check_line_selection= function(timer_checkup){
var changes, infos, new_top, new_width,i;
var t1=t2=t2_1=t3=tLines=tend= new Date().getTime();
// l'editeur n'existe plus => on quitte
if(!editAreas[this.id])
return false;
if(!this.smooth_selection && !this.do_highlight)
{
//do nothing
}
else if(this.textareaFocused && editAreas[this.id]["displayed"]==true && this.isResizing==false)
{
infos = this.get_selection_infos();
changes = this.checkTextEvolution( typeof( this.last_selection['full_text'] ) == 'undefined' ? '' : this.last_selection['full_text'], infos['full_text'] );
t2= new Date().getTime();
// if selection change
if(this.last_selection["line_start"] != infos["line_start"] || this.last_selection["line_nb"] != infos["line_nb"] || infos["full_text"] != this.last_selection["full_text"] || this.reload_highlight || this.last_selection["selectionStart"] != infos["selectionStart"] || this.last_selection["selectionEnd"] != infos["selectionEnd"] || !timer_checkup )
{
// move and adjust text selection elements
new_top = this.getLinePosTop( infos["line_start"] );
new_width = Math.max(this.textarea.scrollWidth, this.container.clientWidth -50);
this.selection_field.style.top=this.selection_field_text.style.top=new_top+"px";
if(!this.settings['word_wrap']){
this.selection_field.style.width=this.selection_field_text.style.width=this.test_font_size.style.width=new_width+"px";
}
// usefull? => _$("cursor_pos").style.top=new_top+"px";
if(this.do_highlight==true)
{
// fill selection elements
var curr_text = infos["full_text"].split("\n");
var content = "";
//alert("length: "+curr_text.length+ " i: "+ Math.max(0,infos["line_start"]-1)+ " end: "+Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1)+ " line: "+infos["line_start"]+" [0]: "+curr_text[0]+" [1]: "+curr_text[1]);
var start = Math.max(0,infos["line_start"]-1);
var end = Math.min(curr_text.length, infos["line_start"]+infos["line_nb"]-1);
//curr_text[start]= curr_text[start].substr(0,infos["curr_pos"]-1) +"¤_overline_¤"+ curr_text[start].substr(infos["curr_pos"]-1);
for(i=start; i< end; i++){
content+= curr_text[i]+"\n";
}
// add special chars arround selected characters
selLength = infos['selectionEnd'] - infos['selectionStart'];
content = content.substr( 0, infos["curr_pos"] - 1 ) + "\r\r" + content.substr( infos["curr_pos"] - 1, selLength ) + "\r\r" + content.substr( infos["curr_pos"] - 1 + selLength );
content = '<span>'+ content.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace("\r\r", '</span><strong>').replace("\r\r", '</strong><span>') +'</span>';
if( this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
this.selection_field.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";
} else {
this.selection_field.innerHTML= content;
}
this.selection_field_text.innerHTML = this.selection_field.innerHTML;
t2_1 = new Date().getTime();
// check if we need to update the highlighted background
if(this.reload_highlight || (infos["full_text"] != this.last_text_to_highlight && (this.last_selection["line_start"]!=infos["line_start"] || this.show_line_colors || this.settings['word_wrap'] || this.last_selection["line_nb"]!=infos["line_nb"] || this.last_selection["nb_line"]!=infos["nb_line"]) ) )
{
this.maj_highlight(infos);
}
}
}
t3= new Date().getTime();
// manage line heights
if( this.settings['word_wrap'] && infos["full_text"] != this.last_selection["full_text"])
{
// refresh only 1 line if text change concern only one line and that the total line number has not changed
if( changes.newText.split("\n").length == 1 && this.last_selection['nb_line'] && infos['nb_line'] == this.last_selection['nb_line'] )
{
this.fixLinesHeight( infos['full_text'], changes.lineStart, changes.lineStart );
}
else
{
this.fixLinesHeight( infos['full_text'], changes.lineStart, -1 );
}
}
tLines= new Date().getTime();
// manage bracket finding
if( infos["line_start"] != this.last_selection["line_start"] || infos["curr_pos"] != this.last_selection["curr_pos"] || infos["full_text"].length!=this.last_selection["full_text"].length || this.reload_highlight || !timer_checkup )
{
// move _cursor_pos
var selec_char= infos["curr_line"].charAt(infos["curr_pos"]-1);
var no_real_move=true;
if(infos["line_nb"]==1 && (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]) ){
no_real_move=false;
//findEndBracket(infos["line_start"], infos["curr_pos"], selec_char);
if(this.findEndBracket(infos, selec_char) === true){
_$("end_bracket").style.visibility ="visible";
_$("cursor_pos").style.visibility ="visible";
_$("cursor_pos").innerHTML = selec_char;
_$("end_bracket").innerHTML = (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]);
}else{
_$("end_bracket").style.visibility ="hidden";
_$("cursor_pos").style.visibility ="hidden";
}
}else{
_$("cursor_pos").style.visibility ="hidden";
_$("end_bracket").style.visibility ="hidden";
}
//alert("move cursor");
this.displayToCursorPosition("cursor_pos", infos["line_start"], infos["curr_pos"]-1, infos["curr_line"], no_real_move);
if(infos["line_nb"]==1 && infos["line_start"]!=this.last_selection["line_start"])
this.scroll_to_view();
}
this.last_selection=infos;
}
tend= new Date().getTime();
//if( (tend-t1) > 7 )
// console.log( "tps total: "+ (tend-t1) + " tps get_infos: "+ (t2-t1)+ " tps selec: "+ (t2_1-t2)+ " tps highlight: "+ (t3-t2_1) +" tps lines: "+ (tLines-t3) +" tps cursor+lines: "+ (tend-tLines)+" \n" );
if(timer_checkup){
setTimeout("editArea.check_line_selection(true)", this.check_line_selection_timer);
}
};
EditArea.prototype.get_selection_infos= function(){
var sel={}, start, end, len, str;
this.getIESelection();
start = this.textarea.selectionStart;
end = this.textarea.selectionEnd;
if( this.last_selection["selectionStart"] == start && this.last_selection["selectionEnd"] == end && this.last_selection["full_text"] == this.textarea.value )
{
return this.last_selection;
}
if(this.tabulation!="\t" && this.textarea.value.indexOf("\t")!=-1)
{ // can append only after copy/paste
len = this.textarea.value.length;
this.textarea.value = this.replace_tab(this.textarea.value);
start = end = start+(this.textarea.value.length-len);
this.area_select( start, 0 );
}
sel["selectionStart"] = start;
sel["selectionEnd"] = end;
sel["full_text"] = this.textarea.value;
sel["line_start"] = 1;
sel["line_nb"] = 1;
sel["curr_pos"] = 0;
sel["curr_line"] = "";
sel["indexOfCursor"] = 0;
sel["selec_direction"] = this.last_selection["selec_direction"];
//return sel;
var splitTab= sel["full_text"].split("\n");
var nbLine = Math.max(0, splitTab.length);
var nbChar = Math.max(0, sel["full_text"].length - (nbLine - 1)); // (remove \n caracters from the count)
if( sel["full_text"].indexOf("\r") != -1 )
nbChar = nbChar - ( nbLine - 1 ); // (remove \r caracters from the count)
sel["nb_line"] = nbLine;
sel["nb_char"] = nbChar;
if(start>0){
str = sel["full_text"].substr(0,start);
sel["curr_pos"] = start - str.lastIndexOf("\n");
sel["line_start"] = Math.max(1, str.split("\n").length);
}else{
sel["curr_pos"]=1;
}
if(end>start){
sel["line_nb"]=sel["full_text"].substring(start,end).split("\n").length;
}
sel["indexOfCursor"]=start;
sel["curr_line"]=splitTab[Math.max(0,sel["line_start"]-1)];
// determine in which direction the selection grow
if(sel["selectionStart"] == this.last_selection["selectionStart"]){
if(sel["selectionEnd"]>this.last_selection["selectionEnd"])
sel["selec_direction"]= "down";
else if(sel["selectionEnd"] == this.last_selection["selectionStart"])
sel["selec_direction"]= this.last_selection["selec_direction"];
}else if(sel["selectionStart"] == this.last_selection["selectionEnd"] && sel["selectionEnd"]>this.last_selection["selectionEnd"]){
sel["selec_direction"]= "down";
}else{
sel["selec_direction"]= "up";
}
_$("nbLine").innerHTML = nbLine;
_$("nbChar").innerHTML = nbChar;
_$("linePos").innerHTML = sel["line_start"];
_$("currPos").innerHTML = sel["curr_pos"];
return sel;
};
// set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd)
EditArea.prototype.getIESelection= function(){
var selectionStart, selectionEnd, range, stored_range;
if( !this.isIE )
return false;
// make it work as nowrap mode (easier for range manipulation with lineHeight)
if( this.settings['word_wrap'] )
this.textarea.wrap='off';
try{
range = document.selection.createRange();
stored_range = range.duplicate();
stored_range.moveToElementText( this.textarea );
stored_range.setEndPoint( 'EndToEnd', range );
if( stored_range.parentElement() != this.textarea )
throw "invalid focus";
// the range don't take care of empty lines in the end of the selection
var scrollTop = this.result.scrollTop + document.body.scrollTop;
var relative_top= range.offsetTop - parent.calculeOffsetTop(this.textarea) + scrollTop;
var line_start = Math.round((relative_top / this.lineHeight) +1);
var line_nb = Math.round( range.boundingHeight / this.lineHeight );
selectionStart = stored_range.text.length - range.text.length;
selectionStart += ( line_start - this.textarea.value.substr(0, selectionStart).split("\n").length)*2; // count missing empty \r to the selection
selectionStart -= ( line_start - this.textarea.value.substr(0, selectionStart).split("\n").length ) * 2;
selectionEnd = selectionStart + range.text.length;
selectionEnd += (line_start + line_nb - 1 - this.textarea.value.substr(0, selectionEnd ).split("\n").length)*2;
this.textarea.selectionStart = selectionStart;
this.textarea.selectionEnd = selectionEnd;
}
catch(e){}
// restore wrap mode
if( this.settings['word_wrap'] )
this.textarea.wrap='soft';
};
// select the text for IE (and take care of \r caracters)
EditArea.prototype.setIESelection= function(){
var a = this.textarea, nbLineStart, nbLineEnd, range;
if( !this.isIE )
return false;
nbLineStart = a.value.substr(0, a.selectionStart).split("\n").length - 1;
nbLineEnd = a.value.substr(0, a.selectionEnd).split("\n").length - 1;
range = document.selection.createRange();
range.moveToElementText( a );
range.setEndPoint( 'EndToStart', range );
range.moveStart('character', a.selectionStart - nbLineStart);
range.moveEnd('character', a.selectionEnd - nbLineEnd - (a.selectionStart - nbLineStart) );
range.select();
};
EditArea.prototype.checkTextEvolution=function(lastText,newText){
// ch will contain changes datas
var ch={},baseStep=200, cpt=0, end, step,tStart=new Date().getTime();
end = Math.min(newText.length, lastText.length);
step = baseStep;
// find how many chars are similar at the begin of the text
while( cpt<end && step>=1 ){
if(lastText.substr(cpt, step) == newText.substr(cpt, step)){
cpt+= step;
}else{
step= Math.floor(step/2);
}
}
ch.posStart = cpt;
ch.lineStart= newText.substr(0, ch.posStart).split("\n").length -1;
cpt_last = lastText.length;
cpt = newText.length;
step = baseStep;
// find how many chars are similar at the end of the text
while( cpt>=0 && cpt_last>=0 && step>=1 ){
if(lastText.substr(cpt_last-step, step) == newText.substr(cpt-step, step)){
cpt-= step;
cpt_last-= step;
}else{
step= Math.floor(step/2);
}
}
ch.posNewEnd = cpt;
ch.posLastEnd = cpt_last;
if(ch.posNewEnd<=ch.posStart){
if(lastText.length < newText.length){
ch.posNewEnd= ch.posStart + newText.length - lastText.length;
ch.posLastEnd= ch.posStart;
}else{
ch.posLastEnd= ch.posStart + lastText.length - newText.length;
ch.posNewEnd= ch.posStart;
}
}
ch.newText = newText.substring(ch.posStart, ch.posNewEnd);
ch.lastText = lastText.substring(ch.posStart, ch.posLastEnd);
ch.lineNewEnd = newText.substr(0, ch.posNewEnd).split("\n").length -1;
ch.lineLastEnd = lastText.substr(0, ch.posLastEnd).split("\n").length -1;
ch.newTextLine = newText.split("\n").slice(ch.lineStart, ch.lineNewEnd+1).join("\n");
ch.lastTextLine = lastText.split("\n").slice(ch.lineStart, ch.lineLastEnd+1).join("\n");
//console.log( ch );
return ch;
};
EditArea.prototype.tab_selection= function(){
if(this.is_tabbing)
return;
this.is_tabbing=true;
//infos=getSelectionInfos();
//if( document.selection ){
this.getIESelection();
/* Insertion du code de formatage */
var start = this.textarea.selectionStart;
var end = this.textarea.selectionEnd;
var insText = this.textarea.value.substring(start, end);
/* Insert tabulation and ajust cursor position */
var pos_start=start;
var pos_end=end;
if (insText.length == 0) {
// if only one line selected
this.textarea.value = this.textarea.value.substr(0, start) + this.tabulation + this.textarea.value.substr(end);
pos_start = start + this.tabulation.length;
pos_end=pos_start;
} else {
start= Math.max(0, this.textarea.value.substr(0, start).lastIndexOf("\n")+1);
endText=this.textarea.value.substr(end);
startText=this.textarea.value.substr(0, start);
tmp= this.textarea.value.substring(start, end).split("\n");
insText= this.tabulation+tmp.join("\n"+this.tabulation);
this.textarea.value = startText + insText + endText;
pos_start = start;
pos_end= this.textarea.value.indexOf("\n", startText.length + insText.length);
if(pos_end==-1)
pos_end=this.textarea.value.length;
//pos = start + repdeb.length + insText.length + ;
}
this.textarea.selectionStart = pos_start;
this.textarea.selectionEnd = pos_end;
//if( document.selection ){
if(this.isIE)
{
this.setIESelection();
setTimeout("editArea.is_tabbing=false;", 100); // IE can't accept to make 2 tabulation without a little break between both
}
else
{
this.is_tabbing=false;
}
};
EditArea.prototype.invert_tab_selection= function(){
var t=this, a=this.textarea;
if(t.is_tabbing)
return;
t.is_tabbing=true;
//infos=getSelectionInfos();
//if( document.selection ){
t.getIESelection();
var start = a.selectionStart;
var end = a.selectionEnd;
var insText = a.value.substring(start, end);
/* Tab remove and cursor seleciton adjust */
var pos_start=start;
var pos_end=end;
if (insText.length == 0) {
if(a.value.substring(start-t.tabulation.length, start)==t.tabulation)
{
a.value = a.value.substr(0, start-t.tabulation.length) + a.value.substr(end);
pos_start = Math.max(0, start-t.tabulation.length);
pos_end = pos_start;
}
/*
a.value = a.value.substr(0, start) + t.tabulation + insText + a.value.substr(end);
pos_start = start + t.tabulation.length;
pos_end=pos_start;*/
} else {
start = a.value.substr(0, start).lastIndexOf("\n")+1;
endText = a.value.substr(end);
startText = a.value.substr(0, start);
tmp = a.value.substring(start, end).split("\n");
insText = "";
for(i=0; i<tmp.length; i++){
for(j=0; j<t.tab_nb_char; j++){
if(tmp[i].charAt(0)=="\t"){
tmp[i]=tmp[i].substr(1);
j=t.tab_nb_char;
}else if(tmp[i].charAt(0)==" ")
tmp[i]=tmp[i].substr(1);
}
insText+=tmp[i];
if(i<tmp.length-1)
insText+="\n";
}
//insText+="_";
a.value = startText + insText + endText;
pos_start = start;
pos_end = a.value.indexOf("\n", startText.length + insText.length);
if(pos_end==-1)
pos_end=a.value.length;
//pos = start + repdeb.length + insText.length + ;
}
a.selectionStart = pos_start;
a.selectionEnd = pos_end;
//if( document.selection ){
if(t.isIE){
// select the text for IE
t.setIESelection();
setTimeout("editArea.is_tabbing=false;", 100); // IE can accept to make 2 tabulation without a little break between both
}else
t.is_tabbing=false;
};
EditArea.prototype.press_enter= function(){
if(!this.smooth_selection)
return false;
this.getIESelection();
var scrollTop= this.result.scrollTop;
var scrollLeft= this.result.scrollLeft;
var start=this.textarea.selectionStart;
var end= this.textarea.selectionEnd;
var start_last_line= Math.max(0 , this.textarea.value.substring(0, start).lastIndexOf("\n") + 1 );
var begin_line= this.textarea.value.substring(start_last_line, start).replace(/^([ \t]*).*/gm, "$1");
var lineStart = this.textarea.value.substring(0, start).split("\n").length;
if(begin_line=="\n" || begin_line=="\r" || begin_line.length==0)
{
return false;
}
if(this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ){
begin_line="\r\n"+ begin_line;
}else{
begin_line="\n"+ begin_line;
}
//alert(start_last_line+" strat: "+start +"\n"+this.textarea.value.substring(start_last_line, start)+"\n_"+begin_line+"_")
this.textarea.value= this.textarea.value.substring(0, start) + begin_line + this.textarea.value.substring(end);
this.area_select(start+ begin_line.length ,0);
// during this process IE scroll back to the top of the textarea
if(this.isIE){
this.result.scrollTop = scrollTop;
this.result.scrollLeft = scrollLeft;
}
return true;
};
EditArea.prototype.findEndBracket= function(infos, bracket){
var start=infos["indexOfCursor"];
var normal_order=true;
//curr_text=infos["full_text"].split("\n");
if(this.assocBracket[bracket])
endBracket=this.assocBracket[bracket];
else if(this.revertAssocBracket[bracket]){
endBracket=this.revertAssocBracket[bracket];
normal_order=false;
}
var end=-1;
var nbBracketOpen=0;
for(var i=start; i<infos["full_text"].length && i>=0; ){
if(infos["full_text"].charAt(i)==endBracket){
nbBracketOpen--;
if(nbBracketOpen<=0){
//i=infos["full_text"].length;
end=i;
break;
}
}else if(infos["full_text"].charAt(i)==bracket)
nbBracketOpen++;
if(normal_order)
i++;
else
i--;
}
//end=infos["full_text"].indexOf("}", start);
if(end==-1)
return false;
var endLastLine=infos["full_text"].substr(0, end).lastIndexOf("\n");
if(endLastLine==-1)
line=1;
else
line= infos["full_text"].substr(0, endLastLine).split("\n").length + 1;
var curPos= end - endLastLine - 1;
var endLineLength = infos["full_text"].substring(end).split("\n")[0].length;
this.displayToCursorPosition("end_bracket", line, curPos, infos["full_text"].substring(endLastLine +1, end + endLineLength));
return true;
};
EditArea.prototype.displayToCursorPosition= function(id, start_line, cur_pos, lineContent, no_real_move){
var elem,dest,content,posLeft=0,posTop,fixPadding,topOffset,endElem;
elem = this.test_font_size;
dest = _$(id);
content = "<span id='test_font_size_inner'>"+lineContent.substr(0, cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span><span id='endTestFont'>"+lineContent.substr(cur_pos).replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</span>";
if( this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
elem.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";
} else {
elem.innerHTML= content;
}
endElem = _$('endTestFont');
topOffset = endElem.offsetTop;
fixPadding = parseInt( this.content_highlight.style.paddingLeft.replace("px", "") );
posLeft = 45 + endElem.offsetLeft + ( !isNaN( fixPadding ) && topOffset > 0 ? fixPadding : 0 );
posTop = this.getLinePosTop( start_line ) + topOffset;// + Math.floor( ( endElem.offsetHeight - 1 ) / this.lineHeight ) * this.lineHeight;
// detect the case where the span start on a line but has no display on it
if( this.isIE && cur_pos > 0 && endElem.offsetLeft == 0 )
{
posTop += this.lineHeight;
}
if(no_real_move!=true){ // when the cursor is hidden no need to move him
dest.style.top=posTop+"px";
dest.style.left=posLeft+"px";
}
// usefull for smarter scroll
dest.cursor_top=posTop;
dest.cursor_left=posLeft;
// _$(id).style.marginLeft=posLeft+"px";
};
EditArea.prototype.getLinePosTop= function(start_line){
var elem= _$('line_'+ start_line), posTop=0;
if( elem )
posTop = elem.offsetTop;
else
posTop = this.lineHeight * (start_line-1);
return posTop;
};
// return the dislpayed height of a text (take word-wrap into account)
EditArea.prototype.getTextHeight= function(text){
var t=this,elem,height;
elem = t.test_font_size;
content = text.replace(/&/g,"&amp;").replace(/</g,"&lt;");
if( t.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
elem.innerHTML= "<pre>" + content.replace(/^\r?\n/, "<br>") + "</pre>";
} else {
elem.innerHTML= content;
}
height = elem.offsetHeight;
height = Math.max( 1, Math.floor( elem.offsetHeight / this.lineHeight ) ) * this.lineHeight;
return height;
};
/**
* Fix line height for the given lines
* @param Integer linestart
* @param Integer lineEnd End line or -1 to cover all lines
*/
EditArea.prototype.fixLinesHeight= function( textValue, lineStart,lineEnd ){
var aText = textValue.split("\n");
if( lineEnd == -1 )
lineEnd = aText.length-1;
for( var i = Math.max(0, lineStart); i <= lineEnd; i++ )
{
if( elem = _$('line_'+ ( i+1 ) ) )
{
elem.style.height= typeof( aText[i] ) != "undefined" ? this.getTextHeight( aText[i] )+"px" : this.lineHeight;
}
}
};
EditArea.prototype.area_select= function(start, length){
this.textarea.focus();
start = Math.max(0, Math.min(this.textarea.value.length, start));
end = Math.max(start, Math.min(this.textarea.value.length, start+length));
if(this.isIE)
{
this.textarea.selectionStart = start;
this.textarea.selectionEnd = end;
this.setIESelection();
}
else
{
// Opera bug when moving selection start and selection end
if(this.isOpera && this.isOpera < 9.6 )
{
this.textarea.setSelectionRange(0, 0);
}
this.textarea.setSelectionRange(start, end);
}
this.check_line_selection();
};
EditArea.prototype.area_get_selection= function(){
var text="";
if( document.selection ){
var range = document.selection.createRange();
text=range.text;
}else{
text= this.textarea.value.substring(this.textarea.selectionStart, this.textarea.selectionEnd);
}
return text;
};

View file

@ -1,90 +0,0 @@
/**
* Charmap plugin
* by Christophe Dolivet
* v0.1 (2006/09/22)
*
*
* This plugin allow to use a visual keyboard allowing to insert any UTF-8 characters in the text.
*
* - plugin name to add to the plugin list: "charmap"
* - plugin name to add to the toolbar list: "charmap"
* - possible parameters to add to EditAreaLoader.init():
* "charmap_default": (String) define the name of the default character range displayed on popup display
* (default: "arrows")
*
*
*/
var EditArea_charmap= {
/**
* Get called once this file is loaded (editArea still not initialized)
*
* @return nothing
*/
init: function(){
this.default_language="Arrows";
}
/**
* 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 "charmap":
// Control id, button img, command
return parent.editAreaLoader.get_button_html('charmap_but', 'charmap.gif', 'charmap_press', false, this.baseURL);
}
return false;
}
/**
* Get called once EditArea is fully loaded and initialised
*
* @return nothing
*/
,onload: function(){
if(editArea.settings["charmap_default"] && editArea.settings["charmap_default"].length>0)
this.default_language= editArea.settings["charmap_default"];
}
/**
* 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){
}
/**
* 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 "charmap_press":
win= window.open(this.baseURL+"popup.html", "charmap", "width=500,height=270,scrollbars=yes,resizable=yes");
win.focus();
return false;
}
// Pass to next handler in chain
return true;
}
};
// Adds the plugin class to the list of available EditArea plugins
editArea.add_plugin("charmap", EditArea_charmap);

View file

@ -1,64 +0,0 @@
body{
background-color: #F0F0EE;
font: 12px monospace, sans-serif;
}
select{
background-color: #F9F9F9;
border: solid 1px #888888;
}
h1, h2, h3, h4, h5, h6{
margin: 0;
padding: 0;
color: #2B6FB6;
}
h1{
font-size: 1.5em;
}
div#char_list{
height: 200px;
overflow: auto;
padding: 1px;
border: 1px solid #0A246A;
background-color: #F9F9F9;
clear: both;
margin-top: 5px;
}
a.char{
display: block;
float: left;
width: 20px;
height: 20px;
line-height: 20px;
margin: 1px;
border: solid 1px #888888;
text-align: center;
cursor: pointer;
}
a.char:hover{
background-color: #CCCCCC;
}
.preview{
border: solid 1px #888888;
width: 50px;
padding: 2px 5px;
height: 35px;
line-height: 35px;
text-align:center;
background-color: #CCCCCC;
font-size: 2em;
float: right;
font-weight: bold;
margin: 0 0 5px 5px;
}
#preview_code{
font-size: 1.1em;
width: 70px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 B

View file

@ -1,373 +0,0 @@
var editArea;
/**
* UTF-8 list taken from http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec
*/
/*
var char_range_list={
"Basic Latin":"0021,007F",
"Latin-1 Supplement":"0080,00FF",
"Latin Extended-A":"0100,017F",
"Latin Extended-B":"0180,024F",
"IPA Extensions":"0250,02AF",
"Spacing Modifier Letters":"02B0,02FF",
"Combining Diacritical Marks":"0300,036F",
"Greek and Coptic":"0370,03FF",
"Cyrillic":"0400,04FF",
"Cyrillic Supplement":"0500,052F",
"Armenian":"0530,058F",
"Hebrew":"0590,05FF",
"Arabic":"0600,06FF",
"Syriac":"0700,074F",
"Arabic Supplement":"0750,077F",
"Thaana":"0780,07BF",
"Devanagari":"0900,097F",
"Bengali":"0980,09FF",
"Gurmukhi":"0A00,0A7F",
"Gujarati":"0A80,0AFF",
"Oriya":"0B00,0B7F",
"Tamil":"0B80,0BFF",
"Telugu":"0C00,0C7F",
"Kannada":"0C80,0CFF",
"Malayalam":"0D00,0D7F",
"Sinhala":"0D80,0DFF",
"Thai":"0E00,0E7F",
"Lao":"0E80,0EFF",
"Tibetan":"0F00,0FFF",
"Myanmar":"1000,109F",
"Georgian":"10A0,10FF",
"Hangul Jamo":"1100,11FF",
"Ethiopic":"1200,137F",
"Ethiopic Supplement":"1380,139F",
"Cherokee":"13A0,13FF",
"Unified Canadian Aboriginal Syllabics":"1400,167F",
"Ogham":"1680,169F",
"Runic":"16A0,16FF",
"Tagalog":"1700,171F",
"Hanunoo":"1720,173F",
"Buhid":"1740,175F",
"Tagbanwa":"1760,177F",
"Khmer":"1780,17FF",
"Mongolian":"1800,18AF",
"Limbu":"1900,194F",
"Tai Le":"1950,197F",
"New Tai Lue":"1980,19DF",
"Khmer Symbols":"19E0,19FF",
"Buginese":"1A00,1A1F",
"Phonetic Extensions":"1D00,1D7F",
"Phonetic Extensions Supplement":"1D80,1DBF",
"Combining Diacritical Marks Supplement":"1DC0,1DFF",
"Latin Extended Additional":"1E00,1EFF",
"Greek Extended":"1F00,1FFF",
"General Punctuation":"2000,206F",
"Superscripts and Subscripts":"2070,209F",
"Currency Symbols":"20A0,20CF",
"Combining Diacritical Marks for Symbols":"20D0,20FF",
"Letterlike Symbols":"2100,214F",
"Number Forms":"2150,218F",
"Arrows":"2190,21FF",
"Mathematical Operators":"2200,22FF",
"Miscellaneous Technical":"2300,23FF",
"Control Pictures":"2400,243F",
"Optical Character Recognition":"2440,245F",
"Enclosed Alphanumerics":"2460,24FF",
"Box Drawing":"2500,257F",
"Block Elements":"2580,259F",
"Geometric Shapes":"25A0,25FF",
"Miscellaneous Symbols":"2600,26FF",
"Dingbats":"2700,27BF",
"Miscellaneous Mathematical Symbols-A":"27C0,27EF",
"Supplemental Arrows-A":"27F0,27FF",
"Braille Patterns":"2800,28FF",
"Supplemental Arrows-B":"2900,297F",
"Miscellaneous Mathematical Symbols-B":"2980,29FF",
"Supplemental Mathematical Operators":"2A00,2AFF",
"Miscellaneous Symbols and Arrows":"2B00,2BFF",
"Glagolitic":"2C00,2C5F",
"Coptic":"2C80,2CFF",
"Georgian Supplement":"2D00,2D2F",
"Tifinagh":"2D30,2D7F",
"Ethiopic Extended":"2D80,2DDF",
"Supplemental Punctuation":"2E00,2E7F",
"CJK Radicals Supplement":"2E80,2EFF",
"Kangxi Radicals":"2F00,2FDF",
"Ideographic Description Characters":"2FF0,2FFF",
"CJK Symbols and Punctuation":"3000,303F",
"Hiragana":"3040,309F",
"Katakana":"30A0,30FF",
"Bopomofo":"3100,312F",
"Hangul Compatibility Jamo":"3130,318F",
"Kanbun":"3190,319F",
"Bopomofo Extended":"31A0,31BF",
"CJK Strokes":"31C0,31EF",
"Katakana Phonetic Extensions":"31F0,31FF",
"Enclosed CJK Letters and Months":"3200,32FF",
"CJK Compatibility":"3300,33FF",
"CJK Unified Ideographs Extension A":"3400,4DBF",
"Yijing Hexagram Symbols":"4DC0,4DFF",
"CJK Unified Ideographs":"4E00,9FFF",
"Yi Syllables":"A000,A48F",
"Yi Radicals":"A490,A4CF",
"Modifier Tone Letters":"A700,A71F",
"Syloti Nagri":"A800,A82F",
"Hangul Syllables":"AC00,D7AF",
"High Surrogates":"D800,DB7F",
"High Private Use Surrogates":"DB80,DBFF",
"Low Surrogates":"DC00,DFFF",
"Private Use Area":"E000,F8FF",
"CJK Compatibility Ideographs":"F900,FAFF",
"Alphabetic Presentation Forms":"FB00,FB4F",
"Arabic Presentation Forms-A":"FB50,FDFF",
"Variation Selectors":"FE00,FE0F",
"Vertical Forms":"FE10,FE1F",
"Combining Half Marks":"FE20,FE2F",
"CJK Compatibility Forms":"FE30,FE4F",
"Small Form Variants":"FE50,FE6F",
"Arabic Presentation Forms-B":"FE70,FEFF",
"Halfwidth and Fullwidth Forms":"FF00,FFEF",
"Specials":"FFF0,FFFF",
"Linear B Syllabary":"10000,1007F",
"Linear B Ideograms":"10080,100FF",
"Aegean Numbers":"10100,1013F",
"Ancient Greek Numbers":"10140,1018F",
"Old Italic":"10300,1032F",
"Gothic":"10330,1034F",
"Ugaritic":"10380,1039F",
"Old Persian":"103A0,103DF",
"Deseret":"10400,1044F",
"Shavian":"10450,1047F",
"Osmanya":"10480,104AF",
"Cypriot Syllabary":"10800,1083F",
"Kharoshthi":"10A00,10A5F",
"Byzantine Musical Symbols":"1D000,1D0FF",
"Musical Symbols":"1D100,1D1FF",
"Ancient Greek Musical Notation":"1D200,1D24F",
"Tai Xuan Jing Symbols":"1D300,1D35F",
"Mathematical Alphanumeric Symbols":"1D400,1D7FF",
"CJK Unified Ideographs Extension B":"20000,2A6DF",
"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",
"Tags":"E0000,E007F",
"Variation Selectors Supplement":"E0100,E01EF"
};
*/
var char_range_list={
"Aegean Numbers":"10100,1013F",
"Alphabetic Presentation Forms":"FB00,FB4F",
"Ancient Greek Musical Notation":"1D200,1D24F",
"Ancient Greek Numbers":"10140,1018F",
"Arabic":"0600,06FF",
"Arabic Presentation Forms-A":"FB50,FDFF",
"Arabic Presentation Forms-B":"FE70,FEFF",
"Arabic Supplement":"0750,077F",
"Armenian":"0530,058F",
"Arrows":"2190,21FF",
"Basic Latin":"0020,007F",
"Bengali":"0980,09FF",
"Block Elements":"2580,259F",
"Bopomofo Extended":"31A0,31BF",
"Bopomofo":"3100,312F",
"Box Drawing":"2500,257F",
"Braille Patterns":"2800,28FF",
"Buginese":"1A00,1A1F",
"Buhid":"1740,175F",
"Byzantine Musical Symbols":"1D000,1D0FF",
"CJK Compatibility Forms":"FE30,FE4F",
"CJK Compatibility Ideographs Supplement":"2F800,2FA1F",
"CJK Compatibility Ideographs":"F900,FAFF",
"CJK Compatibility":"3300,33FF",
"CJK Radicals Supplement":"2E80,2EFF",
"CJK Strokes":"31C0,31EF",
"CJK Symbols and Punctuation":"3000,303F",
"CJK Unified Ideographs Extension A":"3400,4DBF",
"CJK Unified Ideographs Extension B":"20000,2A6DF",
"CJK Unified Ideographs":"4E00,9FFF",
"Cherokee":"13A0,13FF",
"Combining Diacritical Marks Supplement":"1DC0,1DFF",
"Combining Diacritical Marks for Symbols":"20D0,20FF",
"Combining Diacritical Marks":"0300,036F",
"Combining Half Marks":"FE20,FE2F",
"Control Pictures":"2400,243F",
"Coptic":"2C80,2CFF",
"Currency Symbols":"20A0,20CF",
"Cypriot Syllabary":"10800,1083F",
"Cyrillic Supplement":"0500,052F",
"Cyrillic":"0400,04FF",
"Deseret":"10400,1044F",
"Devanagari":"0900,097F",
"Dingbats":"2700,27BF",
"Enclosed Alphanumerics":"2460,24FF",
"Enclosed CJK Letters and Months":"3200,32FF",
"Ethiopic Extended":"2D80,2DDF",
"Ethiopic Supplement":"1380,139F",
"Ethiopic":"1200,137F",
"General Punctuation":"2000,206F",
"Geometric Shapes":"25A0,25FF",
"Georgian Supplement":"2D00,2D2F",
"Georgian":"10A0,10FF",
"Glagolitic":"2C00,2C5F",
"Gothic":"10330,1034F",
"Greek Extended":"1F00,1FFF",
"Greek and Coptic":"0370,03FF",
"Gujarati":"0A80,0AFF",
"Gurmukhi":"0A00,0A7F",
"Halfwidth and Fullwidth Forms":"FF00,FFEF",
"Hangul Compatibility Jamo":"3130,318F",
"Hangul Jamo":"1100,11FF",
"Hangul Syllables":"AC00,D7AF",
"Hanunoo":"1720,173F",
"Hebrew":"0590,05FF",
"High Private Use Surrogates":"DB80,DBFF",
"High Surrogates":"D800,DB7F",
"Hiragana":"3040,309F",
"IPA Extensions":"0250,02AF",
"Ideographic Description Characters":"2FF0,2FFF",
"Kanbun":"3190,319F",
"Kangxi Radicals":"2F00,2FDF",
"Kannada":"0C80,0CFF",
"Katakana Phonetic Extensions":"31F0,31FF",
"Katakana":"30A0,30FF",
"Kharoshthi":"10A00,10A5F",
"Khmer Symbols":"19E0,19FF",
"Khmer":"1780,17FF",
"Lao":"0E80,0EFF",
"Latin Extended Additional":"1E00,1EFF",
"Latin Extended-A":"0100,017F",
"Latin Extended-B":"0180,024F",
"Latin-1 Supplement":"0080,00FF",
"Letterlike Symbols":"2100,214F",
"Limbu":"1900,194F",
"Linear B Ideograms":"10080,100FF",
"Linear B Syllabary":"10000,1007F",
"Low Surrogates":"DC00,DFFF",
"Malayalam":"0D00,0D7F",
"Mathematical Alphanumeric Symbols":"1D400,1D7FF",
"Mathematical Operators":"2200,22FF",
"Miscellaneous Mathematical Symbols-A":"27C0,27EF",
"Miscellaneous Mathematical Symbols-B":"2980,29FF",
"Miscellaneous Symbols and Arrows":"2B00,2BFF",
"Miscellaneous Symbols":"2600,26FF",
"Miscellaneous Technical":"2300,23FF",
"Modifier Tone Letters":"A700,A71F",
"Mongolian":"1800,18AF",
"Musical Symbols":"1D100,1D1FF",
"Myanmar":"1000,109F",
"New Tai Lue":"1980,19DF",
"Number Forms":"2150,218F",
"Ogham":"1680,169F",
"Old Italic":"10300,1032F",
"Old Persian":"103A0,103DF",
"Optical Character Recognition":"2440,245F",
"Oriya":"0B00,0B7F",
"Osmanya":"10480,104AF",
"Phonetic Extensions Supplement":"1D80,1DBF",
"Phonetic Extensions":"1D00,1D7F",
"Private Use Area":"E000,F8FF",
"Runic":"16A0,16FF",
"Shavian":"10450,1047F",
"Sinhala":"0D80,0DFF",
"Small Form Variants":"FE50,FE6F",
"Spacing Modifier Letters":"02B0,02FF",
"Specials":"FFF0,FFFF",
"Superscripts and Subscripts":"2070,209F",
"Supplemental Arrows-A":"27F0,27FF",
"Supplemental Arrows-B":"2900,297F",
"Supplemental Mathematical Operators":"2A00,2AFF",
"Supplemental Punctuation":"2E00,2E7F",
"Syloti Nagri":"A800,A82F",
"Syriac":"0700,074F",
"Tagalog":"1700,171F",
"Tagbanwa":"1760,177F",
"Tags":"E0000,E007F",
"Tai Le":"1950,197F",
"Tai Xuan Jing Symbols":"1D300,1D35F",
"Tamil":"0B80,0BFF",
"Telugu":"0C00,0C7F",
"Thaana":"0780,07BF",
"Thai":"0E00,0E7F",
"Tibetan":"0F00,0FFF",
"Tifinagh":"2D30,2D7F",
"Ugaritic":"10380,1039F",
"Unified Canadian Aboriginal Syllabics":"1400,167F",
"Variation Selectors Supplement":"E0100,E01EF",
"Variation Selectors":"FE00,FE0F",
"Vertical Forms":"FE10,FE1F",
"Yi Radicals":"A490,A4CF",
"Yi Syllables":"A000,A48F",
"Yijing Hexagram Symbols":"4DC0,4DFF"
};
var insert="charmap_insert";
function map_load(){
editArea=opener.editArea;
// translate the document
insert= editArea.get_translation(insert, "word");
//alert(document.title);
document.title= editArea.get_translation(document.title, "template");
document.body.innerHTML= editArea.get_translation(document.body.innerHTML, "template");
//document.title= editArea.get_translation(document.getElementBytitle, "template");
var selected_lang=opener.EditArea_charmap.default_language.toLowerCase();
var selected=0;
var select= document.getElementById("select_range")
for(var i in char_range_list){
if(i.toLowerCase()==selected_lang)
selected=select.options.length;
select.options[select.options.length]=new Option(i, char_range_list[i]);
}
select.options[selected].selected=true;
/* start=0;
end=127;
content="";
for(var i=start; i<end; i++){
content+="&#"+i+"; ";
}
document.getElementById("char_list").innerHTML=content;*/
renderCharMapHTML();
}
function renderCharMapHTML() {
range= document.getElementById("select_range").value.split(",");
start= parseInt(range[0],16);
end= parseInt(range[1],16);
var charsPerRow = 20, tdWidth=20, tdHeight=20;
html="";
for (var i=start; i<end; i++) {
html+="<a class='char' onmouseover='previewChar(\""+ i + "\");' onclick='insertChar(\""+ i + "\");' title='"+ insert +"'>"+ String.fromCharCode(i) +"</a>";
}
document.getElementById("char_list").innerHTML= html;
document.getElementById("preview_char").innerHTML="";
}
function previewChar(i){
document.getElementById("preview_char").innerHTML= String.fromCharCode(i);
document.getElementById("preview_code").innerHTML= "&amp;#"+ i +";";
}
function insertChar(i){
opener.parent.editAreaLoader.setSelectedText(editArea.id, String.fromCharCode( i));
range= opener.parent.editAreaLoader.getSelectionRange(editArea.id);
opener.parent.editAreaLoader.setSelectionRange(editArea.id, range["end"], range["end"]);
window.focus();
}

View file

@ -1,12 +0,0 @@
/*
* Bulgarian translation
* Author: Valentin Hristov
* Company: SOFTKIT Bulgarian
* Site: http://www.softkit-bg.com
*/
editArea.add_lang("bg",{
charmap_but: "Виртуална клавиатура",
charmap_title: "Виртуална клавиатура",
charmap_choose_block: "избери езиков блок",
charmap_insert:"постави този символ"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("cs",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("de",{
charmap_but: "Sonderzeichen",
charmap_title: "Sonderzeichen",
charmap_choose_block: "Bereich ausw&auml;hlen",
charmap_insert: "dieses Zeichen einf&uuml;gen"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("dk",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("en",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("eo",{
charmap_but: "Ekranklavaro",
charmap_title: "Ekranklavaro",
charmap_choose_block: "Elekto de lingvo",
charmap_insert:"enmeti tiun signaron"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("es",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("fr",{
charmap_but: "Clavier visuel",
charmap_title: "Clavier visuel",
charmap_choose_block: "choix du language",
charmap_insert:"ins&eacute;rer ce caract&egrave;re"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("hr",{
charmap_but: "Virtualna tipkovnica",
charmap_title: "Virtualna tipkovnica",
charmap_choose_block: "Odaberi blok s jezikom",
charmap_insert:"Ubaci taj znak"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("it",{
charmap_but: "Tastiera visuale",
charmap_title: "Tastiera visuale",
charmap_choose_block: "seleziona blocco",
charmap_insert:"inserisci questo carattere"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("ja",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("mkn",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("nl",{
charmap_but: "Visueel toetsenbord",
charmap_title: "Visueel toetsenbord",
charmap_choose_block: "Kies een taal blok",
charmap_insert:"Voeg dit symbool in"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("pl",{
charmap_but: "Klawiatura ekranowa",
charmap_title: "Klawiatura ekranowa",
charmap_choose_block: "wybierz grupę znaków",
charmap_insert:"wstaw ten znak"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("pt",{
charmap_but: "Visual keyboard",
charmap_title: "Visual keyboard",
charmap_choose_block: "select language block",
charmap_insert:"insert this character"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("ru",{
charmap_but: "Визуальная клавиатура",
charmap_title: "Визуальная клавиатура",
charmap_choose_block: "выбрать языковой блок",
charmap_insert:"вставить этот символ"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("sk",{
charmap_but: "Vizuálna klávesnica",
charmap_title: "Vizuálna klávesnica",
charmap_choose_block: "vyber jazykový blok",
charmap_insert: "vlož tento znak"
});

View file

@ -1,6 +0,0 @@
editArea.add_lang("zh",{
charmap_but: "软键盘",
charmap_title: "软键盘",
charmap_choose_block: "选择一个语言块",
charmap_insert:"插入此字符"
});

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