";
+editAreaLoader.iframe_css= "";
diff --git a/addons/Core/edit_area/edit_area_functions.js b/addons/Core/edit_area/edit_area_functions.js
new file mode 100644
index 0000000..984d4c6
--- /dev/null
+++ b/addons/Core/edit_area/edit_area_functions.js
@@ -0,0 +1,1203 @@
+ //replace tabulation by the good number of white spaces
+ EditArea.prototype.replace_tab= function(text){
+ return text.replace(/((\n?)([^\t\n]*)\t)/gi, editArea.smartTab); // slower than simple replace...
+ };
+
+ // call by the replace_tab function
+ EditArea.prototype.smartTab= function(){
+ val=" ";
+ return EditArea.prototype.smartTab.arguments[2] + EditArea.prototype.smartTab.arguments[3] + val.substr(0, editArea.tab_nb_char - (EditArea.prototype.smartTab.arguments[3].length)%editArea.tab_nb_char);
+ };
+
+ EditArea.prototype.show_waiting_screen= function(){
+ width = this.editor_area.offsetWidth;
+ height = this.editor_area.offsetHeight;
+ if( !(this.isIE && this.isIE<6) )
+ {
+ width -= 2;
+ height -= 2;
+ }
+ this.processing_screen.style.display= "block";
+ this.processing_screen.style.width = width+"px";
+ this.processing_screen.style.height = height+"px";
+ this.waiting_screen_displayed = true;
+ };
+
+ EditArea.prototype.hide_waiting_screen= function(){
+ this.processing_screen.style.display="none";
+ this.waiting_screen_displayed= false;
+ };
+
+ EditArea.prototype.add_style= function(styles){
+ if(styles.length>0){
+ newcss = document.createElement("style");
+ newcss.type="text/css";
+ newcss.media="all";
+ if(newcss.styleSheet){ // IE
+ newcss.styleSheet.cssText = styles;
+ } else { // W3C
+ newcss.appendChild(document.createTextNode(styles));
+ }
+ document.getElementsByTagName("head")[0].appendChild(newcss);
+ }
+ };
+
+ EditArea.prototype.set_font= function(family, size){
+ var t=this, a=this.textarea, s=this.settings, elem_font, i, elem;
+ // list all elements concerned by font changes
+ var elems= ["textarea", "content_highlight", "cursor_pos", "end_bracket", "selection_field", "selection_field_text", "line_number"];
+
+ if(family && family!="")
+ s["font_family"]= family;
+ if(size && size>0)
+ s["font_size"] = size;
+ if( t.isOpera && t.isOpera < 9.6 ) // opera<9.6 can't manage non monospace font
+ s['font_family']="monospace";
+
+ // update the select tag
+ if( elem_font = _$("area_font_size") )
+ {
+ for( i = 0; i < elem_font.length; i++ )
+ {
+ if( elem_font.options[i].value && elem_font.options[i].value == s["font_size"] )
+ elem_font.options[i].selected=true;
+ }
+ }
+
+ /*
+ * somethimes firefox has rendering mistake with non-monospace font for text width in textarea vs in div for changing font size (eg: verdana change between 11pt to 12pt)
+ * => looks like a browser internal random bug as text width can change while content_highlight is updated
+ * we'll check if the font-size produce the same text width inside textarea and div and if not, we'll increment the font-size
+ *
+ * This is an ugly fix
+ */
+ if( t.isFirefox )
+ {
+ var nbTry = 3;
+ do {
+ var div1 = document.createElement( 'div' ), text1 = document.createElement( 'textarea' );
+ var styles = {
+ width: '40px',
+ overflow: 'scroll',
+ zIndex: 50,
+ visibility: 'hidden',
+ fontFamily: s["font_family"],
+ fontSize: s["font_size"]+"pt",
+ lineHeight: t.lineHeight+"px",
+ padding: '0',
+ margin: '0',
+ border: 'none',
+ whiteSpace: 'nowrap'
+ };
+ var diff, changed = false;
+ for( i in styles )
+ {
+ div1.style[ i ] = styles[i];
+ text1.style[ i ] = styles[i];
+ }
+ // no wrap for this text
+ text1.wrap = 'off';
+ text1.setAttribute('wrap', 'off');
+ t.container.appendChild( div1 );
+ t.container.appendChild( text1 );
+ // try to make FF to bug
+ div1.innerHTML = text1.value = 'azertyuiopqsdfghjklm';
+ div1.innerHTML = text1.value = text1.value+'wxcvbn^p*รน$!:;,,';
+ diff = text1.scrollWidth - div1.scrollWidth;
+
+ // firefox return here a diff of 1 px between equals scrollWidth (can't explain)
+ if( Math.abs( diff ) >= 2 )
+ {
+ s["font_size"]++;
+ changed = true;
+ }
+ t.container.removeChild( div1 );
+ t.container.removeChild( text1 );
+ nbTry--;
+ }while( changed && nbTry > 0 );
+ }
+
+
+ // calc line height
+ elem = t.test_font_size;
+ elem.style.fontFamily = ""+s["font_family"];
+ elem.style.fontSize = s["font_size"]+"pt";
+ elem.innerHTML = "0";
+ t.lineHeight = elem.offsetHeight;
+
+ // update font for all concerned elements
+ for( i=0; i tags
+ t.add_style("pre{font-family:"+s["font_family"]+"}");
+
+ // old opera and IE>=8 doesn't update font changes to the textarea
+ if( ( t.isOpera && t.isOpera < 9.6 ) || t.isIE >= 8 )
+ {
+ var parNod = a.parentNode, nxtSib = a.nextSibling, start= a.selectionStart, end= a.selectionEnd;
+ parNod.removeChild(a);
+ parNod.insertBefore(a, nxtSib);
+ t.area_select(start, end-start);
+ }
+
+ // force update of selection field
+ this.focus();
+ this.update_size();
+ this.check_line_selection();
+ };
+
+ EditArea.prototype.change_font_size= function(){
+ var size=_$("area_font_size").value;
+ if(size>0)
+ this.set_font("", size);
+ };
+
+
+ EditArea.prototype.open_inline_popup= function(popup_id){
+ this.close_all_inline_popup();
+ var popup= _$(popup_id);
+ var editor= _$("editor");
+
+ // search matching icon
+ for(var i=0; i lines.length)
+ start= this.textarea.value.length;
+ else{
+ for(var i=0; i0){
+ //alert(miss_top);
+ zone.scrollTop= zone.scrollTop + miss_top;
+ }else if( zone.scrollTop > cursor_pos_top){
+ // when erase all the content -> does'nt scroll back to the top
+ //alert("else: "+cursor_pos_top);
+ zone.scrollTop= cursor_pos_top;
+ }
+
+ // manage left scroll
+ //var cursor_pos_left= parseInt(_$("cursor_pos").style.left.replace("px",""));
+ var cursor_pos_left= _$("cursor_pos").cursor_left;
+ var max_width_visible= zone.clientWidth + zone.scrollLeft;
+ var miss_left= cursor_pos_left + 10 - max_width_visible;
+ if(miss_left>0){
+ zone.scrollLeft= zone.scrollLeft + miss_left + 50;
+ }else if( zone.scrollLeft > cursor_pos_left){
+ zone.scrollLeft= cursor_pos_left ;
+ }else if( zone.scrollLeft == 45){
+ // show the line numbers if textarea align to it's left
+ zone.scrollLeft=0;
+ }
+ };
+
+ EditArea.prototype.check_undo= function(only_once){
+ if(!editAreas[this.id])
+ return false;
+ if(this.textareaFocused && editAreas[this.id]["displayed"]==true){
+ var text=this.textarea.value;
+ if(this.previous.length<=1)
+ this.switchClassSticky(_$("undo"), 'editAreaButtonDisabled', true);
+
+ if(!this.previous[this.previous.length-1] || this.previous[this.previous.length-1]["text"] != text){
+ this.previous.push({"text": text, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd});
+ if(this.previous.length > this.settings["max_undo"]+1)
+ this.previous.shift();
+
+ }
+ if(this.previous.length >= 2)
+ this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false);
+ }
+
+ if(!only_once)
+ setTimeout("editArea.check_undo()", 3000);
+ };
+
+ EditArea.prototype.undo= function(){
+ //alert("undo"+this.previous.length);
+ if(this.previous.length > 0)
+ {
+ this.getIESelection();
+ // var pos_cursor=this.textarea.selectionStart;
+ this.next.push( { "text": this.textarea.value, "selStart": this.textarea.selectionStart, "selEnd": this.textarea.selectionEnd } );
+ var prev= this.previous.pop();
+ if( prev["text"] == this.textarea.value && this.previous.length > 0 )
+ prev =this.previous.pop();
+ this.textarea.value = prev["text"];
+ this.last_undo = prev["text"];
+ this.area_select(prev["selStart"], prev["selEnd"]-prev["selStart"]);
+ this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false);
+ this.resync_highlight(true);
+ //alert("undo"+this.previous.length);
+ this.check_file_changes();
+ }
+ };
+
+ EditArea.prototype.redo= function(){
+ if(this.next.length > 0)
+ {
+ /*this.getIESelection();*/
+ //var pos_cursor=this.textarea.selectionStart;
+ var next= this.next.pop();
+ this.previous.push(next);
+ this.textarea.value= next["text"];
+ this.last_undo= next["text"];
+ this.area_select(next["selStart"], next["selEnd"]-next["selStart"]);
+ this.switchClassSticky(_$("undo"), 'editAreaButtonNormal', false);
+ this.resync_highlight(true);
+ this.check_file_changes();
+ }
+ if( this.next.length == 0)
+ this.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
+ };
+
+ EditArea.prototype.check_redo= function(){
+ if(editArea.next.length == 0 || editArea.textarea.value!=editArea.last_undo){
+ editArea.next= []; // undo the ability to use "redo" button
+ editArea.switchClassSticky(_$("redo"), 'editAreaButtonDisabled', true);
+ }
+ else
+ {
+ this.switchClassSticky(_$("redo"), 'editAreaButtonNormal', false);
+ }
+ };
+
+
+ // functions that manage icons roll over, disabled, etc...
+ EditArea.prototype.switchClass = function(element, class_name, lock_state) {
+ var lockChanged = false;
+
+ if (typeof(lock_state) != "undefined" && element != null) {
+ element.classLock = lock_state;
+ lockChanged = true;
+ }
+
+ if (element != null && (lockChanged || !element.classLock)) {
+ element.oldClassName = element.className;
+ element.className = class_name;
+ }
+ };
+
+ EditArea.prototype.restoreAndSwitchClass = function(element, class_name) {
+ if (element != null && !element.classLock) {
+ this.restoreClass(element);
+ this.switchClass(element, class_name);
+ }
+ };
+
+ EditArea.prototype.restoreClass = function(element) {
+ if (element != null && element.oldClassName && !element.classLock) {
+ element.className = element.oldClassName;
+ element.oldClassName = null;
+ }
+ };
+
+ EditArea.prototype.setClassLock = function(element, lock_state) {
+ if (element != null)
+ element.classLock = lock_state;
+ };
+
+ EditArea.prototype.switchClassSticky = function(element, class_name, lock_state) {
+ var lockChanged = false;
+ if (typeof(lock_state) != "undefined" && element != null) {
+ element.classLock = lock_state;
+ lockChanged = true;
+ }
+
+ if (element != null && (lockChanged || !element.classLock)) {
+ element.className = class_name;
+ element.oldClassName = class_name;
+ }
+ };
+
+ //make the "page up" and "page down" buttons works correctly
+ EditArea.prototype.scroll_page= function(params){
+ var dir= params["dir"], shift_pressed= params["shift"];
+ var lines= this.textarea.value.split("\n");
+ var new_pos=0, length=0, char_left=0, line_nb=0, curLine=0;
+ var toScrollAmount = _$("result").clientHeight -30;
+ var nbLineToScroll = 0, diff= 0;
+
+ if(dir=="up"){
+ nbLineToScroll = Math.ceil( toScrollAmount / this.lineHeight );
+
+ // fix number of line to scroll
+ for( i = this.last_selection["line_start"]; i - diff > this.last_selection["line_start"] - nbLineToScroll ; i-- )
+ {
+ if( elem = _$('line_'+ i) )
+ {
+ diff += Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight );
+ }
+ }
+ nbLineToScroll -= diff;
+
+ if(this.last_selection["selec_direction"]=="up"){
+ for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]-nbLineToScroll, lines.length); line_nb++){
+ new_pos+= lines[line_nb].length + 1;
+ }
+ char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1);
+ if(shift_pressed)
+ length=this.last_selection["selectionEnd"]-new_pos-char_left;
+ this.area_select(new_pos+char_left, length);
+ view="top";
+ }else{
+ view="bottom";
+ for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-1-nbLineToScroll, lines.length); line_nb++){
+ new_pos+= lines[line_nb].length + 1;
+ }
+ char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]-1);
+ if(shift_pressed){
+ //length=this.last_selection["selectionEnd"]-new_pos-char_left;
+ start= Math.min(this.last_selection["selectionStart"], new_pos+char_left);
+ length= Math.max(new_pos+char_left, this.last_selection["selectionStart"] )- start ;
+ if(new_pos+char_left < this.last_selection["selectionStart"])
+ view="top";
+ }else
+ start=new_pos+char_left;
+ this.area_select(start, length);
+
+ }
+ }
+ else
+ {
+ var nbLineToScroll= Math.floor( toScrollAmount / this.lineHeight );
+ // fix number of line to scroll
+ for( i = this.last_selection["line_start"]; i + diff < this.last_selection["line_start"] + nbLineToScroll ; i++ )
+ {
+ if( elem = _$('line_'+ i) )
+ {
+ diff += Math.floor( ( elem.offsetHeight - 1 ) / this.lineHeight );
+ }
+ }
+ nbLineToScroll -= diff;
+
+ if(this.last_selection["selec_direction"]=="down"){
+ view="bottom";
+ for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+this.last_selection["line_nb"]-2+nbLineToScroll, lines.length); line_nb++){
+ if(line_nb==this.last_selection["line_start"]-1)
+ char_left= this.last_selection["selectionStart"] -new_pos;
+ new_pos+= lines[line_nb].length + 1;
+
+ }
+ if(shift_pressed){
+ length=Math.abs(this.last_selection["selectionStart"]-new_pos);
+ length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"]);
+ //length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left);
+ this.area_select(Math.min(this.last_selection["selectionStart"], new_pos), length);
+ }else{
+ this.area_select(new_pos+char_left, 0);
+ }
+
+ }else{
+ view="top";
+ for(line_nb=0; line_nb< Math.min(this.last_selection["line_start"]+nbLineToScroll-1, lines.length, lines.length); line_nb++){
+ if(line_nb==this.last_selection["line_start"]-1)
+ char_left= this.last_selection["selectionStart"] -new_pos;
+ new_pos+= lines[line_nb].length + 1;
+ }
+ if(shift_pressed){
+ length=Math.abs(this.last_selection["selectionEnd"]-new_pos-char_left);
+ length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection["curr_pos"])- char_left-1;
+ //length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, char_left);
+ this.area_select(Math.min(this.last_selection["selectionEnd"], new_pos+char_left), length);
+ if(new_pos+char_left > this.last_selection["selectionEnd"])
+ view="bottom";
+ }else{
+ this.area_select(new_pos+char_left, 0);
+ }
+
+ }
+ }
+ //console.log( new_pos, char_left, length, nbLineToScroll, toScrollAmount, _$("result").clientHeigh );
+ this.check_line_selection();
+ this.scroll_to_view(view);
+ };
+
+ EditArea.prototype.start_resize= function(e){
+ parent.editAreaLoader.resize["id"] = editArea.id;
+ parent.editAreaLoader.resize["start_x"] = (e)? e.pageX : event.x + document.body.scrollLeft;
+ parent.editAreaLoader.resize["start_y"] = (e)? e.pageY : event.y + document.body.scrollTop;
+ if(editArea.isIE)
+ {
+ editArea.textarea.focus();
+ editArea.getIESelection();
+ }
+ parent.editAreaLoader.resize["selectionStart"] = editArea.textarea.selectionStart;
+ parent.editAreaLoader.resize["selectionEnd"] = editArea.textarea.selectionEnd;
+ parent.editAreaLoader.start_resize_area();
+ };
+
+ EditArea.prototype.toggle_full_screen= function(to){
+ var t=this, p=parent, a=t.textarea, html, frame, selStart, selEnd, old, icon;
+ if(typeof(to)=="undefined")
+ to= !t.fullscreen['isFull'];
+ old = t.fullscreen['isFull'];
+ t.fullscreen['isFull']= to;
+ icon = _$("fullscreen");
+ selStart = t.textarea.selectionStart;
+ selEnd = t.textarea.selectionEnd;
+ html = p.document.getElementsByTagName("html")[0];
+ frame = p.document.getElementById("frame_"+t.id);
+
+ if(to && to!=old)
+ { // toogle on fullscreen
+
+ t.fullscreen['old_overflow'] = p.get_css_property(html, "overflow");
+ t.fullscreen['old_height'] = p.get_css_property(html, "height");
+ t.fullscreen['old_width'] = p.get_css_property(html, "width");
+ t.fullscreen['old_scrollTop'] = html.scrollTop;
+ t.fullscreen['old_scrollLeft'] = html.scrollLeft;
+ t.fullscreen['old_zIndex'] = p.get_css_property(frame, "z-index");
+ if(t.isOpera){
+ html.style.height = "100%";
+ html.style.width = "100%";
+ }
+ html.style.overflow = "hidden";
+ html.scrollTop = 0;
+ html.scrollLeft = 0;
+
+ frame.style.position = "absolute";
+ frame.style.width = html.clientWidth+"px";
+ frame.style.height = html.clientHeight+"px";
+ frame.style.display = "block";
+ frame.style.zIndex = "999999";
+ frame.style.top = "0px";
+ frame.style.left = "0px";
+
+ // if the iframe was in a div with position absolute, the top and left are the one of the div,
+ // so I fix it by seeing at witch position the iframe start and correcting it
+ frame.style.top = "-"+p.calculeOffsetTop(frame)+"px";
+ frame.style.left = "-"+p.calculeOffsetLeft(frame)+"px";
+
+ // parent.editAreaLoader.execCommand(t.id, "update_size();");
+ // var body=parent.document.getElementsByTagName("body")[0];
+ // body.appendChild(frame);
+
+ t.switchClassSticky(icon, 'editAreaButtonSelected', false);
+ t.fullscreen['allow_resize']= t.resize_allowed;
+ t.allow_resize(false);
+
+ //t.area_select(selStart, selEnd-selStart);
+
+
+ // opera can't manage to do a direct size update
+ if(t.isFirefox){
+ p.editAreaLoader.execCommand(t.id, "update_size();");
+ t.area_select(selStart, selEnd-selStart);
+ t.scroll_to_view();
+ t.focus();
+ }else{
+ setTimeout("p.editAreaLoader.execCommand('"+ t.id +"', 'update_size();');editArea.focus();", 10);
+ }
+
+
+ }
+ else if(to!=old)
+ { // toogle off fullscreen
+ frame.style.position="static";
+ frame.style.zIndex= t.fullscreen['old_zIndex'];
+
+ if(t.isOpera)
+ {
+ html.style.height = "auto";
+ html.style.width = "auto";
+ html.style.overflow = "auto";
+ }
+ else if(t.isIE && p!=top)
+ { // IE doesn't manage html overflow in frames like in normal page...
+ html.style.overflow = "auto";
+ }
+ else
+ {
+ html.style.overflow = t.fullscreen['old_overflow'];
+ }
+ html.scrollTop = t.fullscreen['old_scrollTop'];
+ html.scrollLeft = t.fullscreen['old_scrollLeft'];
+
+ p.editAreaLoader.hide(t.id);
+ p.editAreaLoader.show(t.id);
+
+ t.switchClassSticky(icon, 'editAreaButtonNormal', false);
+ if(t.fullscreen['allow_resize'])
+ t.allow_resize(t.fullscreen['allow_resize']);
+ if(t.isFirefox){
+ t.area_select(selStart, selEnd-selStart);
+ setTimeout("editArea.scroll_to_view();", 10);
+ }
+
+ //p.editAreaLoader.remove_event(p.window, "resize", editArea.update_size);
+ }
+
+ };
+
+ EditArea.prototype.allow_resize= function(allow){
+ var resize= _$("resize_area");
+ if(allow){
+
+ resize.style.visibility="visible";
+ parent.editAreaLoader.add_event(resize, "mouseup", editArea.start_resize);
+ }else{
+ resize.style.visibility="hidden";
+ parent.editAreaLoader.remove_event(resize, "mouseup", editArea.start_resize);
+ }
+ this.resize_allowed= allow;
+ };
+
+
+ EditArea.prototype.change_syntax= function(new_syntax, is_waiting){
+ // alert("cahnge to "+new_syntax);
+ // the syntax is the same
+ if(new_syntax==this.settings['syntax'])
+ return true;
+
+ // check that the syntax is one allowed
+ var founded= false;
+ for(var i=0; i";
+ elem.innerHTML= "*"+ this.files[id]['title'] + close +"";
+ _$('tab_browsing_list').appendChild(elem);
+ var elem= document.createElement('text');
+ this.update_size();
+ }
+
+ // open file callback (for plugin)
+ if(id!="")
+ this.execCommand('file_open', this.files[id]);
+
+ this.switch_to_file(id, true);
+ return true;
+ }
+ else
+ return false;
+ };
+
+ // close the given file
+ EditArea.prototype.close_file= function(id){
+ if(this.files[id])
+ {
+ this.save_file(id);
+
+ // close file callback
+ if(this.execCommand('file_close', this.files[id])!==false)
+ {
+ // remove the tab in the toolbar
+ var li= _$(this.files[id]['html_id']);
+ li.parentNode.removeChild(li);
+ // select a new file
+ if(id== this.curr_file)
+ {
+ var next_file= "";
+ var is_next= false;
+ for(var i in this.files)
+ {
+ if( is_next )
+ {
+ next_file = i;
+ break;
+ }
+ else if( i == id )
+ is_next = true;
+ else
+ next_file = i;
+ }
+ // display the next file
+ this.switch_to_file(next_file);
+ }
+ // clear datas
+ delete (this.files[id]);
+ this.update_size();
+ }
+ }
+ };
+
+ // backup current file datas
+ EditArea.prototype.save_file= function(id){
+ var t= this, save, a_links, a_selects, save_butt, img, i;
+ if(t.files[id])
+ {
+ var save= t.files[id];
+ save['last_selection'] = t.last_selection;
+ save['last_text_to_highlight'] = t.last_text_to_highlight;
+ save['last_hightlighted_text'] = t.last_hightlighted_text;
+ save['previous'] = t.previous;
+ save['next'] = t.next;
+ save['last_undo'] = t.last_undo;
+ save['smooth_selection'] = t.smooth_selection;
+ save['do_highlight'] = t.do_highlight;
+ save['syntax'] = t.settings['syntax'];
+ save['text'] = t.textarea.value;
+ save['scroll_top'] = t.result.scrollTop;
+ save['scroll_left'] = t.result.scrollLeft;
+ save['selection_start'] = t.last_selection["selectionStart"];
+ save['selection_end'] = t.last_selection["selectionEnd"];
+ save['font_size'] = t.settings["font_size"];
+ save['font_family'] = t.settings["font_family"];
+ save['word_wrap'] = t.settings["word_wrap"];
+ save['toolbar'] = {'links':{}, 'selects': {}};
+
+ // save toolbar buttons state for fileSpecific buttons
+ a_links= _$("toolbar_1").getElementsByTagName("a");
+ for( i=0; i heavy CPU use)
+ ,min_width: 400
+ ,min_height: 125
+ ,replace_tab_by_spaces: false
+ ,allow_toggle: true // true or false
+ ,language: "en"
+ ,syntax: ""
+ ,syntax_selection_allow: "basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml"
+ ,display: "onload" // onload or later
+ ,max_undo: 30
+ ,browsers: "known" // all or known
+ ,plugins: "" // comma separated plugin list
+ ,gecko_spellcheck: false // enable/disable by default the gecko_spellcheck
+ ,fullscreen: false
+ ,is_editable: true
+ ,cursor_position: "begin"
+ ,word_wrap: false // define if the text is wrapped of not in the textarea
+ ,autocompletion: false // NOT IMPLEMENTED
+ ,load_callback: "" // click on load button (function name)
+ ,save_callback: "" // click on save button (function name)
+ ,change_callback: "" // textarea onchange trigger (function name)
+ ,submit_callback: "" // form submited (function name)
+ ,EA_init_callback: "" // EditArea initiliazed (function name)
+ ,EA_delete_callback: "" // EditArea deleted (function name)
+ ,EA_load_callback: "" // EditArea fully loaded and displayed (function name)
+ ,EA_unload_callback: "" // EditArea delete while being displayed (function name)
+ ,EA_toggle_on_callback: "" // EditArea toggled on (function name)
+ ,EA_toggle_off_callback: "" // EditArea toggled off (function name)
+ ,EA_file_switch_on_callback: "" // a new tab is selected (called for the newly selected file)
+ ,EA_file_switch_off_callback: "" // a new tab is selected (called for the previously selected file)
+ ,EA_file_close_callback: "" // close a tab
+ };
+
+ t.advanced_buttons = [
+ // id, button img, command (it will try to find the translation of "id"), is_file_specific
+ ['new_document', 'newdocument.gif', 'new_document', false],
+ ['search', 'search.gif', 'show_search', false],
+ ['go_to_line', 'go_to_line.gif', 'go_to_line', false],
+ ['undo', 'undo.gif', 'undo', true],
+ ['redo', 'redo.gif', 'redo', true],
+ ['change_smooth_selection', 'smooth_selection.gif', 'change_smooth_selection_mode', true],
+ ['reset_highlight', 'reset_highlight.gif', 'resync_highlight', true],
+ ['highlight', 'highlight.gif','change_highlight', true],
+ ['help', 'help.gif', 'show_help', false],
+ ['save', 'save.gif', 'save', false],
+ ['load', 'load.gif', 'load', false],
+ ['fullscreen', 'fullscreen.gif', 'toggle_full_screen', false],
+ ['word_wrap', 'word_wrap.gif', 'toggle_word_wrap', true],
+ ['autocompletion', 'autocompletion.gif', 'toggle_autocompletion', true]
+ ];
+
+ // navigator identification
+ t.set_browser_infos(t);
+
+ if(t.isIE>=6 || t.isGecko || ( t.isWebKit && !t.isSafari<3 ) || t.isOpera>=9 || t.isCamino )
+ t.isValidBrowser=true;
+ else
+ t.isValidBrowser=false;
+
+ t.set_base_url();
+
+ for(var i=0; i delete the previous one
+ if(editAreas[s["id"]])
+ t.delete_instance(s["id"]);
+
+ // init settings
+ for(i in t.default_settings){
+ if(typeof(s[i])=="undefined")
+ s[i]=t.default_settings[i];
+ }
+
+ if(s["browsers"]=="known" && t.isValidBrowser==false){
+ return;
+ }
+
+ if(s["begin_toolbar"].length>0)
+ s["toolbar"]= s["begin_toolbar"] +","+ s["toolbar"];
+ if(s["end_toolbar"].length>0)
+ s["toolbar"]= s["toolbar"] +","+ s["end_toolbar"];
+ s["tab_toolbar"]= s["toolbar"].replace(/ /g,"").split(",");
+
+ s["plugins"]= s["plugins"].replace(/ /g,"").split(",");
+ for(i=0; i0){
+ s["syntax"]=s["syntax"].toLowerCase();
+ t.load_script(t.baseURL + "reg_syntax/"+ s["syntax"] + ".js");
+ }
+ //alert(this.template);
+
+ editAreas[s["id"]]= {"settings": s};
+ editAreas[s["id"]]["displayed"]=false;
+ editAreas[s["id"]]["hidden"]=false;
+
+ //if(settings["display"]=="onload")
+ t.start(s["id"]);
+ },
+
+ // delete an instance of an EditArea
+ delete_instance : function(id){
+ var d=document,fs=window.frames,span,iframe;
+ editAreaLoader.execCommand(id, "EA_delete");
+ if(fs["frame_"+id] && fs["frame_"+id].editArea)
+ {
+ if(editAreas[id]["displayed"])
+ editAreaLoader.toggle(id, "off");
+ fs["frame_"+id].editArea.execCommand("EA_unload");
+ }
+
+ // remove toggle infos and debug textarea
+ span= d.getElementById("EditAreaArroundInfos_"+id);
+ if(span)
+ span.parentNode.removeChild(span);
+
+ // remove the iframe
+ iframe= d.getElementById("frame_"+id);
+ if(iframe){
+ iframe.parentNode.removeChild(iframe);
+ //delete iframe;
+ try {
+ delete fs["frame_"+id];
+ } catch (e) {// Do nothing
+ }
+ }
+
+ delete editAreas[id];
+ },
+
+
+ start : function(id){
+ var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;
+
+ // check that the window is loaded
+ if(t.win!="loaded"){
+ setTimeout("editAreaLoader.start('"+id+"');", 50);
+ return;
+ }
+
+ // check that all needed scripts are loaded
+ for( i in t.waiting_loading){
+ if(t.waiting_loading[i]!="loaded" && typeof(t.waiting_loading[i])!="function"){
+ setTimeout("editAreaLoader.start('"+id+"');", 50);
+ return;
+ }
+ }
+
+ // wait until language and syntax files are loaded
+ if(!t.lang[editAreas[id]["settings"]["language"]] || (editAreas[id]["settings"]["syntax"].length>0 && !t.load_syntax[editAreas[id]["settings"]["syntax"]]) ){
+ setTimeout("editAreaLoader.start('"+id+"');", 50);
+ return;
+ }
+ // init the regexp for syntax highlight
+ if(editAreas[id]["settings"]["syntax"].length>0)
+ t.init_syntax_regexp();
+
+
+ // display toggle option and debug area
+ if(!d.getElementById("EditAreaArroundInfos_"+id) && (editAreas[id]["settings"]["debug"] || editAreas[id]["settings"]["allow_toggle"]))
+ {
+ span= d.createElement("span");
+ span.id= "EditAreaArroundInfos_"+id;
+ if(editAreas[id]["settings"]["allow_toggle"]){
+ checked=(editAreas[id]["settings"]["display"]=="onload")?"checked='checked'":"";
+ html+="
";
+ html+="";
+ html+="
";
+ }
+ if(editAreas[id]["settings"]["debug"])
+ html+=" ";
+ html= t.translate(html, editAreas[id]["settings"]["language"]);
+ span.innerHTML= html;
+ father= d.getElementById(id).parentNode;
+ next= d.getElementById(id).nextSibling;
+ if(next==null)
+ father.appendChild(span);
+ else
+ father.insertBefore(span, next);
+ }
+
+ if(!editAreas[id]["initialized"])
+ {
+ t.execCommand(id, "EA_init"); // ini callback
+ if(editAreas[id]["settings"]["display"]=="later"){
+ editAreas[id]["initialized"]= true;
+ return;
+ }
+ }
+
+ if(t.isIE){ // launch IE selection checkup
+ t.init_ie_textarea(id);
+ }
+
+ // get toolbar content
+ area=editAreas[id];
+
+ for(i=0; i';
+ }
+
+ // add plugins scripts if not already loaded by the compressor (but need to load language in all the case)
+ for(i=0; i';
+ t.iframe_script+='';
+ }
+
+
+ // create css link for the iframe if the whole css text has not been already loaded by the compressor
+ if(!t.iframe_css){
+ t.iframe_css="";
+ }
+
+
+ // create template
+ template= t.template.replace(/\[__BASEURL__\]/g, t.baseURL);
+ template= template.replace("[__TOOLBAR__]",html_toolbar_content);
+
+
+ // fill template with good language sentences
+ template= t.translate(template, area["settings"]["language"], "template");
+
+ // add css_code
+ template= template.replace("[__CSSRULES__]", t.iframe_css);
+ // add js_code
+ template= template.replace("[__JSCODE__]", t.iframe_script);
+
+ // add version_code
+ template= template.replace("[__EA_VERSION__]", t.version);
+ //template=template.replace(/\{\$([^\}]+)\}/gm, this.traduc_template);
+
+ //editAreas[area["settings"]["id"]]["template"]= template;
+
+ area.textarea=d.getElementById(area["settings"]["id"]);
+ editAreas[area["settings"]["id"]]["textarea"]=area.textarea;
+
+ // if removing previous instances from DOM before (fix from Marcin)
+ if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined')
+ delete window.frames["frame_"+area["settings"]["id"]];
+
+ // insert template in the document after the textarea
+ father= area.textarea.parentNode;
+ /* var container= document.createElement("div");
+ container.id= "EditArea_frame_container_"+area["settings"]["id"];
+ */
+ content= d.createElement("iframe");
+ content.name= "frame_"+area["settings"]["id"];
+ content.id= "frame_"+area["settings"]["id"];
+ content.style.borderWidth= "0px";
+ setAttribute(content, "frameBorder", "0"); // IE
+ content.style.overflow="hidden";
+ content.style.display="none";
+
+
+ next= area.textarea.nextSibling;
+ if(next==null)
+ father.appendChild(content);
+ else
+ father.insertBefore(content, next) ;
+ f=window.frames["frame_"+area["settings"]["id"]];
+ f.document.open();
+ f.editAreas=editAreas;
+ f.area_id= area["settings"]["id"];
+ f.document.area_id= area["settings"]["id"];
+ f.document.write(template);
+ f.document.close();
+
+ // frame.editAreaLoader=this;
+ //editAreas[area["settings"]["id"]]["displayed"]=true;
+
+ },
+
+ toggle : function(id, toggle_to){
+
+ /* if((editAreas[id]["displayed"]==true && toggle_to!="on") || toggle_to=="off"){
+ this.toggle_off(id);
+ }else if((editAreas[id]["displayed"]==false && toggle_to!="off") || toggle_to=="on"){
+ this.toggle_on(id);
+ }*/
+ if(!toggle_to)
+ toggle_to= (editAreas[id]["displayed"]==true)?"off":"on";
+ if(editAreas[id]["displayed"]==true && toggle_to=="off"){
+ this.toggle_off(id);
+ }else if(editAreas[id]["displayed"]==false && toggle_to=="on"){
+ this.toggle_on(id);
+ }
+
+ return false;
+ },
+
+ // static function
+ toggle_off : function(id){
+ var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;
+ if(fs["frame_"+id])
+ {
+ f = fs["frame_"+id];
+ t = editAreas[id]["textarea"];
+ if(f.editArea.fullscreen['isFull'])
+ f.editArea.toggle_full_screen(false);
+ editAreas[id]["displayed"]=false;
+
+ // set wrap to off to keep same display mode (some browser get problem with this, so it need more complex operation
+ t.wrap = "off"; // for IE
+ setAttribute(t, "wrap", "off"); // for Firefox
+ parNod = t.parentNode;
+ nxtSib = t.nextSibling;
+ parNod.removeChild(t);
+ parNod.insertBefore(t, nxtSib);
+
+ // restore values
+ t.value= f.editArea.textarea.value;
+ selStart = f.editArea.last_selection["selectionStart"];
+ selEnd = f.editArea.last_selection["selectionEnd"];
+ scrollTop = f.document.getElementById("result").scrollTop;
+ scrollLeft = f.document.getElementById("result").scrollLeft;
+
+
+ document.getElementById("frame_"+id).style.display='none';
+
+ t.style.display="inline";
+
+ try{ // IE will give an error when trying to focus an invisible or disabled textarea
+ t.focus();
+ } catch(e){};
+ if(this.isIE){
+ t.selectionStart= selStart;
+ t.selectionEnd = selEnd;
+ t.focused = true;
+ set_IE_selection(t);
+ }else{
+ if(this.isOpera && this.isOpera < 9.6 ){ // Opera bug when moving selection start and selection end
+ t.setSelectionRange(0, 0);
+ }
+ try{
+ t.setSelectionRange(selStart, selEnd);
+ } catch(e) {};
+ }
+ t.scrollTop= scrollTop;
+ t.scrollLeft= scrollLeft;
+ f.editArea.execCommand("toggle_off");
+
+ }
+ },
+
+ // static function
+ toggle_on : function(id){
+ var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;
+
+ if(fs["frame_"+id])
+ {
+ f = fs["frame_"+id];
+ t = editAreas[id]["textarea"];
+ area= f.editArea;
+ area.textarea.value= t.value;
+
+ // store display values;
+ curPos = editAreas[id]["settings"]["cursor_position"];
+
+ if(t.use_last==true)
+ {
+ selStart = t.last_selectionStart;
+ selEnd = t.last_selectionEnd;
+ scrollTop = t.last_scrollTop;
+ scrollLeft = t.last_scrollLeft;
+ t.use_last=false;
+ }
+ else if( curPos == "auto" )
+ {
+ try{
+ selStart = t.selectionStart;
+ selEnd = t.selectionEnd;
+ scrollTop = t.scrollTop;
+ scrollLeft = t.scrollLeft;
+ //alert(scrollTop);
+ }catch(ex){}
+ }
+
+ // set to good size
+ this.set_editarea_size_from_textarea(id, document.getElementById("frame_"+id));
+ t.style.display="none";
+ document.getElementById("frame_"+id).style.display="inline";
+ area.execCommand("focus"); // without this focus opera doesn't manage well the iframe body height
+
+
+ // restore display values
+ editAreas[id]["displayed"]=true;
+ area.execCommand("update_size");
+
+ f.document.getElementById("result").scrollTop= scrollTop;
+ f.document.getElementById("result").scrollLeft= scrollLeft;
+ area.area_select(selStart, selEnd-selStart);
+ area.execCommand("toggle_on");
+
+
+ }
+ else
+ {
+ /* if(this.isIE)
+ get_IE_selection(document.getElementById(id)); */
+ elem= document.getElementById(id);
+ elem.last_selectionStart= elem.selectionStart;
+ elem.last_selectionEnd= elem.selectionEnd;
+ elem.last_scrollTop= elem.scrollTop;
+ elem.last_scrollLeft= elem.scrollLeft;
+ elem.use_last=true;
+ editAreaLoader.start(id);
+ }
+ },
+
+ set_editarea_size_from_textarea : function(id, frame){
+ var elem,width,height;
+ elem = document.getElementById(id);
+
+ width = Math.max(editAreas[id]["settings"]["min_width"], elem.offsetWidth)+"px";
+ height = Math.max(editAreas[id]["settings"]["min_height"], elem.offsetHeight)+"px";
+ if(elem.style.width.indexOf("%")!=-1)
+ width = elem.style.width;
+ if(elem.style.height.indexOf("%")!=-1)
+ height = elem.style.height;
+ //alert("h: "+height+" w: "+width);
+
+ frame.style.width= width;
+ frame.style.height= height;
+ },
+
+ set_base_url : function(){
+ var t=this,elems,i,docBasePath;
+
+ if( !this.baseURL ){
+ elems = document.getElementsByTagName('script');
+
+ for( i=0; i';
+ html += '';
+ return html;
+ },
+
+ get_control_html : function(button_name, lang) {
+ var t=this,i,but,html,si;
+ for (i=0; i";
+ case "|":
+ case "separator":
+ return '';
+ case "select_font":
+ html= "";
+ return html;
+ case "syntax_selection":
+ html= "";
+ return html;
+ }
+
+ return "["+button_name+"]";
+ },
+
+
+ get_template : function(){
+ if(this.template=="")
+ {
+ var xhr_object = null;
+ if(window.XMLHttpRequest) // Firefox
+ xhr_object = new XMLHttpRequest();
+ else if(window.ActiveXObject) // Internet Explorer
+ xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
+ else { // XMLHttpRequest not supported
+ alert("XMLHTTPRequest not supported. EditArea not loaded");
+ return;
+ }
+
+ xhr_object.open("GET", this.baseURL+"template.html", false);
+ xhr_object.send(null);
+ if(xhr_object.readyState == 4)
+ this.template=xhr_object.responseText;
+ else
+ this.has_error();
+ }
+ },
+
+ // translate text
+ translate : function(text, lang, mode){
+ if(mode=="word")
+ text=editAreaLoader.get_word_translation(text, lang);
+ else if(mode="template"){
+ editAreaLoader.current_language= lang;
+ text=text.replace(/\{\$([^\}]+)\}/gm, editAreaLoader.translate_template);
+ }
+ return text;
+ },
+
+ translate_template : function(){
+ return editAreaLoader.get_word_translation(EditAreaLoader.prototype.translate_template.arguments[1], editAreaLoader.current_language);
+ },
+
+ get_word_translation : function(val, lang){
+ var i;
+
+ for( i in editAreaLoader.lang[lang]){
+ if(i == val)
+ return editAreaLoader.lang[lang][i];
+ }
+ return "_"+val;
+ },
+
+ load_script : function(url){
+ var t=this,d=document,script,head;
+
+ if( t.loadedFiles[url] )
+ return;
+ //alert("load: "+url);
+ try{
+ script= d.createElement("script");
+ script.type= "text/javascript";
+ script.src= url;
+ script.charset= "UTF-8";
+ d.getElementsByTagName("head")[0].appendChild(script);
+ }catch(e){
+ d.write('');
+ }
+
+ t.loadedFiles[url] = true;
+ },
+
+ add_event : function(obj, name, handler) {
+ try{
+ if (obj.attachEvent) {
+ obj.attachEvent("on" + name, handler);
+ } else{
+ obj.addEventListener(name, handler, false);
+ }
+ }catch(e){}
+ },
+
+ remove_event : function(obj, name, handler){
+ try{
+ if (obj.detachEvent)
+ obj.detachEvent("on" + name, handler);
+ else
+ obj.removeEventListener(name, handler, false);
+ }catch(e){}
+ },
+
+
+ // reset all the editareas in the form that have been reseted
+ reset : function(e){
+ var formObj,is_child,i,x;
+
+ formObj = editAreaLoader.isIE ? window.event.srcElement : e.target;
+ if(formObj.tagName!='FORM')
+ formObj= formObj.form;
+
+ for( i in editAreas ){
+ is_child= false;
+ for( x=0;x old_sel["start"]) // if text was selected, cursor at the end
+ this.setSelectionRange(id, new_sel["end"], new_sel["end"]);
+ else // cursor in the middle
+ this.setSelectionRange(id, old_sel["start"]+open_tag.length, old_sel["start"]+open_tag.length);
+ },
+
+ // hide both EditArea and normal textarea
+ hide : function(id){
+ var fs= window.frames,d=document,t=this,scrollTop,scrollLeft,span;
+ if(d.getElementById(id) && !t.hidden[id])
+ {
+ t.hidden[id]= {};
+ t.hidden[id]["selectionRange"]= t.getSelectionRange(id);
+ if(d.getElementById(id).style.display!="none")
+ {
+ t.hidden[id]["scrollTop"]= d.getElementById(id).scrollTop;
+ t.hidden[id]["scrollLeft"]= d.getElementById(id).scrollLeft;
+ }
+
+ if(fs["frame_"+id])
+ {
+ t.hidden[id]["toggle"]= editAreas[id]["displayed"];
+
+ if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
+ scrollTop = fs["frame_"+ id].document.getElementById("result").scrollTop;
+ scrollLeft = fs["frame_"+ id].document.getElementById("result").scrollLeft;
+ }else{
+ scrollTop = d.getElementById(id).scrollTop;
+ scrollLeft = d.getElementById(id).scrollLeft;
+ }
+ t.hidden[id]["scrollTop"]= scrollTop;
+ t.hidden[id]["scrollLeft"]= scrollLeft;
+
+ if(editAreas[id]["displayed"]==true)
+ editAreaLoader.toggle_off(id);
+ }
+
+ // hide toggle button and debug box
+ span= d.getElementById("EditAreaArroundInfos_"+id);
+ if(span){
+ span.style.display='none';
+ }
+
+ // hide textarea
+ d.getElementById(id).style.display= "none";
+ }
+ },
+
+ // restore hidden EditArea and normal textarea
+ show : function(id){
+ var fs= window.frames,d=document,t=this,span;
+ if((elem=d.getElementById(id)) && t.hidden[id])
+ {
+ elem.style.display= "inline";
+ elem.scrollTop= t.hidden[id]["scrollTop"];
+ elem.scrollLeft= t.hidden[id]["scrollLeft"];
+ span= d.getElementById("EditAreaArroundInfos_"+id);
+ if(span){
+ span.style.display='inline';
+ }
+
+ if(fs["frame_"+id])
+ {
+
+ // restore toggle button and debug box
+
+
+ // restore textarea
+ elem.style.display= "inline";
+
+ // restore EditArea
+ if(t.hidden[id]["toggle"]==true)
+ editAreaLoader.toggle_on(id);
+
+ scrollTop = t.hidden[id]["scrollTop"];
+ scrollLeft = t.hidden[id]["scrollLeft"];
+
+ if(fs["frame_"+id] && editAreas[id]["displayed"]==true){
+ fs["frame_"+ id].document.getElementById("result").scrollTop = scrollTop;
+ fs["frame_"+ id].document.getElementById("result").scrollLeft = scrollLeft;
+ }else{
+ elem.scrollTop = scrollTop;
+ elem.scrollLeft = scrollLeft;
+ }
+
+ }
+ // restore selection
+ sel = t.hidden[id]["selectionRange"];
+ t.setSelectionRange(id, sel["start"], sel["end"]);
+ delete t.hidden[id];
+ }
+ },
+
+ // get the current file datas (for multi file editing mode)
+ getCurrentFile : function(id){
+ return this.execCommand(id, 'get_file', this.execCommand(id, 'curr_file'));
+ },
+
+ // get the given file datas (for multi file editing mode)
+ getFile : function(id, file_id){
+ return this.execCommand(id, 'get_file', file_id);
+ },
+
+ // get all the openned files datas (for multi file editing mode)
+ getAllFiles : function(id){
+ return this.execCommand(id, 'get_all_files()');
+ },
+
+ // open a file (for multi file editing mode)
+ openFile : function(id, file_infos){
+ return this.execCommand(id, 'open_file', file_infos);
+ },
+
+ // close the given file (for multi file editing mode)
+ closeFile : function(id, file_id){
+ return this.execCommand(id, 'close_file', file_id);
+ },
+
+ // close the given file (for multi file editing mode)
+ setFileEditedMode : function(id, file_id, to){
+ var reg1,reg2;
+ reg1 = new RegExp('\\\\', 'g');
+ reg2 = new RegExp('"', 'g');
+ return this.execCommand(id, 'set_file_edited_mode("'+ file_id.replace(reg1, '\\\\').replace(reg2, '\\"') +'", '+ to +')');
+ },
+
+
+ // allow to access to editarea functions and datas (for advanced users only)
+ execCommand : function(id, cmd, fct_param){
+ switch(cmd){
+ case "EA_init":
+ if(editAreas[id]['settings']["EA_init_callback"].length>0)
+ eval(editAreas[id]['settings']["EA_init_callback"]+"('"+ id +"');");
+ break;
+ case "EA_delete":
+ if(editAreas[id]['settings']["EA_delete_callback"].length>0)
+ eval(editAreas[id]['settings']["EA_delete_callback"]+"('"+ id +"');");
+ break;
+ case "EA_submit":
+ if(editAreas[id]['settings']["submit_callback"].length>0)
+ eval(editAreas[id]['settings']["submit_callback"]+"('"+ id +"');");
+ break;
+ }
+ if(window.frames["frame_"+id] && window.frames["frame_"+ id].editArea){
+ if(fct_param!=undefined)
+ return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +'(fct_param);');
+ else
+ return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +';');
+ }
+ return false;
+ }
+};
+
+ var editAreaLoader= new EditAreaLoader();
+ var editAreas= {};
+
diff --git a/addons/Core/edit_area/elements_functions.js b/addons/Core/edit_area/elements_functions.js
new file mode 100644
index 0000000..3426fd1
--- /dev/null
+++ b/addons/Core/edit_area/elements_functions.js
@@ -0,0 +1,333 @@
+/****
+ * 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;x0){
+ 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:
+ 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";
diff --git a/addons/Core/edit_area/highlight.js b/addons/Core/edit_area/highlight.js
new file mode 100644
index 0000000..fbfbc00
--- /dev/null
+++ b/addons/Core/edit_area/highlight.js
@@ -0,0 +1,391 @@
+ // 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(' 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(' 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( '', maxStartOffset ) );
+
+ // count the number of sub spans
+ nbSubSpanBefore = beginStr.substr( lastEndPos ).split('' ) + 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= "
" + hightlighted_text + "
";
+ else
+ new_Obj.innerHTML= ""+ hightlighted_text +"";
+
+ 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);
+ };
diff --git a/addons/Core/edit_area/images/autocompletion.gif b/addons/Core/edit_area/images/autocompletion.gif
new file mode 100644
index 0000000..f3dfc2e
Binary files /dev/null and b/addons/Core/edit_area/images/autocompletion.gif differ
diff --git a/addons/Core/edit_area/images/close.gif b/addons/Core/edit_area/images/close.gif
new file mode 100644
index 0000000..679ca2a
Binary files /dev/null and b/addons/Core/edit_area/images/close.gif differ
diff --git a/addons/Core/edit_area/images/fullscreen.gif b/addons/Core/edit_area/images/fullscreen.gif
new file mode 100644
index 0000000..66fa6d9
Binary files /dev/null and b/addons/Core/edit_area/images/fullscreen.gif differ
diff --git a/addons/Core/edit_area/images/go_to_line.gif b/addons/Core/edit_area/images/go_to_line.gif
new file mode 100644
index 0000000..06042ec
Binary files /dev/null and b/addons/Core/edit_area/images/go_to_line.gif differ
diff --git a/addons/Core/edit_area/images/help.gif b/addons/Core/edit_area/images/help.gif
new file mode 100644
index 0000000..51a1ee4
Binary files /dev/null and b/addons/Core/edit_area/images/help.gif differ
diff --git a/addons/Core/edit_area/images/highlight.gif b/addons/Core/edit_area/images/highlight.gif
new file mode 100644
index 0000000..16491f6
Binary files /dev/null and b/addons/Core/edit_area/images/highlight.gif differ
diff --git a/addons/Core/edit_area/images/load.gif b/addons/Core/edit_area/images/load.gif
new file mode 100644
index 0000000..461698f
Binary files /dev/null and b/addons/Core/edit_area/images/load.gif differ
diff --git a/addons/Core/edit_area/images/move.gif b/addons/Core/edit_area/images/move.gif
new file mode 100644
index 0000000..d15f9f5
Binary files /dev/null and b/addons/Core/edit_area/images/move.gif differ
diff --git a/addons/Core/edit_area/images/newdocument.gif b/addons/Core/edit_area/images/newdocument.gif
new file mode 100644
index 0000000..a9d2938
Binary files /dev/null and b/addons/Core/edit_area/images/newdocument.gif differ
diff --git a/addons/Core/edit_area/images/opacity.png b/addons/Core/edit_area/images/opacity.png
new file mode 100644
index 0000000..b4217cb
Binary files /dev/null and b/addons/Core/edit_area/images/opacity.png differ
diff --git a/addons/Core/edit_area/images/processing.gif b/addons/Core/edit_area/images/processing.gif
new file mode 100644
index 0000000..cce32f2
Binary files /dev/null and b/addons/Core/edit_area/images/processing.gif differ
diff --git a/addons/Core/edit_area/images/redo.gif b/addons/Core/edit_area/images/redo.gif
new file mode 100644
index 0000000..3af9069
Binary files /dev/null and b/addons/Core/edit_area/images/redo.gif differ
diff --git a/addons/Core/edit_area/images/reset_highlight.gif b/addons/Core/edit_area/images/reset_highlight.gif
new file mode 100644
index 0000000..0fa3cb7
Binary files /dev/null and b/addons/Core/edit_area/images/reset_highlight.gif differ
diff --git a/addons/Core/edit_area/images/save.gif b/addons/Core/edit_area/images/save.gif
new file mode 100644
index 0000000..2777beb
Binary files /dev/null and b/addons/Core/edit_area/images/save.gif differ
diff --git a/addons/Core/edit_area/images/search.gif b/addons/Core/edit_area/images/search.gif
new file mode 100644
index 0000000..cfe76b5
Binary files /dev/null and b/addons/Core/edit_area/images/search.gif differ
diff --git a/addons/Core/edit_area/images/smooth_selection.gif b/addons/Core/edit_area/images/smooth_selection.gif
new file mode 100644
index 0000000..8a532e5
Binary files /dev/null and b/addons/Core/edit_area/images/smooth_selection.gif differ
diff --git a/addons/Core/edit_area/images/spacer.gif b/addons/Core/edit_area/images/spacer.gif
new file mode 100644
index 0000000..3884865
Binary files /dev/null and b/addons/Core/edit_area/images/spacer.gif differ
diff --git a/addons/Core/edit_area/images/statusbar_resize.gif b/addons/Core/edit_area/images/statusbar_resize.gif
new file mode 100644
index 0000000..af89d80
Binary files /dev/null and b/addons/Core/edit_area/images/statusbar_resize.gif differ
diff --git a/addons/Core/edit_area/images/undo.gif b/addons/Core/edit_area/images/undo.gif
new file mode 100644
index 0000000..520796d
Binary files /dev/null and b/addons/Core/edit_area/images/undo.gif differ
diff --git a/addons/Core/edit_area/images/word_wrap.gif b/addons/Core/edit_area/images/word_wrap.gif
new file mode 100644
index 0000000..8f256cc
Binary files /dev/null and b/addons/Core/edit_area/images/word_wrap.gif differ
diff --git a/addons/Core/edit_area/keyboard.js b/addons/Core/edit_area/keyboard.js
new file mode 100644
index 0000000..71b3a7c
--- /dev/null
+++ b/addons/Core/edit_area/keyboard.js
@@ -0,0 +1,145 @@
+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));
+ }
+};
diff --git a/addons/Core/edit_area/langs/bg.js b/addons/Core/edit_area/langs/bg.js
new file mode 100644
index 0000000..d4cd77f
--- /dev/null
+++ b/addons/Core/edit_area/langs/bg.js
@@ -0,0 +1,73 @@
+/*
+ * 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: "Brainfuck",
+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: "ะะฐัะฒะพัะธ ัะฐะนะปะฐ"
+};
diff --git a/addons/Core/edit_area/langs/cs.js b/addons/Core/edit_area/langs/cs.js
new file mode 100644
index 0000000..d0dd55c
--- /dev/null
+++ b/addons/Core/edit_area/langs/cs.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/de.js b/addons/Core/edit_area/langs/de.js
new file mode 100644
index 0000000..251ac50
--- /dev/null
+++ b/addons/Core/edit_area/langs/de.js
@@ -0,0 +1,67 @@
+editAreaLoader.lang["de"]={
+new_document: "Neues Dokument",
+search_button: "Suchen und Ersetzen",
+search_command: "Weitersuchen / öffne Suchfeld",
+search: "Suchen",
+replace: "Ersetzen",
+replace_command: "Ersetzen / öffne Suchfeld",
+find_next: "Weitersuchen",
+replace_all: "Ersetze alle Treffer",
+reg_exp: "reguläre Ausdrücke",
+match_case: "passt auf den Begriff ",
+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öße--",
+go_to_line: "Gehe zu Zeile",
+go_to_line_prompt: "Gehe zu Zeilennummmer:",
+undo: "Rückgä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ücksetzen (falls mit Text nicht konform)",
+word_wrap: "Toggle word wrapping mode",
+help: "Info",
+save: "Speichern",
+load: "Öffnen",
+line_abbr: "Ln",
+char_abbr: "Ch",
+position: "Position",
+total: "Gesamt",
+close_popup: "Popup schließen",
+shortcuts: "Shortcuts",
+add_tab: "Tab zum Text hinzufügen",
+remove_tab: "Tab aus Text entfernen",
+about_notice: "Bemerkung: Syntax Highlighting ist nur fü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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/dk.js b/addons/Core/edit_area/langs/dk.js
new file mode 100644
index 0000000..8b3e7f6
--- /dev/null
+++ b/addons/Core/edit_area/langs/dk.js
@@ -0,0 +1,67 @@
+editAreaLoader.lang["dk"]={
+new_document: "nyt tomt dokument",
+search_button: "søg og erstat",
+search_command: "find næste / åben søgefelt",
+search: "søg",
+replace: "erstat",
+replace_command: "erstat / åben søgefelt",
+find_next: "find næste",
+replace_all: "erstat alle",
+reg_exp: "regular expressions",
+match_case: "forskel pรฅ store/små bogstaver ",
+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å til linie",
+go_to_line_prompt: "gรฅ til linienummer:",
+undo: "fortryd",
+redo: "gentag",
+change_smooth_selection: "slå display funktioner til/fra (smartere display men mere CPU krævende)",
+highlight: "slå 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øj tabulation til tekst",
+remove_tab: "fjern tabulation fra tekst",
+about_notice: "Husk: syntax highlight funktionen bør kun bruge til små tekster",
+toggle: "Slå 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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/en.js b/addons/Core/edit_area/langs/en.js
new file mode 100644
index 0000000..1ec2561
--- /dev/null
+++ b/addons/Core/edit_area/langs/en.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/eo.js b/addons/Core/edit_area/langs/eo.js
new file mode 100644
index 0000000..317ec07
--- /dev/null
+++ b/addons/Core/edit_area/langs/eo.js
@@ -0,0 +1,67 @@
+editAreaLoader.lang["eo"]={
+new_document: "nova dokumento (vakigas la enhavon)",
+search_button: "serĉi / anstataŭigi",
+search_command: "pluserĉi / malfermi la serĉo-fenestron",
+search: "serĉi",
+replace: "anstataŭigi",
+replace_command: "anstataŭigi / malfermi la serĉo-fenestron",
+find_next: "serĉi",
+replace_all: "anstataŭigi ĉion",
+reg_exp: "regula esprimo",
+match_case: "respekti la usklecon",
+not_found: "ne trovita.",
+occurrence_replaced: "anstataŭigoj plenumitaj.",
+search_field_empty: "La kampo estas malplena.",
+restart_search_at_begin: "Fino de teksto ĝisrirata, ĉu daŭrigi el la komenco?",
+move_popup: "movi la serĉ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 ŝarĝo de la ĉ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: "ŝarĝi",
+line_abbr: "Ln",
+char_abbr: "Sg",
+position: "Pozicio",
+total: "Sumo",
+close_popup: "fermi la ŝ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: "ŝ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: "Brainfuck",
+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"
+};
\ No newline at end of file
diff --git a/addons/Core/edit_area/langs/es.js b/addons/Core/edit_area/langs/es.js
new file mode 100644
index 0000000..736afde
--- /dev/null
+++ b/addons/Core/edit_area/langs/es.js
@@ -0,0 +1,64 @@
+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: "Brainfuck",
+syntax_sql: "SQL",
+syntax_ruby: "Ruby",
+syntax_coldfusion: "Coldfusion",
+syntax_java: "Java",
+close_tab: "Close file"
+};
diff --git a/addons/Core/edit_area/langs/fi.js b/addons/Core/edit_area/langs/fi.js
new file mode 100644
index 0000000..1ec4730
--- /dev/null
+++ b/addons/Core/edit_area/langs/fi.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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"
+};
\ No newline at end of file
diff --git a/addons/Core/edit_area/langs/fr.js b/addons/Core/edit_area/langs/fr.js
new file mode 100644
index 0000000..dcd6814
--- /dev/null
+++ b/addons/Core/edit_area/langs/fr.js
@@ -0,0 +1,67 @@
+editAreaLoader.lang["fr"]={
+new_document: "nouveau document (efface le contenu)",
+search_button: "rechercher / remplacer",
+search_command: "rechercher suivant / ouvrir la fenêtre de recherche",
+search: "rechercher",
+replace: "remplacer",
+replace_command: "remplacer / ouvrir la fenêtre de recherche",
+find_next: "rechercher",
+replace_all: "tout remplacer",
+reg_exp: "expr. régulière",
+match_case: "respecter la casse",
+not_found: "pas trouvé.",
+occurrence_replaced: "remplacements éffectués.",
+search_field_empty: "Le champ de recherche est vide.",
+restart_search_at_begin: "Fin du texte atteint, poursuite au début.",
+move_popup: "déplacer la fenêtre de recherche",
+font_size: "--Taille police--",
+go_to_line: "aller à la ligne",
+go_to_line_prompt: "aller a la ligne numero:",
+undo: "annuler",
+redo: "refaire",
+change_smooth_selection: "activer/désactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)",
+highlight: "activer/désactiver la coloration syntaxique",
+reset_highlight: "réinitialiser la coloration syntaxique (si désyncronisée du texte)",
+word_wrap: "activer/désactiver les retours à la ligne automatiques",
+help: "à 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évue que pour de courts textes.",
+toggle: "basculer l'éditeur",
+accesskey: "Accesskey",
+tab: "Tab",
+shift: "Maj",
+ctrl: "Ctrl",
+esc: "Esc",
+processing: "chargement...",
+fullscreen: "plein é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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/hr.js b/addons/Core/edit_area/langs/hr.js
new file mode 100644
index 0000000..7ee249f
--- /dev/null
+++ b/addons/Core/edit_area/langs/hr.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/it.js b/addons/Core/edit_area/langs/it.js
new file mode 100644
index 0000000..1fad6ae
--- /dev/null
+++ b/addons/Core/edit_area/langs/it.js
@@ -0,0 +1,67 @@
+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 ",
+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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/ja.js b/addons/Core/edit_area/langs/ja.js
new file mode 100644
index 0000000..e47521b
--- /dev/null
+++ b/addons/Core/edit_area/langs/ja.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/mk.js b/addons/Core/edit_area/langs/mk.js
new file mode 100644
index 0000000..a2d9d21
--- /dev/null
+++ b/addons/Core/edit_area/langs/mk.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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: "ะะทะฑะตัะธ ะดะฐัะพัะตะบะฐ"
+};
diff --git a/addons/Core/edit_area/langs/nl.js b/addons/Core/edit_area/langs/nl.js
new file mode 100644
index 0000000..59baed1
--- /dev/null
+++ b/addons/Core/edit_area/langs/nl.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/pl.js b/addons/Core/edit_area/langs/pl.js
new file mode 100644
index 0000000..d9c2fbf
--- /dev/null
+++ b/addons/Core/edit_area/langs/pl.js
@@ -0,0 +1,67 @@
+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 ",
+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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/pt.js b/addons/Core/edit_area/langs/pt.js
new file mode 100644
index 0000000..ba762a1
--- /dev/null
+++ b/addons/Core/edit_area/langs/pt.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/ru.js b/addons/Core/edit_area/langs/ru.js
new file mode 100644
index 0000000..bcb33e4
--- /dev/null
+++ b/addons/Core/edit_area/langs/ru.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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: "ะะฐะบัััั ัะฐะนะป"
+};
diff --git a/addons/Core/edit_area/langs/sk.js b/addons/Core/edit_area/langs/sk.js
new file mode 100644
index 0000000..93a3c16
--- /dev/null
+++ b/addons/Core/edit_area/langs/sk.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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"
+};
diff --git a/addons/Core/edit_area/langs/zh.js b/addons/Core/edit_area/langs/zh.js
new file mode 100644
index 0000000..48a6f9a
--- /dev/null
+++ b/addons/Core/edit_area/langs/zh.js
@@ -0,0 +1,67 @@
+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: "Brainfuck",
+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: "ๅ ณ้ญๆไปถ"
+};
diff --git a/addons/Core/edit_area/license_apache.txt b/addons/Core/edit_area/license_apache.txt
new file mode 100644
index 0000000..c7ef5e6
--- /dev/null
+++ b/addons/Core/edit_area/license_apache.txt
@@ -0,0 +1,7 @@
+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.
\ No newline at end of file
diff --git a/addons/Core/edit_area/license_bsd.txt b/addons/Core/edit_area/license_bsd.txt
new file mode 100644
index 0000000..f36bbe4
--- /dev/null
+++ b/addons/Core/edit_area/license_bsd.txt
@@ -0,0 +1,10 @@
+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.
\ No newline at end of file
diff --git a/addons/Core/edit_area/license_lgpl.txt b/addons/Core/edit_area/license_lgpl.txt
new file mode 100644
index 0000000..8c177f8
--- /dev/null
+++ b/addons/Core/edit_area/license_lgpl.txt
@@ -0,0 +1,458 @@
+ 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
diff --git a/addons/Core/edit_area/manage_area.js b/addons/Core/edit_area/manage_area.js
new file mode 100644
index 0000000..e10c5e9
--- /dev/null
+++ b/addons/Core/edit_area/manage_area.js
@@ -0,0 +1,623 @@
+ 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 = ''+ content.replace(/&/g,"&").replace(//g,">").replace("\r\r", '').replace("\r\r", '') +'';
+
+ if( this.isIE || ( this.isOpera && this.isOpera < 9.6 ) ) {
+ this.selection_field.innerHTML= "