diff --git a/lib/WebGUI/Form/Codearea.pm b/lib/WebGUI/Form/Codearea.pm
index 88a33b661..653dd0bd0 100644
--- a/lib/WebGUI/Form/Codearea.pm
+++ b/lib/WebGUI/Form/Codearea.pm
@@ -157,6 +157,7 @@ sub toHtml {
id : "$id",
syntax : "$syntax",
start_highlight : true,
+ show_line_colors: true,
toolbar : "search, go_to_line, |, undo, redo, |, syntax_selection, highlight, reset_highlight, |, help"
});
diff --git a/www/extras/editarea/change_log.txt b/www/extras/editarea/change_log.txt
index e2699d5d5..3d1425a07 100644
--- a/www/extras/editarea/change_log.txt
+++ b/www/extras/editarea/change_log.txt
@@ -1,3 +1,50 @@
+**** 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)
diff --git a/www/extras/editarea/docs/about.html b/www/extras/editarea/docs/about.html
index 5df27abec..c854b5e9f 100644
--- a/www/extras/editarea/docs/about.html
+++ b/www/extras/editarea/docs/about.html
@@ -1,48 +1,49 @@
-
-
-
-
-
-
General information
-
EditArea is a free javascript editor for source code. It allow to write
- well formated source code. That's no way a WYSIWYG editor.
-
-
- EditArea is developed by Christophe Dolivet
- (contact)
- and is currently released
- under the "LGPL" license, read the license agreement for details.
-
-
Features
-
- - Easy to integrate, takes only a couple lines of code.
- - Live syntax highlight.
- - Search and replace (with regexp).
- - Line numerotation.
- - International language support.
- - Allow to create new syntax or translation files.
- - Multiple instance on the same page.
- - Multiple browser support (see compatibility chart
- for more information).
- - Font resizing.
- - Toolbar customization.
- - Load and save callback function.
- - Possibility to use a gzip compressed version of the script (only 20Kb).
-
-
-
-
-
-
+
+
+
+
+
+
General information
+
EditArea is a free javascript editor for source code. It allow to write
+ well formated source code. That's no way a WYSIWYG editor.
+
+
+ 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.
+
+
Features
+
+ - Easy to integrate, only one script include and one function call
+ - Tabulation support (allow to write well formated source code)
+ - Customizable real-time syntax highlighting (currently: PHP, CSS, Javascript, Python, HTML, XML, VB, C, CPP, SQL, Pascal, Basic, Brainf*ck, and probably more...)
+ - Word-wrap support
+ - Search and replace (with regexp)
+ - Auto-indenting new lines
+ - Line numerotation
+ - Multilanguage support (currently: Croatian, Czech, Danish, Dutch, English, Esperanto, French, German, Italian, Japanese, Macedonian, Polish, Portuguese, Russian, Slovak, Spanish, and probably more...)
+ - Possible PHP gzip compression (compress the core files to one file of ~25Ko)
+ - Allow multiple instances
+ - Full screen mode
+ - Possible plugin integration
+ - Possible save and load callback functions
+ - Possible dynamic content management
+ - Can work in the same environment than "prototype" and "mootools"'s like libraries.
+
+
+
+
+
+
diff --git a/www/extras/editarea/docs/compatibility.html b/www/extras/editarea/docs/compatibility.html
index c34c24981..996acee91 100644
--- a/www/extras/editarea/docs/compatibility.html
+++ b/www/extras/editarea/docs/compatibility.html
@@ -19,7 +19,7 @@
The table was reset to only show the browsers I take care of.
- Since I have no mac, I can't make test for safari, neither testing multi-plateform browsers.
+
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.
This is for advanced users. The object editAreaLoader has some public functions that can be called from the page in order to manage the EditArea editors.
editAreaLoader.getValue(editor_id)
This method return the content text of the editor. Works on normal textarea if the EditArea is toggled off.
| Parameters |
| editor_id |
The id of the converted textarea |
Returns: the content text of the editor. String
editAreaLoader.setValue(editor_id, new_text)
This method allow to update the content text of an editor. Works on normal textarea if the EditArea is toggled off.
| Parameters |
| editor_id |
The id of the converted textarea |
| new_text |
The new text that will replace the Editor content. |
Returns: Nothing.
editAreaLoader.insertTags(editor_id, open_tag, close_tag)
This method allow to insert tags at the current position. If no text was selected, the cursor is then
displayed between the open and the close tags. Otherwise, the cursor is positionned after the close tag.
Works on normal textarea if the EditArea is toggled off.
| Parameters |
| editor_id |
The id of the converted textarea |
| open_tag |
The open tag string. |
| close_tag |
The close tag string. |
Returns: Nothing.
editAreaLoader.getSelectedText(editor_id)
This method return the text contained in the the selection range.
Works on normal textarea if the EditArea is toggled off.
| Parameters |
| editor_id |
The id of the converted textarea |
Returns: The text contained in the the selection range. String
editAreaLoader.setSelectedText(editor_id, new_text)
This method allow to replace the text contained in the selection range with a given string.
The selection range will then contain the new string.
Works on normal textarea if the EditArea is toggled off.
| Parameters |
| editor_id |
The id of the converted textarea |
| new_text |
The string that will replace the current selected text. |
Returns: Nothing.
editAreaLoader.getSelectionRange(editor_id)
This method return the position start and position end of the selection range in the editor.
Works on normal textarea if the EditArea is toggled off.
| Parameters |
| editor_id |
The id of the converted textarea |
Returns: An array containing the index of the selection start and end.
Array("start", "end")
editAreaLoader.setSelectionRange(editor_id, new_start, new_end)
This method allow to set the selection range with the given start and end positions.
Works on normal textarea if the EditArea is toggled off.
| Parameters |
| editor_id |
The id of the converted textarea |
| new_start |
The character position determining the start of the selection range. |
| new_end |
The character position determining the end of the selection range. |
Returns: Nothing.
editAreaLoader.execCommand(editor_id, command, command_param)
Allow to access to EditArea functions and datas (for advanced users only).
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
| command |
The function or the parameter of the EditArea object that will be returned. |
| command_param (optionnal) |
If command is a function, the you can pass one parameter to the function with command_param |
Returns: the value of the executed command or data. unknown
| Examples |
| Change edit mode |
Allow to toggle EditArea etit mode from normal edition to readonly with no toolbars.
editAreaLoader.execCommand('editor_id', 'set_editable', !editAreaLoader.execCommand('editor_id', 'is_editable'));
|
| Insert tags |
Insert tags arround selected text or at current cursor position if not text is selected
editAreaLoader.insertTags('editor_id', "[OPEN]", "[CLOSE]");
|
editAreaLoader.delete_instance(editor_id)
Delete an instance of EditArea and restore simple textarea.
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
Returns: Nothing.
editAreaLoader.hide(editor_id)
Hide a textarea and it's related EditArea.
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
Returns: Nothing.
editAreaLoader.show(editor_id)
Restore a textarea and it's related EditArea hidden with the hide() function.
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
Returns: Nothing.
editAreaLoader.openFile(editor_id, file_infos)
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
| file_infos |
An object containing datas of the file that will be openned. Here are the main fields (for the other possible fields see the returned Object of the getFile function):
- id : (required) A string that will identify the file. it's the only required field.
Type: String
- title : (optionnal) The title that will be displayed in the tab area.
Type: String
Default: set with the id field value
- text : (optionnal) The text content of the file.
Type: String
Default: ""
- syntax : (optionnal) The syntax to use for this file.
Type: String
Default: ""
- do_highlight : (optionnal) Set if the file should start highlighted or not
Type: String
Default: ""
|
Returns: Nothing.
editAreaLoader.getCurrentFile(editor_id)
Return datas of the currently selected file (for multi file editing mode).
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
Returns: An object containing datas related to the file.Object
editAreaLoader.getFile(editor_id, file_id)
Return datas of the file identified by file_id (for multi file editing mode).
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
| file_id |
The id of the file to close. |
Returns: An object containing datas related to the file.Object
editAreaLoader.getAllFiles(editor_id)
Return datas of all the currently openned files (for multi file editing mode).
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
Returns: An object containing datas of each files.Object
editAreaLoader.closeFile(editor_id, file_id)
Close the file identified by file_id (for multi file editing mode).
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
| file_id |
The id of the file to close. |
Returns: Nothing.
editAreaLoader.setFileEditedMode(editor_id, file_id, edited_mode)
Define is the file should appears as edited or not.
| Parameters |
| editor_id |
The id of the converted textarea on which the command should be executed. |
| file_id |
The id of the file to close. |
| edited_mode |
A boolean that indicate if the file should be set edited or not edited. |
Returns: Nothing.