├── .gitignore ├── edit_area ├── plugins │ ├── test │ │ ├── test2.js │ │ ├── css │ │ │ └── test.css │ │ ├── langs │ │ │ ├── zh.js │ │ │ ├── pl.js │ │ │ ├── cs.js │ │ │ ├── dk.js │ │ │ ├── en.js │ │ │ ├── es.js │ │ │ ├── hr.js │ │ │ ├── ja.js │ │ │ ├── mk.js │ │ │ ├── nl.js │ │ │ ├── pt.js │ │ │ ├── de.js │ │ │ ├── eo.js │ │ │ ├── fr.js │ │ │ ├── it.js │ │ │ ├── ru.js │ │ │ ├── sk.js │ │ │ └── bg.js │ │ ├── images │ │ │ └── test.gif │ │ └── test.js │ └── charmap │ │ ├── images │ │ └── charmap.gif │ │ ├── langs │ │ ├── zh.js │ │ ├── eo.js │ │ ├── cs.js │ │ ├── dk.js │ │ ├── en.js │ │ ├── es.js │ │ ├── ja.js │ │ ├── mk.js │ │ ├── pl.js │ │ ├── pt.js │ │ ├── sk.js │ │ ├── de.js │ │ ├── hr.js │ │ ├── it.js │ │ ├── nl.js │ │ ├── fr.js │ │ ├── ru.js │ │ └── bg.js │ │ ├── popup.html │ │ ├── css │ │ └── charmap.css │ │ ├── charmap.js │ │ └── jscripts │ │ └── map.js ├── images │ ├── help.gif │ ├── load.gif │ ├── move.gif │ ├── redo.gif │ ├── save.gif │ ├── undo.gif │ ├── close.gif │ ├── opacity.png │ ├── search.gif │ ├── spacer.gif │ ├── highlight.gif │ ├── word_wrap.gif │ ├── fullscreen.gif │ ├── go_to_line.gif │ ├── newdocument.gif │ ├── processing.gif │ ├── autocompletion.gif │ ├── reset_highlight.gif │ ├── smooth_selection.gif │ └── statusbar_resize.gif ├── autocompletion.js ├── edit_area_full.gz ├── license_apache.txt ├── reg_syntax │ ├── robotstxt.js │ ├── brainfuck.js │ ├── html.js │ ├── xml.js │ ├── c.js │ ├── java.js │ ├── ruby.js │ ├── cpp.js │ ├── vb.js │ ├── basic.js │ ├── perl.js │ ├── sql.js │ ├── pas.js │ ├── js.js │ ├── css.js │ ├── tsql.js │ ├── coldfusion.js │ ├── python.js │ └── php.js ├── langs │ ├── zh.js │ ├── ja.js │ ├── pt.js │ ├── en.js │ ├── hr.js │ ├── nl.js │ ├── pl.js │ ├── cs.js │ ├── fi.js │ ├── it.js │ ├── dk.js │ ├── sk.js │ ├── mk.js │ ├── ru.js │ ├── es.js │ ├── de.js │ ├── eo.js │ ├── bg.js │ └── fr.js ├── license_bsd.txt ├── resize_area.js ├── template.html ├── keyboard.js ├── regexp.js ├── search_replace.js ├── reg_syntax.js ├── elements_functions.js ├── edit_area.css └── edit_area_compressor.php ├── run.php ├── style.css └── index.php /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /edit_area/plugins/test/test2.js: -------------------------------------------------------------------------------- 1 | alert("test2.js is loaded from test plugin"); 2 | -------------------------------------------------------------------------------- /edit_area/plugins/test/css/test.css: -------------------------------------------------------------------------------- 1 | select#test_select{ 2 | background-color: #FF0000; 3 | } 4 | -------------------------------------------------------------------------------- /edit_area/images/help.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/help.gif -------------------------------------------------------------------------------- /edit_area/images/load.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/load.gif -------------------------------------------------------------------------------- /edit_area/images/move.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/move.gif -------------------------------------------------------------------------------- /edit_area/images/redo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/redo.gif -------------------------------------------------------------------------------- /edit_area/images/save.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/save.gif -------------------------------------------------------------------------------- /edit_area/images/undo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/undo.gif -------------------------------------------------------------------------------- /edit_area/autocompletion.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/autocompletion.js -------------------------------------------------------------------------------- /edit_area/edit_area_full.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/edit_area_full.gz -------------------------------------------------------------------------------- /edit_area/images/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/close.gif -------------------------------------------------------------------------------- /edit_area/images/opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/opacity.png -------------------------------------------------------------------------------- /edit_area/images/search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/search.gif -------------------------------------------------------------------------------- /edit_area/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/spacer.gif -------------------------------------------------------------------------------- /edit_area/images/highlight.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/highlight.gif -------------------------------------------------------------------------------- /edit_area/images/word_wrap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/word_wrap.gif -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/zh.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("zh",{ 2 | test_select: "选择标签", 3 | test_but: "测试按钮" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/images/fullscreen.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/fullscreen.gif -------------------------------------------------------------------------------- /edit_area/images/go_to_line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/go_to_line.gif -------------------------------------------------------------------------------- /edit_area/images/newdocument.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/newdocument.gif -------------------------------------------------------------------------------- /edit_area/images/processing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/processing.gif -------------------------------------------------------------------------------- /edit_area/images/autocompletion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/autocompletion.gif -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/pl.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("pl",{ 2 | test_select: "wybierz tag", 3 | test_but: "test" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/images/reset_highlight.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/reset_highlight.gif -------------------------------------------------------------------------------- /edit_area/images/smooth_selection.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/smooth_selection.gif -------------------------------------------------------------------------------- /edit_area/images/statusbar_resize.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/images/statusbar_resize.gif -------------------------------------------------------------------------------- /edit_area/plugins/test/images/test.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/plugins/test/images/test.gif -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/cs.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("cs",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/dk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("dk",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/en.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("en",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/es.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("es",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/hr.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("hr",{ 2 | test_select: "Odaberi tag", 3 | test_but: "Probna tipka" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/ja.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("ja",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/mk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("mk",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/nl.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("nl",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/pt.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("pt",{ 2 | test_select: "select tag", 3 | test_but: "test button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/de.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("de",{ 2 | test_select: "Tag auswählen", 3 | test_but: "Test Button" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/eo.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("eo",{ 2 | test_select:"elekto de marko", 3 | test_but: "provo-butono" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/fr.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("fr",{ 2 | test_select:"choix balise", 3 | test_but: "bouton de test" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/it.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("it",{ 2 | test_select: "seleziona tag", 3 | test_but: "pulsante di test" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/ru.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("ru",{ 2 | test_select: "выбрать тэг", 3 | test_but: "тестировать кнопку" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/sk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("sk",{ 2 | test_select: "vyber tag", 3 | test_but: "testovacie tlačidlo" 4 | }); 5 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/images/charmap.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loveyu/php_code_run/master/edit_area/plugins/charmap/images/charmap.gif -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/zh.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("zh",{ 2 | charmap_but: "软键盘", 3 | charmap_title: "软键盘", 4 | charmap_choose_block: "选择一个语言块", 5 | charmap_insert:"插入此字符" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/eo.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("eo",{ 2 | charmap_but: "Ekranklavaro", 3 | charmap_title: "Ekranklavaro", 4 | charmap_choose_block: "Elekto de lingvo", 5 | charmap_insert:"enmeti tiun signaron" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/cs.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("cs",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/dk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("dk",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/en.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("en",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/es.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("es",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/ja.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("ja",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/mk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("mkn",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/pl.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("pl",{ 2 | charmap_but: "Klawiatura ekranowa", 3 | charmap_title: "Klawiatura ekranowa", 4 | charmap_choose_block: "wybierz grupę znaków", 5 | charmap_insert:"wstaw ten znak" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/pt.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("pt",{ 2 | charmap_but: "Visual keyboard", 3 | charmap_title: "Visual keyboard", 4 | charmap_choose_block: "select language block", 5 | charmap_insert:"insert this character" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/sk.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("sk",{ 2 | charmap_but: "Vizuálna klávesnica", 3 | charmap_title: "Vizuálna klávesnica", 4 | charmap_choose_block: "vyber jazykový blok", 5 | charmap_insert: "vlož tento znak" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/de.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("de",{ 2 | charmap_but: "Sonderzeichen", 3 | charmap_title: "Sonderzeichen", 4 | charmap_choose_block: "Bereich auswählen", 5 | charmap_insert: "dieses Zeichen einfügen" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/hr.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("hr",{ 2 | charmap_but: "Virtualna tipkovnica", 3 | charmap_title: "Virtualna tipkovnica", 4 | charmap_choose_block: "Odaberi blok s jezikom", 5 | charmap_insert:"Ubaci taj znak" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/it.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("it",{ 2 | charmap_but: "Tastiera visuale", 3 | charmap_title: "Tastiera visuale", 4 | charmap_choose_block: "seleziona blocco", 5 | charmap_insert:"inserisci questo carattere" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/nl.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("nl",{ 2 | charmap_but: "Visueel toetsenbord", 3 | charmap_title: "Visueel toetsenbord", 4 | charmap_choose_block: "Kies een taal blok", 5 | charmap_insert:"Voeg dit symbool in" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/fr.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("fr",{ 2 | charmap_but: "Clavier visuel", 3 | charmap_title: "Clavier visuel", 4 | charmap_choose_block: "choix du language", 5 | charmap_insert:"insérer ce caractère" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/langs/ru.js: -------------------------------------------------------------------------------- 1 | editArea.add_lang("ru",{ 2 | charmap_but: "Визуальная клавиатура", 3 | charmap_title: "Визуальная клавиатура", 4 | charmap_choose_block: "выбрать языковой блок", 5 | charmap_insert:"вставить этот символ" 6 | }); 7 | -------------------------------------------------------------------------------- /edit_area/plugins/test/langs/bg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Bulgarian translation 3 | * Author: Valentin Hristov 4 | * Company: SOFTKIT Bulgarian 5 | * Site: http://www.softkit-bg.com 6 | */ 7 | editArea.add_lang("bg",{ 8 | test_select: "избери таг", 9 | test_but: "тествай копието" 10 | }); 11 | -------------------------------------------------------------------------------- /run.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {$charmap_title} 6 | 7 | 8 | 10 | 11 | 12 |
13 |
14 |

{$charmap_title}:

15 | 17 |
18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/brainfuck.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["brainfuck"] = { 2 | 'DISPLAY_NAME' : 'Brainfuck' 3 | ,'COMMENT_SINGLE' : {} 4 | ,'COMMENT_MULTI' : {} 5 | ,'QUOTEMARKS' : {} 6 | ,'KEYWORD_CASE_SENSITIVE' : true 7 | ,'OPERATORS' :[ 8 | '+', '-' 9 | ] 10 | ,'DELIMITERS' :[ 11 | '[', ']' 12 | ] 13 | ,'REGEXPS' : { 14 | 'bfispis' : { 15 | 'search' : '()(\\.)()' 16 | ,'class' : 'bfispis' 17 | ,'modifiers' : 'g' 18 | ,'execute' : 'before' 19 | } 20 | ,'bfupis' : { 21 | 'search' : '()(\\,)()' 22 | ,'class' : 'bfupis' 23 | ,'modifiers' : 'g' 24 | ,'execute' : 'before' 25 | } 26 | ,'bfmemory' : { 27 | 'search' : '()([<>])()' 28 | ,'class' : 'bfmemory' 29 | ,'modifiers' : 'g' 30 | ,'execute' : 'before' 31 | } 32 | } 33 | ,'STYLES' : { 34 | 'COMMENTS': 'color: #AAAAAA;' 35 | ,'QUOTESMARKS': 'color: #6381F8;' 36 | ,'OPERATORS' : 'color: #88AA00;' 37 | ,'DELIMITERS' : 'color: #00C138;' 38 | ,'REGEXPS' : { 39 | 'bfispis' : 'color: #EE0000;' 40 | ,'bfupis' : 'color: #4455ee;' 41 | ,'bfmemory' : 'color: #DD00DD;' 42 | } 43 | } 44 | }; 45 | 46 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/css/charmap.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background-color: #F0F0EE; 3 | font: 12px monospace, sans-serif; 4 | } 5 | 6 | select{ 7 | background-color: #F9F9F9; 8 | border: solid 1px #888888; 9 | } 10 | 11 | h1, h2, h3, h4, h5, h6{ 12 | margin: 0; 13 | padding: 0; 14 | color: #2B6FB6; 15 | } 16 | 17 | h1{ 18 | font-size: 1.5em; 19 | } 20 | 21 | div#char_list{ 22 | height: 200px; 23 | overflow: auto; 24 | padding: 1px; 25 | border: 1px solid #0A246A; 26 | background-color: #F9F9F9; 27 | clear: both; 28 | margin-top: 5px; 29 | } 30 | 31 | a.char{ 32 | display: block; 33 | float: left; 34 | width: 20px; 35 | height: 20px; 36 | line-height: 20px; 37 | margin: 1px; 38 | border: solid 1px #888888; 39 | text-align: center; 40 | cursor: pointer; 41 | } 42 | 43 | a.char:hover{ 44 | background-color: #CCCCCC; 45 | } 46 | 47 | .preview{ 48 | border: solid 1px #888888; 49 | width: 50px; 50 | padding: 2px 5px; 51 | height: 35px; 52 | line-height: 35px; 53 | text-align:center; 54 | background-color: #CCCCCC; 55 | font-size: 2em; 56 | float: right; 57 | font-weight: bold; 58 | margin: 0 0 5px 5px; 59 | } 60 | 61 | #preview_code{ 62 | font-size: 1.1em; 63 | width: 70px; 64 | } 65 | -------------------------------------------------------------------------------- /edit_area/langs/zh.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["zh"]={ 2 | new_document: "新建空白文档", 3 | search_button: "查找与替换", 4 | search_command: "查找下一个 / 打开查找框", 5 | search: "查找", 6 | replace: "替换", 7 | replace_command: "替换 / 打开查找框", 8 | find_next: "查找下一个", 9 | replace_all: "全部替换", 10 | reg_exp: "正则表达式", 11 | match_case: "匹配大小写", 12 | not_found: "未找到.", 13 | occurrence_replaced: "处被替换.", 14 | search_field_empty: "查找框没有内容", 15 | restart_search_at_begin: "已到到文档末尾. 从头重新查找.", 16 | move_popup: "移动查找对话框", 17 | font_size: "--字体大小--", 18 | go_to_line: "转到行", 19 | go_to_line_prompt: "转到行:", 20 | undo: "恢复", 21 | redo: "重做", 22 | change_smooth_selection: "启用/禁止一些显示特性(更好看但更耗费资源)", 23 | highlight: "启用/禁止语法高亮", 24 | reset_highlight: "重置语法高亮(当文本显示不同步时)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "关于", 27 | save: "保存", 28 | load: "加载", 29 | line_abbr: "行", 30 | char_abbr: "字符", 31 | position: "位置", 32 | total: "总计", 33 | close_popup: "关闭对话框", 34 | shortcuts: "快捷键", 35 | add_tab: "添加制表符(Tab)", 36 | remove_tab: "移除制表符(Tab)", 37 | about_notice: "注意:语法高亮功能仅用于较少内容的文本(文件内容太大会导致浏览器反应慢)", 38 | toggle: "切换编辑器", 39 | accesskey: "快捷键", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "正在处理中...", 45 | fullscreen: "全屏编辑", 46 | syntax_selection: "--语法--", 47 | close_tab: "关闭文件" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/html.js: -------------------------------------------------------------------------------- 1 | /* 2 | * last update: 2006-08-24 3 | */ 4 | 5 | editAreaLoader.load_syntax["html"] = { 6 | 'DISPLAY_NAME' : 'HTML' 7 | ,'COMMENT_SINGLE' : {} 8 | ,'COMMENT_MULTI' : {''} 9 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 10 | ,'KEYWORD_CASE_SENSITIVE' : false 11 | ,'KEYWORDS' : { 12 | } 13 | ,'OPERATORS' :[ 14 | ] 15 | ,'DELIMITERS' :[ 16 | ] 17 | ,'REGEXPS' : { 18 | 'doctype' : { 19 | 'search' : '()(]*>)()' 20 | ,'class' : 'doctype' 21 | ,'modifiers' : '' 22 | ,'execute' : 'before' // before or after 23 | } 24 | ,'tags' : { 25 | 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' 26 | ,'class' : 'tags' 27 | ,'modifiers' : 'gi' 28 | ,'execute' : 'before' // before or after 29 | } 30 | ,'attributes' : { 31 | 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' 32 | ,'class' : 'attributes' 33 | ,'modifiers' : 'g' 34 | ,'execute' : 'before' // before or after 35 | } 36 | } 37 | ,'STYLES' : { 38 | 'COMMENTS': 'color: #AAAAAA;' 39 | ,'QUOTESMARKS': 'color: #6381F8;' 40 | ,'KEYWORDS' : { 41 | } 42 | ,'OPERATORS' : 'color: #E775F0;' 43 | ,'DELIMITERS' : '' 44 | ,'REGEXPS' : { 45 | 'attributes': 'color: #B1AC41;' 46 | ,'tags': 'color: #E62253;' 47 | ,'doctype': 'color: #8DCFB5;' 48 | ,'test': 'color: #00FF00;' 49 | } 50 | } 51 | }; 52 | -------------------------------------------------------------------------------- /edit_area/langs/ja.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["ja"]={ 2 | new_document: "新規作成", 3 | search_button: "検索・置換", 4 | search_command: "次を検索 / 検索窓を表示", 5 | search: "検索", 6 | replace: "置換", 7 | replace_command: "置換 / 置換窓を表示", 8 | find_next: "次を検索", 9 | replace_all: "全置換", 10 | reg_exp: "正規表現", 11 | match_case: "大文字小文字の区別", 12 | not_found: "見つかりません。", 13 | occurrence_replaced: "置換しました。", 14 | search_field_empty: "検索対象文字列が空です。", 15 | restart_search_at_begin: "終端に達しました、始めに戻ります", 16 | move_popup: "検索窓を移動", 17 | font_size: "--フォントサイズ--", 18 | go_to_line: "指定行へ移動", 19 | go_to_line_prompt: "指定行へ移動します:", 20 | undo: "元に戻す", 21 | redo: "やり直し", 22 | change_smooth_selection: "スムース表示の切り替え(CPUを使います)", 23 | highlight: "構文強調表示の切り替え", 24 | reset_highlight: "構文強調表示のリセット", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "ヘルプを表示", 27 | save: "保存", 28 | load: "読み込み", 29 | line_abbr: "行", 30 | char_abbr: "文字", 31 | position: "位置", 32 | total: "合計", 33 | close_popup: "ポップアップを閉じる", 34 | shortcuts: "ショートカット", 35 | add_tab: "タブを挿入する", 36 | remove_tab: "タブを削除する", 37 | about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。", 38 | toggle: "テキストエリアとeditAreaの切り替え", 39 | accesskey: "アクセスキー", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "処理中です...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/xml.js: -------------------------------------------------------------------------------- 1 | /* 2 | * last update: 2006-08-24 3 | */ 4 | 5 | editAreaLoader.load_syntax["xml"] = { 6 | 'DISPLAY_NAME' : 'XML' 7 | ,'COMMENT_SINGLE' : {} 8 | ,'COMMENT_MULTI' : {''} 9 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 10 | ,'KEYWORD_CASE_SENSITIVE' : false 11 | ,'KEYWORDS' : { 12 | } 13 | ,'OPERATORS' :[ 14 | ] 15 | ,'DELIMITERS' :[ 16 | ] 17 | ,'REGEXPS' : { 18 | 'xml' : { 19 | 'search' : '()(<\\?[^>]*?\\?>)()' 20 | ,'class' : 'xml' 21 | ,'modifiers' : 'g' 22 | ,'execute' : 'before' // before or after 23 | } 24 | ,'cdatas' : { 25 | 'search' : '()()()' 26 | ,'class' : 'cdata' 27 | ,'modifiers' : 'g' 28 | ,'execute' : 'before' // before or after 29 | } 30 | ,'tags' : { 31 | 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' 32 | ,'class' : 'tags' 33 | ,'modifiers' : 'gi' 34 | ,'execute' : 'before' // before or after 35 | } 36 | ,'attributes' : { 37 | 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' 38 | ,'class' : 'attributes' 39 | ,'modifiers' : 'g' 40 | ,'execute' : 'before' // before or after 41 | } 42 | } 43 | ,'STYLES' : { 44 | 'COMMENTS': 'color: #AAAAAA;' 45 | ,'QUOTESMARKS': 'color: #6381F8;' 46 | ,'KEYWORDS' : { 47 | } 48 | ,'OPERATORS' : 'color: #E775F0;' 49 | ,'DELIMITERS' : '' 50 | ,'REGEXPS' : { 51 | 'attributes': 'color: #B1AC41;' 52 | ,'tags': 'color: #E62253;' 53 | ,'xml': 'color: #8DCFB5;' 54 | ,'cdata': 'color: #50B020;' 55 | } 56 | } 57 | }; 58 | -------------------------------------------------------------------------------- /edit_area/license_bsd.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008, Christophe Dolivet 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | * 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. 8 | * 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. 9 | 10 | 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. -------------------------------------------------------------------------------- /edit_area/langs/pt.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["pt"]={ 2 | new_document: "Novo documento", 3 | search_button: "Localizar e substituir", 4 | search_command: "Localizar próximo", 5 | search: "Localizar", 6 | replace: "Substituir", 7 | replace_command: "Substituir", 8 | find_next: "Localizar", 9 | replace_all: "Subst. tudo", 10 | reg_exp: "Expressões regulares", 11 | match_case: "Diferenciar maiúsculas e minúsculas", 12 | not_found: "Não encontrado.", 13 | occurrence_replaced: "Ocorrências substituidas", 14 | search_field_empty: "Campo localizar vazio.", 15 | restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.", 16 | move_popup: "Mover janela", 17 | font_size: "--Tamanho da fonte--", 18 | go_to_line: "Ir para linha", 19 | go_to_line_prompt: "Ir para a linha:", 20 | undo: "Desfazer", 21 | redo: "Refazer", 22 | change_smooth_selection: "Opções visuais", 23 | highlight: "Cores de sintaxe", 24 | reset_highlight: "Resetar cores (se não sincronizado)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "Sobre", 27 | save: "Salvar", 28 | load: "Carregar", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Posição", 32 | total: "Total", 33 | close_popup: "Fechar", 34 | shortcuts: "Shortcuts", 35 | add_tab: "Adicionar tabulação", 36 | remove_tab: "Remover tabulação", 37 | about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos", 38 | toggle: "Exibir editor", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Processando...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/en.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["en"]={ 2 | new_document: "new empty document", 3 | search_button: "search and replace", 4 | search_command: "search next / open search area", 5 | search: "search", 6 | replace: "replace", 7 | replace_command: "replace / open search area", 8 | find_next: "find next", 9 | replace_all: "replace all", 10 | reg_exp: "regular expressions", 11 | match_case: "match case", 12 | not_found: "not found.", 13 | occurrence_replaced: "occurences replaced.", 14 | search_field_empty: "Search field empty", 15 | restart_search_at_begin: "End of area reached. Restart at begin.", 16 | move_popup: "move search popup", 17 | font_size: "--Font size--", 18 | go_to_line: "go to line", 19 | go_to_line_prompt: "go to line number:", 20 | undo: "undo", 21 | redo: "redo", 22 | change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)", 23 | highlight: "toggle syntax highlight on/off", 24 | reset_highlight: "reset highlight (if desyncronized from text)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "about", 27 | save: "save", 28 | load: "load", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Position", 32 | total: "Total", 33 | close_popup: "close popup", 34 | shortcuts: "Shortcuts", 35 | add_tab: "add tabulation to text", 36 | remove_tab: "remove tabulation to text", 37 | about_notice: "Notice: syntax highlight function is only for small text", 38 | toggle: "Toggle editor", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Processing...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/hr.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["hr"]={ 2 | new_document: "Novi dokument", 3 | search_button: "Traži i izmijeni", 4 | search_command: "Traži dalje / Otvori prozor za traženje", 5 | search: "Traži", 6 | replace: "Izmijeni", 7 | replace_command: "Izmijeni / Otvori prozor za traženje", 8 | find_next: "Traži dalje", 9 | replace_all: "Izmjeni sve", 10 | reg_exp: "Regularni izrazi", 11 | match_case: "Bitna vel. slova", 12 | not_found: "nije naðeno.", 13 | occurrence_replaced: "izmjenjenih.", 14 | search_field_empty: "Prazno polje za traženje!", 15 | restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.", 16 | move_popup: "Pomakni prozor", 17 | font_size: "--Velièina teksta--", 18 | go_to_line: "Odi na redak", 19 | go_to_line_prompt: "Odi na redak:", 20 | undo: "Vrati natrag", 21 | redo: "Napravi ponovo", 22 | change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)", 23 | highlight: "Ukljuèi/iskljuèi bojanje sintakse", 24 | reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "O edit_area", 27 | save: "Spremi", 28 | load: "Uèitaj", 29 | line_abbr: "Ln", 30 | char_abbr: "Zn", 31 | position: "Pozicija", 32 | total: "Ukupno", 33 | close_popup: "Zatvori prozor", 34 | shortcuts: "Kratice", 35 | add_tab: "Dodaj tabulaciju", 36 | remove_tab: "Makni tabulaciju", 37 | about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove", 38 | toggle: "Prebaci naèin ureðivanja", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Procesiram...", 45 | fullscreen: "Cijeli prozor", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/nl.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["nl"]={ 2 | new_document: "nieuw leeg document", 3 | search_button: "zoek en vervang", 4 | search_command: "zoek volgende / zoekscherm openen", 5 | search: "zoek", 6 | replace: "vervang", 7 | replace_command: "vervang / zoekscherm openen", 8 | find_next: "volgende vinden", 9 | replace_all: "alles vervangen", 10 | reg_exp: "reguliere expressies", 11 | match_case: "hoofdletter gevoelig", 12 | not_found: "niet gevonden.", 13 | occurrence_replaced: "object vervangen.", 14 | search_field_empty: "Zoek veld leeg", 15 | restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw", 16 | move_popup: "versleep zoek scherm", 17 | font_size: "--Letter grootte--", 18 | go_to_line: "Ga naar regel", 19 | go_to_line_prompt: "Ga naar regel nummer:", 20 | undo: "Ongedaan maken", 21 | redo: "Opnieuw doen", 22 | change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)", 23 | highlight: "zet syntax highlight aan/uit", 24 | reset_highlight: "reset highlight (indien gedesynchronizeerd)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "informatie", 27 | save: "opslaan", 28 | load: "laden", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Positie", 32 | total: "Totaal", 33 | close_popup: "Popup sluiten", 34 | shortcuts: "Snelkoppelingen", 35 | add_tab: "voeg tabs toe in tekst", 36 | remove_tab: "verwijder tabs uit tekst", 37 | about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst", 38 | toggle: "geavanceerde bewerkingsopties", 39 | accesskey: "Accessknop", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Verwerken...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/pl.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["pl"]={ 2 | new_document: "nowy dokument", 3 | search_button: "znajdź i zamień", 4 | search_command: "znajdź następny", 5 | search: "znajdź", 6 | replace: "zamień", 7 | replace_command: "zamień", 8 | find_next: "następny", 9 | replace_all: "zamień wszystko", 10 | reg_exp: "wyrażenie regularne", 11 | match_case: "uwzględnij wielkość liter
", 12 | not_found: "nie znaleziono.", 13 | occurrence_replaced: "wystąpień zamieniono.", 14 | search_field_empty: "Nie wprowadzono tekstu", 15 | restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.", 16 | move_popup: "przesuń okienko wyszukiwania", 17 | font_size: "Rozmiar", 18 | go_to_line: "idź do linii", 19 | go_to_line_prompt: "numer linii:", 20 | undo: "cofnij", 21 | redo: "przywróć", 22 | change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)", 23 | highlight: "włącz/wyłącz podświetlanie składni", 24 | reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "o programie", 27 | save: "zapisz", 28 | load: "otwórz", 29 | line_abbr: "Ln", 30 | char_abbr: "Zn", 31 | position: "Pozycja", 32 | total: "W sumie", 33 | close_popup: "zamknij okienko", 34 | shortcuts: "Skróty klawiaturowe", 35 | add_tab: "dodaj wcięcie do zaznaczonego tekstu", 36 | remove_tab: "usuń wcięcie", 37 | about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów", 38 | toggle: "Włącz/wyłącz edytor", 39 | accesskey: "Alt+", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Przetwarzanie...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/cs.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["cs"]={ 2 | new_document: "Nový dokument", 3 | search_button: "Najdi a nahraď", 4 | search_command: "Hledej další / otevři vyhledávací pole", 5 | search: "Hledej", 6 | replace: "Nahraď", 7 | replace_command: "Nahraď / otevři vyhledávací pole", 8 | find_next: "Najdi další", 9 | replace_all: "Nahraď vše", 10 | reg_exp: "platné výrazy", 11 | match_case: "vyhodnocené výrazy", 12 | not_found: "nenalezené.", 13 | occurrence_replaced: "výskyty nahrazené.", 14 | search_field_empty: "Pole vyhledávání je prázdné", 15 | restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.", 16 | move_popup: "Přesuň vyhledávací okno", 17 | font_size: "--Velikost textu--", 18 | go_to_line: "Přejdi na řádek", 19 | go_to_line_prompt: "Přejdi na řádek:", 20 | undo: "krok zpět", 21 | redo: "znovu", 22 | change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)", 23 | highlight: "Zvýrazňování syntaxe zap./vyp.", 24 | reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "O programu", 27 | save: "Uložit", 28 | load: "Otevřít", 29 | line_abbr: "Ř.", 30 | char_abbr: "S.", 31 | position: "Pozice", 32 | total: "Celkem", 33 | close_popup: "Zavřít okno", 34 | shortcuts: "Zkratky", 35 | add_tab: "Přidat tabulování textu", 36 | remove_tab: "Odtsranit tabulování textu", 37 | about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text", 38 | toggle: "Přepnout editor", 39 | accesskey: "Přístupová klávesa", 40 | tab: "Záložka", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Zpracovávám ...", 45 | fullscreen: "Celá obrazovka", 46 | syntax_selection: "--vyber zvýrazňovač--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/fi.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["fi"]={ 2 | new_document: "uusi tyhjä dokumentti", 3 | search_button: "etsi ja korvaa", 4 | search_command: "etsi seuraava / avaa etsintävalikko", 5 | search: "etsi", 6 | replace: "korvaa", 7 | replace_command: "korvaa / avaa etsintävalikko", 8 | find_next: "etsi seuraava", 9 | replace_all: "korvaa kaikki", 10 | reg_exp: "säännölliset lausekkeet", 11 | match_case: "täsmää kirjainkokoon", 12 | not_found: "ei löytynyt.", 13 | occurrence_replaced: "esiintymää korvattu.", 14 | search_field_empty: "Haettava merkkijono on tyhjä", 15 | restart_search_at_begin: "Alueen loppu saavutettiin. Aloitetaan alusta.", 16 | move_popup: "siirrä etsintävalikkoa", 17 | font_size: "--Fontin koko--", 18 | go_to_line: "siirry riville", 19 | go_to_line_prompt: "mene riville:", 20 | undo: "peruuta", 21 | redo: "tee uudelleen", 22 | change_smooth_selection: "kytke/sammuta joitakin näyttötoimintoja (Älykkäämpi toiminta, mutta suurempi CPU kuormitus)", 23 | highlight: "kytke syntaksikorostus päälle/pois", 24 | reset_highlight: "resetoi syntaksikorostus (jos teksti ei ole synkassa korostuksen kanssa)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "tietoja", 27 | save: "tallenna", 28 | load: "lataa", 29 | line_abbr: "Rv", 30 | char_abbr: "Pos", 31 | position: "Paikka", 32 | total: "Yhteensä", 33 | close_popup: "sulje valikko", 34 | shortcuts: "Pikatoiminnot", 35 | add_tab: "lisää sisennys tekstiin", 36 | remove_tab: "poista sisennys tekstistä", 37 | about_notice: "Huomautus: syntaksinkorostus toimii vain pienelle tekstille", 38 | toggle: "Kytke editori", 39 | accesskey: "Pikanäppäin", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Odota...", 45 | fullscreen: "koko ruutu", 46 | syntax_selection: "--Syntaksi--", 47 | close_tab: "Sulje tiedosto" 48 | }; -------------------------------------------------------------------------------- /edit_area/langs/it.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["it"]={ 2 | new_document: "nuovo documento vuoto", 3 | search_button: "cerca e sostituisci", 4 | search_command: "trova successivo / apri finestra di ricerca", 5 | search: "cerca", 6 | replace: "sostituisci", 7 | replace_command: "sostituisci / apri finestra di ricerca", 8 | find_next: "trova successivo", 9 | replace_all: "sostituisci tutti", 10 | reg_exp: "espressioni regolari", 11 | match_case: "confronta maiuscole/minuscole
", 12 | not_found: "non trovato.", 13 | occurrence_replaced: "occorrenze sostituite.", 14 | search_field_empty: "Campo ricerca vuoto", 15 | restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.", 16 | move_popup: "sposta popup di ricerca", 17 | font_size: "-- Dimensione --", 18 | go_to_line: "vai alla linea", 19 | go_to_line_prompt: "vai alla linea numero:", 20 | undo: "annulla", 21 | redo: "ripeti", 22 | change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione", 23 | highlight: "abilita/disabilita colorazione della sintassi", 24 | reset_highlight: "aggiorna colorazione (se non sincronizzata)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "informazioni su...", 27 | save: "salva", 28 | load: "carica", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Posizione", 32 | total: "Totale", 33 | close_popup: "chiudi popup", 34 | shortcuts: "Scorciatoie", 35 | add_tab: "aggiungi tabulazione", 36 | remove_tab: "rimuovi tabulazione", 37 | about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo", 38 | toggle: "Abilita/disabilita editor", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "In corso...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/dk.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["dk"]={ 2 | new_document: "nyt tomt dokument", 3 | search_button: "søg og erstat", 4 | search_command: "find næste / åben søgefelt", 5 | search: "søg", 6 | replace: "erstat", 7 | replace_command: "erstat / åben søgefelt", 8 | find_next: "find næste", 9 | replace_all: "erstat alle", 10 | reg_exp: "regular expressions", 11 | match_case: "forskel på store/små bogstaver
", 12 | not_found: "not found.", 13 | occurrence_replaced: "occurences replaced.", 14 | search_field_empty: "Search field empty", 15 | restart_search_at_begin: "End of area reached. Restart at begin.", 16 | move_popup: "flyt søgepopup", 17 | font_size: "--Skriftstørrelse--", 18 | go_to_line: "gå til linie", 19 | go_to_line_prompt: "gå til linienummer:", 20 | undo: "fortryd", 21 | redo: "gentag", 22 | change_smooth_selection: "slå display funktioner til/fra (smartere display men mere CPU krævende)", 23 | highlight: "slå syntax highlight til/fra", 24 | reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "om", 27 | save: "gem", 28 | load: "hent", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Position", 32 | total: "Total", 33 | close_popup: "luk popup", 34 | shortcuts: "Genveje", 35 | add_tab: "tilføj tabulation til tekst", 36 | remove_tab: "fjern tabulation fra tekst", 37 | about_notice: "Husk: syntax highlight funktionen bør kun bruge til små tekster", 38 | toggle: "Slå editor til / fra", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Skift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Processing...", 45 | fullscreen: "fullscreen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/sk.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["sk"]={ 2 | new_document: "nový prázdy dokument", 3 | search_button: "vyhľadaj a nahraď", 4 | search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole", 5 | search: "hľadaj", 6 | replace: "nahraď", 7 | replace_command: "nahraď / otvor vyhľadávacie pole", 8 | find_next: "nájdi ďalšie", 9 | replace_all: "nahraď všetko", 10 | reg_exp: "platné výrazy", 11 | match_case: "zhodujúce sa výrazy", 12 | not_found: "nenájdené.", 13 | occurrence_replaced: "výskyty nahradené.", 14 | search_field_empty: "Pole vyhľadávanie je prádzne", 15 | restart_search_at_begin: "End of area reached. Restart at begin.", 16 | move_popup: "presuň vyhľadávacie okno", 17 | font_size: "--Veľkosť textu--", 18 | go_to_line: "prejdi na riadok", 19 | go_to_line_prompt: "prejdi na riadok:", 20 | undo: "krok späť", 21 | redo: "prepracovať", 22 | change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje väčšie zaťaženie procesora CPU)", 23 | highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp", 24 | reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "o programe", 27 | save: "uložiť", 28 | load: "načítať", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Pozícia", 32 | total: "Spolu", 33 | close_popup: "zavrieť okno", 34 | shortcuts: "Skratky", 35 | add_tab: "pridať tabulovanie textu", 36 | remove_tab: "odstrániť tabulovanie textu", 37 | about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text", 38 | toggle: "Prepnúť editor", 39 | accesskey: "Accesskey", 40 | tab: "Záložka", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Spracúvam...", 45 | fullscreen: "cel=a obrazovka", 46 | syntax_selection: "--Vyber Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/mk.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["mk"]={ 2 | new_document: "Нов документ", 3 | search_button: "Најди и замени", 4 | search_command: "Барај следно / Отвори нов прозорец за пребарување", 5 | search: "Барај", 6 | replace: "Замени", 7 | replace_command: "Замени / Отвори прозорец за пребарување", 8 | find_next: "најди следно", 9 | replace_all: "Замени ги сите", 10 | reg_exp: "Регуларни изрази", 11 | match_case: "Битна е големината на буквите", 12 | not_found: "не е пронајдено.", 13 | occurrence_replaced: "замени.", 14 | search_field_empty: "Полето за пребарување е празно", 15 | restart_search_at_begin: "Крај на областа. Стартувај од почеток.", 16 | move_popup: "Помести го прозорецот", 17 | font_size: "--Големина на текстот--", 18 | go_to_line: "Оди на линија", 19 | go_to_line_prompt: "Оди на линија со број:", 20 | undo: "Врати", 21 | redo: "Повтори", 22 | change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)", 23 | highlight: "Вклучи/исклучи осветлување на синтакса", 24 | reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "За", 27 | save: "Зачувај", 28 | load: "Вчитај", 29 | line_abbr: "Лн", 30 | char_abbr: "Зн", 31 | position: "Позиција", 32 | total: "Вкупно", 33 | close_popup: "Затвори го прозорецот", 34 | shortcuts: "Кратенки", 35 | add_tab: "Додај табулација на текстот", 36 | remove_tab: "Отстрани ја табулацијата", 37 | about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст", 38 | toggle: "Смени начин на уредување", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Обработувам...", 45 | fullscreen: "Цел прозорец", 46 | syntax_selection: "--Синтакса--", 47 | close_tab: "Избери датотека" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/ru.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["ru"]={ 2 | new_document: "новый пустой документ", 3 | search_button: "поиск и замена", 4 | search_command: "искать следующий / открыть панель поиска", 5 | search: "поиск", 6 | replace: "замена", 7 | replace_command: "заменить / открыть панель поиска", 8 | find_next: "найти следующее", 9 | replace_all: "заменить все", 10 | reg_exp: "регулярное выражение", 11 | match_case: "учитывать регистр", 12 | not_found: "не найдено.", 13 | occurrence_replaced: "вхождение заменено.", 14 | search_field_empty: "Поле поиска пустое", 15 | restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.", 16 | move_popup: "переместить окно поиска", 17 | font_size: "--Размер шрифта--", 18 | go_to_line: "перейти к строке", 19 | go_to_line_prompt: "перейти к строке номер:", 20 | undo: "отменить", 21 | redo: "вернуть", 22 | change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)", 23 | highlight: "переключить подсветку синтаксиса включена/выключена", 24 | reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "о программе", 27 | save: "сохранить", 28 | load: "загрузить", 29 | line_abbr: "Стр", 30 | char_abbr: "Стлб", 31 | position: "Позиция", 32 | total: "Всего", 33 | close_popup: "закрыть всплывающее окно", 34 | shortcuts: "Горячие клавиши", 35 | add_tab: "добавить табуляцию в текст", 36 | remove_tab: "убрать табуляцию из текста", 37 | about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов", 38 | toggle: "Переключить редактор", 39 | accesskey: "Горячая клавиша", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Обработка...", 45 | fullscreen: "полный экран", 46 | syntax_selection: "--Синтакс--", 47 | close_tab: "Закрыть файл" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/c.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["c"] = { 2 | 'DISPLAY_NAME' : 'C' 3 | ,'COMMENT_SINGLE' : {1 : '//'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : true 7 | ,'KEYWORDS' : { 8 | 'constants' : [ 9 | 'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true' 10 | ] 11 | ,'types' : [ 12 | 'FILE', 'auto', 'char', 'const', 'double', 13 | 'extern', 'float', 'inline', 'int', 'long', 'register', 14 | 'short', 'signed', 'size_t', 'static', 'struct', 15 | 'time_t', 'typedef', 'union', 'unsigned', 'void', 16 | 'volatile' 17 | ] 18 | ,'statements' : [ 19 | 'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof', 20 | 'switch', 'while' 21 | ] 22 | ,'keywords' : [ 23 | 'break', 'case', 'continue', 'default', 'delete', 24 | 'return' 25 | ] 26 | } 27 | ,'OPERATORS' :[ 28 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' 29 | ] 30 | ,'DELIMITERS' :[ 31 | '(', ')', '[', ']', '{', '}' 32 | ] 33 | ,'REGEXPS' : { 34 | 'precompiler' : { 35 | 'search' : '()(#[^\r\n]*)()' 36 | ,'class' : 'precompiler' 37 | ,'modifiers' : 'g' 38 | ,'execute' : 'before' 39 | } 40 | /* ,'precompilerstring' : { 41 | 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])' 42 | ,'class' : 'precompilerstring' 43 | ,'modifiers' : 'g' 44 | ,'execute' : 'before' 45 | }*/ 46 | } 47 | ,'STYLES' : { 48 | 'COMMENTS': 'color: #AAAAAA;' 49 | ,'QUOTESMARKS': 'color: #6381F8;' 50 | ,'KEYWORDS' : { 51 | 'constants' : 'color: #EE0000;' 52 | ,'types' : 'color: #0000EE;' 53 | ,'statements' : 'color: #60CA00;' 54 | ,'keywords' : 'color: #48BDDF;' 55 | } 56 | ,'OPERATORS' : 'color: #FF00FF;' 57 | ,'DELIMITERS' : 'color: #0038E1;' 58 | ,'REGEXPS' : { 59 | 'precompiler' : 'color: #009900;' 60 | ,'precompilerstring' : 'color: #994400;' 61 | } 62 | } 63 | }; 64 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/java.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["java"] = { 2 | 'DISPLAY_NAME' : 'Java' 3 | ,'COMMENT_SINGLE': { 1: '//', 2: '@' } 4 | , 'COMMENT_MULTI': { '/*': '*/' } 5 | , 'QUOTEMARKS': { 1: "'", 2: '"' } 6 | , 'KEYWORD_CASE_SENSITIVE': true 7 | , 'KEYWORDS': { 8 | 'constants': [ 9 | 'null', 'false', 'true' 10 | ] 11 | , 'types': [ 12 | 'String', 'int', 'short', 'long', 'char', 'double', 'byte', 13 | 'float', 'static', 'void', 'private', 'boolean', 'protected', 14 | 'public', 'const', 'class', 'final', 'abstract', 'volatile', 15 | 'enum', 'transient', 'interface' 16 | ] 17 | , 'statements': [ 18 | 'this', 'extends', 'if', 'do', 'while', 'try', 'catch', 'finally', 19 | 'throw', 'throws', 'else', 'for', 'switch', 'continue', 'implements', 20 | 'break', 'case', 'default', 'goto' 21 | ] 22 | , 'keywords': [ 23 | 'new', 'return', 'import', 'native', 'super', 'package', 'assert', 'synchronized', 24 | 'instanceof', 'strictfp' 25 | ] 26 | } 27 | , 'OPERATORS': [ 28 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' 29 | ] 30 | , 'DELIMITERS': [ 31 | '(', ')', '[', ']', '{', '}' 32 | ] 33 | , 'REGEXPS': { 34 | 'precompiler': { 35 | 'search': '()(#[^\r\n]*)()' 36 | , 'class': 'precompiler' 37 | , 'modifiers': 'g' 38 | , 'execute': 'before' 39 | } 40 | } 41 | , 'STYLES': { 42 | 'COMMENTS': 'color: #AAAAAA;' 43 | , 'QUOTESMARKS': 'color: #6381F8;' 44 | , 'KEYWORDS': { 45 | 'constants': 'color: #EE0000;' 46 | , 'types': 'color: #0000EE;' 47 | , 'statements': 'color: #60CA00;' 48 | , 'keywords': 'color: #48BDDF;' 49 | } 50 | , 'OPERATORS': 'color: #FF00FF;' 51 | , 'DELIMITERS': 'color: #0038E1;' 52 | , 'REGEXPS': { 53 | 'precompiler': 'color: #009900;' 54 | , 'precompilerstring': 'color: #994400;' 55 | } 56 | } 57 | }; 58 | -------------------------------------------------------------------------------- /edit_area/langs/es.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["es"]={ 2 | new_document: "nuevo documento vacío", 3 | search_button: "buscar y reemplazar", 4 | search_command: "buscar siguiente / abrir área de búsqueda", 5 | search: "buscar", 6 | replace: "reemplazar", 7 | replace_command: "reemplazar / abrir área de búsqueda", 8 | find_next: "encontrar siguiente", 9 | replace_all: "reemplazar todos", 10 | reg_exp: "expresiones regulares", 11 | match_case: "coincidir capitalización", 12 | not_found: "no encontrado.", 13 | occurrence_replaced: "ocurrencias reemplazadas.", 14 | search_field_empty: "Campo de búsqueda vacío", 15 | restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.", 16 | move_popup: "mover la ventana de búsqueda", 17 | font_size: "--Tamaño de la fuente--", 18 | go_to_line: "ir a la línea", 19 | go_to_line_prompt: "ir a la línea número:", 20 | undo: "deshacer", 21 | redo: "rehacer", 22 | change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)", 23 | highlight: "intercambiar resaltado de sintaxis", 24 | reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "acerca", 27 | save: "guardar", 28 | load: "cargar", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Posición", 32 | total: "Total", 33 | close_popup: "recuadro de cierre", 34 | shortcuts: "Atajos", 35 | add_tab: "añadir tabulado al texto", 36 | remove_tab: "borrar tabulado del texto", 37 | about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño", 38 | toggle: "Cambiar editor", 39 | accesskey: "Tecla de acceso", 40 | tab: "Tab", 41 | shift: "Mayúsc", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "Procesando...", 45 | fullscreen: "pantalla completa", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/de.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["de"]={ 2 | new_document: "Neues Dokument", 3 | search_button: "Suchen und Ersetzen", 4 | search_command: "Weitersuchen / öffne Suchfeld", 5 | search: "Suchen", 6 | replace: "Ersetzen", 7 | replace_command: "Ersetzen / öffne Suchfeld", 8 | find_next: "Weitersuchen", 9 | replace_all: "Ersetze alle Treffer", 10 | reg_exp: "reguläre Ausdrücke", 11 | match_case: "passt auf den Begriff
", 12 | not_found: "Nicht gefunden.", 13 | occurrence_replaced: "Die Vorkommen wurden ersetzt.", 14 | search_field_empty: "Leeres Suchfeld", 15 | restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation 16 | move_popup: "Suchfenster bewegen", 17 | font_size: "--Schriftgröße--", 18 | go_to_line: "Gehe zu Zeile", 19 | go_to_line_prompt: "Gehe zu Zeilennummmer:", 20 | undo: "Rückgängig", 21 | redo: "Wiederherstellen", 22 | change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)", 23 | highlight: "Syntax Highlighting an- und ausschalten", 24 | reset_highlight: "Highlighting zurücksetzen (falls mit Text nicht konform)", 25 | word_wrap: "Toggle word wrapping mode", 26 | help: "Info", 27 | save: "Speichern", 28 | load: "Öffnen", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Position", 32 | total: "Gesamt", 33 | close_popup: "Popup schließen", 34 | shortcuts: "Shortcuts", 35 | add_tab: "Tab zum Text hinzufügen", 36 | remove_tab: "Tab aus Text entfernen", 37 | about_notice: "Bemerkung: Syntax Highlighting ist nur für kurze Texte", 38 | toggle: "Editor an- und ausschalten", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Shift", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "In Bearbeitung...", 45 | fullscreen: "Full-Screen", 46 | syntax_selection: "--Syntax--", 47 | close_tab: "Close file" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/langs/eo.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["eo"]={ 2 | new_document: "nova dokumento (vakigas la enhavon)", 3 | search_button: "serĉi / anstataŭigi", 4 | search_command: "pluserĉi / malfermi la serĉo-fenestron", 5 | search: "serĉi", 6 | replace: "anstataŭigi", 7 | replace_command: "anstataŭigi / malfermi la serĉo-fenestron", 8 | find_next: "serĉi", 9 | replace_all: "anstataŭigi ĉion", 10 | reg_exp: "regula esprimo", 11 | match_case: "respekti la usklecon", 12 | not_found: "ne trovita.", 13 | occurrence_replaced: "anstataŭigoj plenumitaj.", 14 | search_field_empty: "La kampo estas malplena.", 15 | restart_search_at_begin: "Fino de teksto ĝisrirata, ĉu daŭrigi el la komenco?", 16 | move_popup: "movi la serĉo-fenestron", 17 | font_size: "--Tipara grando--", 18 | go_to_line: "iri al la linio", 19 | go_to_line_prompt: "iri al la linio numero:", 20 | undo: "rezigni", 21 | redo: "refari", 22 | change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da ŝarĝo de la ĉeforgano)", 23 | highlight: "ebligi/malebligi la sintaksan kolorigon", 24 | reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)", 25 | word_wrap: "toggle word wrapping mode", 26 | help: "pri", 27 | save: "registri", 28 | load: "ŝarĝi", 29 | line_abbr: "Ln", 30 | char_abbr: "Sg", 31 | position: "Pozicio", 32 | total: "Sumo", 33 | close_popup: "fermi la ŝprucfenestron", 34 | shortcuts: "Fulmoklavo", 35 | add_tab: "aldoni tabon en la tekston", 36 | remove_tab: "forigi tablon el la teksto", 37 | about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.", 38 | toggle: "baskuligi la redaktilon", 39 | accesskey: "Fulmoklavo", 40 | tab: "Tab", 41 | shift: "Maj", 42 | ctrl: "Ktrl", 43 | esc: "Esk", 44 | processing: "ŝargante...", 45 | fullscreen: "plenekrane", 46 | syntax_selection: "--Sintakso--", 47 | close_tab: "Fermi la dosieron" 48 | }; -------------------------------------------------------------------------------- /edit_area/reg_syntax/ruby.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Ruby syntax v 1.0 3 | * 4 | * v1.0 by Patrice De Saint Steban (2007/01/03) 5 | * 6 | **/ 7 | editAreaLoader.load_syntax["ruby"] = { 8 | 'DISPLAY_NAME' : 'Ruby' 9 | ,'COMMENT_SINGLE' : {1 : '#'} 10 | ,'COMMENT_MULTI' : {} 11 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 12 | ,'KEYWORD_CASE_SENSITIVE' : true 13 | ,'KEYWORDS' : { 14 | 'reserved' : [ 15 | 'alias', 'and', 'BEGIN', 'begin', 'break', 'case', 'class', 'def', 'defined', 'do', 'else', 16 | 'elsif', 'END', 'end', 'ensure', 'false', 'for', 'if', 17 | 'in', 'module', 'next', 'not', 'or', 'redo', 'rescue', 'retry', 18 | 'return', 'self', 'super', 'then', 'true', 'undef', 'unless', 'until', 'when', 'while', 'yield' 19 | ] 20 | } 21 | ,'OPERATORS' :[ 22 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ',' 23 | ] 24 | ,'DELIMITERS' :[ 25 | '(', ')', '[', ']', '{', '}' 26 | ] 27 | ,'REGEXPS' : { 28 | 'constants' : { 29 | 'search' : '()([A-Z]\\w*)()' 30 | ,'class' : 'constants' 31 | ,'modifiers' : 'g' 32 | ,'execute' : 'before' 33 | } 34 | ,'variables' : { 35 | 'search' : '()([\$\@\%]+\\w+)()' 36 | ,'class' : 'variables' 37 | ,'modifiers' : 'g' 38 | ,'execute' : 'before' 39 | } 40 | ,'numbers' : { 41 | 'search' : '()(-?[0-9]+)()' 42 | ,'class' : 'numbers' 43 | ,'modifiers' : 'g' 44 | ,'execute' : 'before' 45 | } 46 | ,'symbols' : { 47 | 'search' : '()(:\\w+)()' 48 | ,'class' : 'symbols' 49 | ,'modifiers' : 'g' 50 | ,'execute' : 'before' 51 | } 52 | } 53 | ,'STYLES' : { 54 | 'COMMENTS': 'color: #AAAAAA;' 55 | ,'QUOTESMARKS': 'color: #660066;' 56 | ,'KEYWORDS' : { 57 | 'reserved' : 'font-weight: bold; color: #0000FF;' 58 | } 59 | ,'OPERATORS' : 'color: #993300;' 60 | ,'DELIMITERS' : 'color: #993300;' 61 | ,'REGEXPS' : { 62 | 'variables' : 'color: #E0BD54;' 63 | ,'numbers' : 'color: green;' 64 | ,'constants' : 'color: #00AA00;' 65 | ,'symbols' : 'color: #879EFA;' 66 | } 67 | } 68 | }; 69 | -------------------------------------------------------------------------------- /edit_area/langs/bg.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Bulgarian translation 3 | * Author: Valentin Hristov 4 | * Company: SOFTKIT Bulgarian 5 | * Site: http://www.softkit-bg.com 6 | */ 7 | editAreaLoader.lang["bg"]={ 8 | new_document: "нов документ", 9 | search_button: "търсене и замяна", 10 | search_command: "търси следващия / отвори прозорец с търсачка", 11 | search: "търсене", 12 | replace: "замяна", 13 | replace_command: "замяна / отвори прозорец с търсачка", 14 | find_next: "намери следващия", 15 | replace_all: "замени всички", 16 | reg_exp: "реголярни изрази", 17 | match_case: "чуствителен към регистъра", 18 | not_found: "няма резултат.", 19 | occurrence_replaced: "замяната е осъществена.", 20 | search_field_empty: "Полето за търсене е празно", 21 | restart_search_at_begin: "До края на документа. Почни с началото.", 22 | move_popup: "премести прозореца с търсачката", 23 | font_size: "--Размер на шрифта--", 24 | go_to_line: "премени към реда", 25 | go_to_line_prompt: "премени към номера на реда:", 26 | undo: "отмени", 27 | redo: "върни", 28 | change_smooth_selection: "включи/изключи някой от функциите за преглед (по красиво, но повече натоварва)", 29 | highlight: "превключване на оцветяване на синтаксиса включена/изключена", 30 | reset_highlight: "въстанови оцветяване на синтаксиса (ако не е синхронизиран с текста)", 31 | word_wrap: "режим на пренасяне на дълги редове", 32 | help: "за програмата", 33 | save: "съхрани", 34 | load: "зареди", 35 | line_abbr: "Стр", 36 | char_abbr: "Стлб", 37 | position: "Позиция", 38 | total: "Всичко", 39 | close_popup: "затвори прозореца", 40 | shortcuts: "Бързи клавиши", 41 | add_tab: "добави табулация в текста", 42 | remove_tab: "премахни табулацията в текста", 43 | about_notice: "Внимание: използвайте функцията оцветяване на синтаксиса само за малки текстове", 44 | toggle: "Превключи редактор", 45 | accesskey: "Бърз клавиш", 46 | tab: "Tab", 47 | shift: "Shift", 48 | ctrl: "Ctrl", 49 | esc: "Esc", 50 | processing: "Зареждане...", 51 | fullscreen: "на цял екран", 52 | syntax_selection: "--Синтаксис--", 53 | close_tab: "Затвори файла" 54 | }; 55 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/cpp.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["cpp"] = { 2 | 'DISPLAY_NAME' : 'CPP' 3 | ,'COMMENT_SINGLE' : {1 : '//'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : true 7 | ,'KEYWORDS' : { 8 | 'constants' : [ 9 | 'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr', 10 | 'true' 11 | ] 12 | ,'types' : [ 13 | 'FILE', 'auto', 'char', 'class', 'const', 'double', 14 | 'extern', 'float', 'friend', 'inline', 'int', 15 | 'iterator', 'long', 'map', 'operator', 'queue', 16 | 'register', 'short', 'signed', 'size_t', 'stack', 17 | 'static', 'string', 'struct', 'time_t', 'typedef', 18 | 'union', 'unsigned', 'vector', 'void', 'volatile' 19 | ] 20 | ,'statements' : [ 21 | 'catch', 'do', 'else', 'enum', 'for', 'goto', 'if', 22 | 'sizeof', 'switch', 'this', 'throw', 'try', 'while' 23 | ] 24 | ,'keywords' : [ 25 | 'break', 'case', 'continue', 'default', 'delete', 26 | 'namespace', 'new', 'private', 'protected', 'public', 27 | 'return', 'using' 28 | ] 29 | } 30 | ,'OPERATORS' :[ 31 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&' 32 | ] 33 | ,'DELIMITERS' :[ 34 | '(', ')', '[', ']', '{', '}' 35 | ] 36 | ,'REGEXPS' : { 37 | 'precompiler' : { 38 | 'search' : '()(#[^\r\n]*)()' 39 | ,'class' : 'precompiler' 40 | ,'modifiers' : 'g' 41 | ,'execute' : 'before' 42 | } 43 | /* ,'precompilerstring' : { 44 | 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])' 45 | ,'class' : 'precompilerstring' 46 | ,'modifiers' : 'g' 47 | ,'execute' : 'before' 48 | }*/ 49 | } 50 | ,'STYLES' : { 51 | 'COMMENTS': 'color: #AAAAAA;' 52 | ,'QUOTESMARKS': 'color: #6381F8;' 53 | ,'KEYWORDS' : { 54 | 'constants' : 'color: #EE0000;' 55 | ,'types' : 'color: #0000EE;' 56 | ,'statements' : 'color: #60CA00;' 57 | ,'keywords' : 'color: #48BDDF;' 58 | } 59 | ,'OPERATORS' : 'color: #FF00FF;' 60 | ,'DELIMITERS' : 'color: #0038E1;' 61 | ,'REGEXPS' : { 62 | 'precompiler' : 'color: #009900;' 63 | ,'precompilerstring' : 'color: #994400;' 64 | } 65 | } 66 | }; 67 | -------------------------------------------------------------------------------- /edit_area/langs/fr.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.lang["fr"]={ 2 | new_document: "nouveau document (efface le contenu)", 3 | search_button: "rechercher / remplacer", 4 | search_command: "rechercher suivant / ouvrir la fenêtre de recherche", 5 | search: "rechercher", 6 | replace: "remplacer", 7 | replace_command: "remplacer / ouvrir la fenêtre de recherche", 8 | find_next: "rechercher", 9 | replace_all: "tout remplacer", 10 | reg_exp: "expr. régulière", 11 | match_case: "respecter la casse", 12 | not_found: "pas trouvé.", 13 | occurrence_replaced: "remplacements éffectués.", 14 | search_field_empty: "Le champ de recherche est vide.", 15 | restart_search_at_begin: "Fin du texte atteint, poursuite au début.", 16 | move_popup: "déplacer la fenêtre de recherche", 17 | font_size: "--Taille police--", 18 | go_to_line: "aller à la ligne", 19 | go_to_line_prompt: "aller a la ligne numero:", 20 | undo: "annuler", 21 | redo: "refaire", 22 | change_smooth_selection: "activer/désactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)", 23 | highlight: "activer/désactiver la coloration syntaxique", 24 | reset_highlight: "réinitialiser la coloration syntaxique (si désyncronisée du texte)", 25 | word_wrap: "activer/désactiver les retours à la ligne automatiques", 26 | help: "à propos", 27 | save: "sauvegarder", 28 | load: "charger", 29 | line_abbr: "Ln", 30 | char_abbr: "Ch", 31 | position: "Position", 32 | total: "Total", 33 | close_popup: "fermer le popup", 34 | shortcuts: "Racourcis clavier", 35 | add_tab: "ajouter une tabulation dans le texte", 36 | remove_tab: "retirer une tabulation dans le texte", 37 | about_notice: "Note: la coloration syntaxique n'est prévue que pour de courts textes.", 38 | toggle: "basculer l'éditeur", 39 | accesskey: "Accesskey", 40 | tab: "Tab", 41 | shift: "Maj", 42 | ctrl: "Ctrl", 43 | esc: "Esc", 44 | processing: "chargement...", 45 | fullscreen: "plein écran", 46 | syntax_selection: "--Syntaxe--", 47 | close_tab: "Fermer le fichier" 48 | }; 49 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/vb.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["vb"] = { 2 | 'DISPLAY_NAME' : 'Visual Basic' 3 | ,'COMMENT_SINGLE' : {1 : "'"} 4 | ,'COMMENT_MULTI' : { } 5 | ,'QUOTEMARKS' : {1: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements' : [ 9 | 'if','then','for','each','while','do','loop', 10 | 'else','elseif','select','case','end select', 11 | 'until','next','step','to','in','end if' 12 | ] 13 | ,'keywords' : [ 14 | 'empty','isempty','nothing','null','isnull','true','false', 15 | 'set','call', 16 | 'sub','end sub','function','end function','exit','exit function', 17 | 'dim','Mod','In','private','public','shared','const' 18 | ] 19 | 20 | ,'functions' : [ 21 | 'CDate','Date','DateAdd','DateDiff','DatePart','DateSerial','DateValue','Day','FormatDateTime', 22 | 'Hour','IsDate','Minute','Month', 23 | 'MonthName','Now','Second','Time','Timer','TimeSerial','TimeValue','Weekday','WeekdayName ','Year', 24 | 'Asc','CBool','CByte','CCur','CDate','CDbl','Chr','CInt','CLng','CSng','CStr','Hex','Oct','FormatCurrency', 25 | 'FormatDateTime','FormatNumber','FormatPercent','Abs','Atn','Cos','Exp','Hex','Int','Fix','Log','Oct', 26 | 'Rnd','Sgn','Sin','Sqr','Tan', 27 | 'Array','Filter','IsArray','Join','LBound','Split','UBound', 28 | 'InStr','InStrRev','LCase','Left','Len','LTrim','RTrim','Trim','Mid','Replace','Right','Space','StrComp', 29 | 'String','StrReverse','UCase', 30 | 'CreateObject','Eval','GetLocale','GetObject','GetRef','InputBox','IsEmpty','IsNull','IsNumeric', 31 | 'IsObject','LoadPicture','MsgBox','RGB','Round','ScriptEngine','ScriptEngineBuildVersion','ScriptEngineMajorVersion', 32 | 'ScriptEngineMinorVersion','SetLocale','TypeName','VarType' 33 | ] 34 | } 35 | ,'OPERATORS' :[ 36 | '+', '-', '/', '*', '=', '<', '>', '!', '&' 37 | ] 38 | ,'DELIMITERS' :[ 39 | '(', ')', '[', ']', '{', '}' 40 | ] 41 | ,'STYLES' : { 42 | 'COMMENTS': 'color: #99CC00;' 43 | ,'QUOTESMARKS': 'color: #333399;' 44 | ,'KEYWORDS' : { 45 | 'keywords' : 'color: #3366FF;' 46 | ,'functions' : 'color: #0000FF;' 47 | ,'statements' : 'color: #3366FF;' 48 | } 49 | ,'OPERATORS' : 'color: #FF0000;' 50 | ,'DELIMITERS' : 'color: #0000FF;' 51 | 52 | } 53 | }; 54 | -------------------------------------------------------------------------------- /edit_area/resize_area.js: -------------------------------------------------------------------------------- 1 | 2 | EditAreaLoader.prototype.start_resize_area= function(){ 3 | var d=document,a,div,width,height,father; 4 | 5 | d.onmouseup= editAreaLoader.end_resize_area; 6 | d.onmousemove= editAreaLoader.resize_area; 7 | editAreaLoader.toggle(editAreaLoader.resize["id"]); 8 | 9 | a = editAreas[editAreaLoader.resize["id"]]["textarea"]; 10 | div = d.getElementById("edit_area_resize"); 11 | if(!div){ 12 | div= d.createElement("div"); 13 | div.id="edit_area_resize"; 14 | div.style.border="dashed #888888 1px"; 15 | } 16 | width = a.offsetWidth -2; 17 | height = a.offsetHeight -2; 18 | 19 | div.style.display = "block"; 20 | div.style.width = width+"px"; 21 | div.style.height = height+"px"; 22 | father= a.parentNode; 23 | father.insertBefore(div, a); 24 | 25 | a.style.display="none"; 26 | 27 | editAreaLoader.resize["start_top"]= calculeOffsetTop(div); 28 | editAreaLoader.resize["start_left"]= calculeOffsetLeft(div); 29 | }; 30 | 31 | EditAreaLoader.prototype.end_resize_area= function(e){ 32 | var d=document,div,a,width,height; 33 | 34 | d.onmouseup=""; 35 | d.onmousemove=""; 36 | 37 | div = d.getElementById("edit_area_resize"); 38 | a= editAreas[editAreaLoader.resize["id"]]["textarea"]; 39 | width = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_width"], div.offsetWidth-4); 40 | height = Math.max(editAreas[editAreaLoader.resize["id"]]["settings"]["min_height"], div.offsetHeight-4); 41 | if(editAreaLoader.isIE==6){ 42 | width-=2; 43 | height-=2; 44 | } 45 | a.style.width = width+"px"; 46 | a.style.height = height+"px"; 47 | div.style.display = "none"; 48 | a.style.display = "inline"; 49 | a.selectionStart = editAreaLoader.resize["selectionStart"]; 50 | a.selectionEnd = editAreaLoader.resize["selectionEnd"]; 51 | editAreaLoader.toggle(editAreaLoader.resize["id"]); 52 | 53 | return false; 54 | }; 55 | 56 | EditAreaLoader.prototype.resize_area= function(e){ 57 | var allow,newHeight,newWidth; 58 | allow = editAreas[editAreaLoader.resize["id"]]["settings"]["allow_resize"]; 59 | if(allow=="both" || allow=="y") 60 | { 61 | newHeight = Math.max(20, getMouseY(e)- editAreaLoader.resize["start_top"]); 62 | document.getElementById("edit_area_resize").style.height= newHeight+"px"; 63 | } 64 | if(allow=="both" || allow=="x") 65 | { 66 | newWidth= Math.max(20, getMouseX(e)- editAreaLoader.resize["start_left"]); 67 | document.getElementById("edit_area_resize").style.width= newWidth+"px"; 68 | } 69 | 70 | return false; 71 | }; 72 | 73 | editAreaLoader.waiting_loading["resize_area.js"]= "loaded"; 74 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/basic.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["basic"] = { 2 | 'DISPLAY_NAME' : 'Basic' 3 | ,'COMMENT_SINGLE' : {1 : "'", 2 : 'rem'} 4 | ,'COMMENT_MULTI' : { } 5 | ,'QUOTEMARKS' : {1: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements' : [ 9 | 'if','then','for','wend','while', 10 | 'else','elseif','select','case','end select', 11 | 'until','next','step','to','end if', 'call' 12 | ] 13 | ,'keywords' : [ 14 | 'sub', 'end sub', 'function', 'end function', 'exit', 15 | 'exit function', 'dim', 'redim', 'shared', 'const', 16 | 'is', 'absolute', 'access', 'any', 'append', 'as', 17 | 'base', 'beep', 'binary', 'bload', 'bsave', 'chain', 18 | 'chdir', 'circle', 'clear', 'close', 'cls', 'color', 19 | 'com', 'common', 'data', 'date', 'declare', 'def', 20 | 'defdbl', 'defint', 'deflng', 'defsng', 'defstr', 21 | 'double', 'draw', 'environ', 'erase', 'error', 'field', 22 | 'files', 'fn', 'get', 'gosub', 'goto', 'integer', 'key', 23 | 'kill', 'let', 'line', 'list', 'locate', 'lock', 'long', 24 | 'lprint', 'lset', 'mkdir', 'name', 'off', 'on', 'open', 25 | 'option', 'out', 'output', 'paint', 'palette', 'pcopy', 26 | 'poke', 'preset', 'print', 'pset', 'put', 'random', 27 | 'randomize', 'read', 'reset', 'restore', 'resume', 28 | 'return', 'rmdir', 'rset', 'run', 'screen', 'seg', 29 | 'shell', 'single', 'sleep', 'sound', 'static', 'stop', 30 | 'strig', 'string', 'swap', 'system', 'time', 'timer', 31 | 'troff', 'tron', 'type', 'unlock', 'using', 'view', 32 | 'wait', 'width', 'window', 'write' 33 | ] 34 | ,'functions' : [ 35 | 'abs', 'asc', 'atn', 'cdbl', 'chr', 'cint', 'clng', 36 | 'cos', 'csng', 'csrlin', 'cvd', 'cvdmbf', 'cvi', 'cvl', 37 | 'cvs', 'cvsmbf', 'eof', 'erdev', 'erl', 'err', 'exp', 38 | 'fileattr', 'fix', 'fre', 'freefile', 'hex', 'inkey', 39 | 'inp', 'input', 'instr', 'int', 'ioctl', 'lbound', 40 | 'lcase', 'left', 'len', 'loc', 'lof', 'log', 'lpos', 41 | 'ltrim', 'mid', 'mkd', 'mkdmbf', 'mki', 'mkl', 'mks', 42 | 'mksmbf', 'oct', 'peek', 'pen', 'play', 'pmap', 'point', 43 | 'pos', 'right', 'rnd', 'rtrim', 'seek', 'sgn', 'sin', 44 | 'space', 'spc', 'sqr', 'stick', 'str', 'tab', 'tan', 45 | 'ubound', 'ucase', 'val', 'varptr', 'varseg' 46 | ] 47 | ,'operators' : [ 48 | 'and', 'eqv', 'imp', 'mod', 'not', 'or', 'xor' 49 | ] 50 | } 51 | ,'OPERATORS' :[ 52 | '+', '-', '/', '*', '=', '<', '>', '!', '&' 53 | ] 54 | ,'DELIMITERS' :[ 55 | '(', ')', '[', ']', '{', '}' 56 | ] 57 | ,'STYLES' : { 58 | 'COMMENTS': 'color: #99CC00;' 59 | ,'QUOTESMARKS': 'color: #333399;' 60 | ,'KEYWORDS' : { 61 | 'keywords' : 'color: #3366FF;' 62 | ,'functions' : 'color: #0000FF;' 63 | ,'statements' : 'color: #3366FF;' 64 | ,'operators' : 'color: #FF0000;' 65 | } 66 | ,'OPERATORS' : 'color: #FF0000;' 67 | ,'DELIMITERS' : 'color: #0000FF;' 68 | 69 | } 70 | }; 71 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PHP 代码运行 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | 81 | 82 | -------------------------------------------------------------------------------- /edit_area/plugins/charmap/charmap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Charmap plugin 3 | * by Christophe Dolivet 4 | * v0.1 (2006/09/22) 5 | * 6 | * 7 | * This plugin allow to use a visual keyboard allowing to insert any UTF-8 characters in the text. 8 | * 9 | * - plugin name to add to the plugin list: "charmap" 10 | * - plugin name to add to the toolbar list: "charmap" 11 | * - possible parameters to add to EditAreaLoader.init(): 12 | * "charmap_default": (String) define the name of the default character range displayed on popup display 13 | * (default: "arrows") 14 | * 15 | * 16 | */ 17 | 18 | var EditArea_charmap= { 19 | /** 20 | * Get called once this file is loaded (editArea still not initialized) 21 | * 22 | * @return nothing 23 | */ 24 | init: function(){ 25 | this.default_language="Arrows"; 26 | } 27 | 28 | /** 29 | * Returns the HTML code for a specific control string or false if this plugin doesn't have that control. 30 | * A control can be a button, select list or any other HTML item to present in the EditArea user interface. 31 | * Language variables such as {$lang_somekey} will also be replaced with contents from 32 | * the language packs. 33 | * 34 | * @param {string} ctrl_name: the name of the control to add 35 | * @return HTML code for a specific control or false. 36 | * @type string or boolean 37 | */ 38 | ,get_control_html: function(ctrl_name){ 39 | switch(ctrl_name){ 40 | case "charmap": 41 | // Control id, button img, command 42 | return parent.editAreaLoader.get_button_html('charmap_but', 'charmap.gif', 'charmap_press', false, this.baseURL); 43 | } 44 | return false; 45 | } 46 | /** 47 | * Get called once EditArea is fully loaded and initialised 48 | * 49 | * @return nothing 50 | */ 51 | ,onload: function(){ 52 | if(editArea.settings["charmap_default"] && editArea.settings["charmap_default"].length>0) 53 | this.default_language= editArea.settings["charmap_default"]; 54 | } 55 | 56 | /** 57 | * Is called each time the user touch a keyboard key. 58 | * 59 | * @param (event) e: the keydown event 60 | * @return true - pass to next handler in chain, false - stop chain execution 61 | * @type boolean 62 | */ 63 | ,onkeydown: function(e){ 64 | 65 | } 66 | 67 | /** 68 | * Executes a specific command, this function handles plugin commands. 69 | * 70 | * @param {string} cmd: the name of the command being executed 71 | * @param {unknown} param: the parameter of the command 72 | * @return true - pass to next handler in chain, false - stop chain execution 73 | * @type boolean 74 | */ 75 | ,execCommand: function(cmd, param){ 76 | // Handle commands 77 | switch(cmd){ 78 | case "charmap_press": 79 | win= window.open(this.baseURL+"popup.html", "charmap", "width=500,height=270,scrollbars=yes,resizable=yes"); 80 | win.focus(); 81 | return false; 82 | } 83 | // Pass to next handler in chain 84 | return true; 85 | } 86 | 87 | }; 88 | 89 | // Adds the plugin class to the list of available EditArea plugins 90 | editArea.add_plugin("charmap", EditArea_charmap); 91 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/perl.js: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG. 3 | * 4 | * You may choose any license of the current release or any future release 5 | * of editarea to use, modify and/or redistribute this file. 6 | * 7 | * This language specification file supports for syntax checking on 8 | * a large subset of Perl 5.x. 9 | * The basic common syntax of Perl is fully supported, but as for 10 | * the highlighting of built-in operations, it's mainly designed 11 | * to support for hightlighting Perl code in a Safe environment (compartment) 12 | * as used by CoMaNet for evaluation of administrative scripts. This Safe 13 | * compartment basically allows for all of Opcode's :default operations, 14 | * but little others. See http://perldoc.perl.org/Opcode.html to learn 15 | * more. 16 | ***************************************************************************/ 17 | 18 | editAreaLoader.load_syntax["perl"] = { 19 | 'DISPLAY_NAME' : 'Perl', 20 | 'COMMENT_SINGLE' : {1 : '#'}, 21 | 'QUOTEMARKS' : {1: "'", 2: '"'}, 22 | 'KEYWORD_CASE_SENSITIVE' : true, 23 | 'KEYWORDS' : 24 | { 25 | 'core' : 26 | [ "if", "else", "elsif", "while", "for", "each", "foreach", 27 | "next", "last", "goto", "exists", "delete", "undef", 28 | "my", "our", "local", "use", "require", "package", "keys", "values", 29 | "sub", "bless", "ref", "return" ], 30 | 'functions' : 31 | [ 32 | //from :base_core 33 | "int", "hex", "oct", "abs", "substr", "vec", "study", "pos", 34 | "length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst", 35 | "uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice", 36 | "push", "pop", "shift", "unshift", "reverse", "and", "or", "dor", 37 | "xor", "warn", "die", "prototype", 38 | //from :base_mem 39 | "concat", "repeat", "join", "range", 40 | //none from :base_loop, as we'll see them as basic statements... 41 | //from :base_orig 42 | "sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime", 43 | //others 44 | "print", "open", "close" 45 | ] 46 | }, 47 | 'OPERATORS' : 48 | [ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&', 49 | ' eq ', ' ne ', '=~' ], 50 | 'DELIMITERS' : 51 | [ '(', ')', '[', ']', '{', '}' ], 52 | 'REGEXPS' : 53 | { 54 | 'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()', 55 | 'class' : 'scopingnames', 56 | 'modifiers' : 'g', 'execute' : 'before' }, 57 | 'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()', 58 | 'class' : 'scopingnames', 59 | 'modifiers' : 'g', 'execute' : 'before' }, 60 | 'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()', 61 | 'class' : 'vars', 62 | 'modifiers' : 'g', 'execute' : 'after' }, 63 | 'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()', 64 | 'class' : 'vars', 65 | 'modifiers' : 'g', 'execute' : 'after' }, 66 | 'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()', 67 | 'class' : 'vars', 68 | 'modifiers' : 'g', 'execute' : 'after' }, 69 | }, 70 | 71 | 'STYLES' : 72 | { 73 | 'COMMENTS': 'color: #AAAAAA;', 74 | 'QUOTESMARKS': 'color: #DC0000;', 75 | 'KEYWORDS' : 76 | { 77 | 'core' : 'color: #8aca00;', 78 | 'functions' : 'color: #2B60FF;' 79 | }, 80 | 'OPERATORS' : 'color: #8aca00;', 81 | 'DELIMITERS' : 'color: #0038E1;', 82 | 'REGEXPS': 83 | { 84 | 'scopingnames' : 'color: #ff0000;', 85 | 'vars' : 'color: #00aaaa;', 86 | } 87 | } //'STYLES' 88 | }; 89 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/sql.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["sql"] = { 2 | 'DISPLAY_NAME' : 'SQL' 3 | ,'COMMENT_SINGLE' : {1 : '--'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements' : [ 9 | 'select', 'SELECT', 'where', 'order', 'by', 10 | 'insert', 'from', 'update', 'grant', 'left join', 'right join', 11 | 'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE' 12 | ] 13 | ,'reserved' : [ 14 | 'null', 'enum', 'int', 'boolean', 'add', 'varchar' 15 | 16 | ] 17 | ,'functions' : [ 18 | 'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR', 19 | 'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH', 20 | 'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA', 21 | 'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND', 22 | 'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND', 23 | 'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF', 24 | 'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK' 25 | ] 26 | } 27 | ,'OPERATORS' :[ 28 | 'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*' 29 | ] 30 | ,'DELIMITERS' :[ 31 | '(', ')', '[', ']', '{', '}' 32 | ] 33 | ,'REGEXPS' : { 34 | // highlight all variables (@...) 35 | 'variables' : { 36 | 'search' : '()(\\@\\w+)()' 37 | ,'class' : 'variables' 38 | ,'modifiers' : 'g' 39 | ,'execute' : 'before' // before or after 40 | } 41 | } 42 | ,'STYLES' : { 43 | 'COMMENTS': 'color: #AAAAAA;' 44 | ,'QUOTESMARKS': 'color: #879EFA;' 45 | ,'KEYWORDS' : { 46 | 'reserved' : 'color: #48BDDF;' 47 | ,'functions' : 'color: #0040FD;' 48 | ,'statements' : 'color: #60CA00;' 49 | } 50 | ,'OPERATORS' : 'color: #FF00FF;' 51 | ,'DELIMITERS' : 'color: #2B60FF;' 52 | ,'REGEXPS' : { 53 | 'variables' : 'color: #E0BD54;' 54 | } 55 | } 56 | }; 57 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/pas.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["pas"] = { 2 | 'DISPLAY_NAME' : 'Pascal' 3 | ,'COMMENT_SINGLE' : {} 4 | ,'COMMENT_MULTI' : {'{' : '}', '(*':'*)'} 5 | ,'QUOTEMARKS' : {1: '"', 2: "'"} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'constants' : [ 9 | 'Blink', 'Black', 'Blue', 'Green', 'Cyan', 'Red', 10 | 'Magenta', 'Brown', 'LightGray', 'DarkGray', 11 | 'LightBlue', 'LightGreen', 'LightCyan', 'LightRed', 12 | 'LightMagenta', 'Yellow', 'White', 'MaxSIntValue', 13 | 'MaxUIntValue', 'maxint', 'maxLongint', 'maxSmallint', 14 | 'erroraddr', 'errorcode', 'LineEnding' 15 | ] 16 | ,'keywords' : [ 17 | 'in', 'or', 'div', 'mod', 'and', 'shl', 'shr', 'xor', 18 | 'pow', 'is', 'not','Absolute', 'And_then', 'Array', 19 | 'Begin', 'Bindable', 'Case', 'Const', 'Do', 'Downto', 20 | 'Else', 'End', 'Export', 'File', 'For', 'Function', 21 | 'Goto', 'If', 'Import', 'Implementation', 'Inherited', 22 | 'Inline', 'Interface', 'Label', 'Module', 'Nil', 23 | 'Object', 'Of', 'Only', 'Operator', 'Or_else', 24 | 'Otherwise', 'Packed', 'Procedure', 'Program', 25 | 'Protected', 'Qualified', 'Record', 'Repeat', 26 | 'Restricted', 'Set', 'Then', 'To', 'Type', 'Unit', 27 | 'Until', 'Uses', 'Value', 'Var', 'Virtual', 'While', 28 | 'With' 29 | ] 30 | ,'functions' : [ 31 | 'Abs', 'Addr', 'Append', 'Arctan', 'Assert', 'Assign', 32 | 'Assigned', 'BinStr', 'Blockread', 'Blockwrite', 33 | 'Break', 'Chdir', 'Chr', 'Close', 'CompareByte', 34 | 'CompareChar', 'CompareDWord', 'CompareWord', 'Concat', 35 | 'Continue', 'Copy', 'Cos', 'CSeg', 'Dec', 'Delete', 36 | 'Dispose', 'DSeg', 'Eof', 'Eoln', 'Erase', 'Exclude', 37 | 'Exit', 'Exp', 'Filepos', 'Filesize', 'FillByte', 38 | 'Fillchar', 'FillDWord', 'Fillword', 'Flush', 'Frac', 39 | 'Freemem', 'Getdir', 'Getmem', 'GetMemoryManager', 40 | 'Halt', 'HexStr', 'Hi', 'High', 'Inc', 'Include', 41 | 'IndexByte', 'IndexChar', 'IndexDWord', 'IndexWord', 42 | 'Insert', 'IsMemoryManagerSet', 'Int', 'IOresult', 43 | 'Length', 'Ln', 'Lo', 'LongJmp', 'Low', 'Lowercase', 44 | 'Mark', 'Maxavail', 'Memavail', 'Mkdir', 'Move', 45 | 'MoveChar0', 'New', 'Odd', 'OctStr', 'Ofs', 'Ord', 46 | 'Paramcount', 'Paramstr', 'Pi', 'Pos', 'Power', 'Pred', 47 | 'Ptr', 'Random', 'Randomize', 'Read', 'Readln', 48 | 'Real2Double', 'Release', 'Rename', 'Reset', 'Rewrite', 49 | 'Rmdir', 'Round', 'Runerror', 'Seek', 'SeekEof', 50 | 'SeekEoln', 'Seg', 'SetMemoryManager', 'SetJmp', 51 | 'SetLength', 'SetString', 'SetTextBuf', 'Sin', 'SizeOf', 52 | 'Sptr', 'Sqr', 'Sqrt', 'SSeg', 'Str', 'StringOfChar', 53 | 'Succ', 'Swap', 'Trunc', 'Truncate', 'Upcase', 'Val', 54 | 'Write', 'WriteLn' 55 | ] 56 | ,'types' : [ 57 | 'Integer', 'Shortint', 'SmallInt', 'Longint', 58 | 'Longword', 'Int64', 'Byte', 'Word', 'Cardinal', 59 | 'QWord', 'Boolean', 'ByteBool', 'LongBool', 'Char', 60 | 'Real', 'Single', 'Double', 'Extended', 'Comp', 61 | 'String', 'ShortString', 'AnsiString', 'PChar' 62 | ] 63 | } 64 | ,'OPERATORS' :[ 65 | '@', '*', '+', '-', '/', '^', ':=', '<', '=', '>' 66 | ] 67 | ,'DELIMITERS' :[ 68 | '(', ')', '[', ']' 69 | ] 70 | ,'STYLES' : { 71 | 'COMMENTS': 'color: #AAAAAA;' 72 | ,'QUOTESMARKS': 'color: #6381F8;' 73 | ,'KEYWORDS' : { 74 | 'specials' : 'color: #EE0000;' 75 | ,'constants' : 'color: #654321;' 76 | ,'keywords' : 'color: #48BDDF;' 77 | ,'functions' : 'color: #449922;' 78 | ,'types' : 'color: #2B60FF;' 79 | } 80 | ,'OPERATORS' : 'color: #FF00FF;' 81 | ,'DELIMITERS' : 'color: #60CA00;' 82 | } 83 | }; 84 | -------------------------------------------------------------------------------- /edit_area/plugins/test/test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Plugin designed for test prupose. It add a button (that manage an alert) and a select (that allow to insert tags) in the toolbar. 3 | * This plugin also disable the "f" key in the editarea, and load a CSS and a JS file 4 | */ 5 | var EditArea_test= { 6 | /** 7 | * Get called once this file is loaded (editArea still not initialized) 8 | * 9 | * @return nothing 10 | */ 11 | init: function(){ 12 | // alert("test init: "+ this._someInternalFunction(2, 3)); 13 | editArea.load_css(this.baseURL+"css/test.css"); 14 | editArea.load_script(this.baseURL+"test2.js"); 15 | } 16 | /** 17 | * Returns the HTML code for a specific control string or false if this plugin doesn't have that control. 18 | * A control can be a button, select list or any other HTML item to present in the EditArea user interface. 19 | * Language variables such as {$lang_somekey} will also be replaced with contents from 20 | * the language packs. 21 | * 22 | * @param {string} ctrl_name: the name of the control to add 23 | * @return HTML code for a specific control or false. 24 | * @type string or boolean 25 | */ 26 | ,get_control_html: function(ctrl_name){ 27 | switch(ctrl_name){ 28 | case "test_but": 29 | // Control id, button img, command 30 | return parent.editAreaLoader.get_button_html('test_but', 'test.gif', 'test_cmd', false, this.baseURL); 31 | case "test_select": 32 | html= ""; 41 | return html; 42 | } 43 | return false; 44 | } 45 | /** 46 | * Get called once EditArea is fully loaded and initialised 47 | * 48 | * @return nothing 49 | */ 50 | ,onload: function(){ 51 | alert("test load"); 52 | } 53 | 54 | /** 55 | * Is called each time the user touch a keyboard key. 56 | * 57 | * @param (event) e: the keydown event 58 | * @return true - pass to next handler in chain, false - stop chain execution 59 | * @type boolean 60 | */ 61 | ,onkeydown: function(e){ 62 | var str= String.fromCharCode(e.keyCode); 63 | // desactivate the "f" character 64 | if(str.toLowerCase()=="f"){ 65 | return true; 66 | } 67 | return false; 68 | } 69 | 70 | /** 71 | * Executes a specific command, this function handles plugin commands. 72 | * 73 | * @param {string} cmd: the name of the command being executed 74 | * @param {unknown} param: the parameter of the command 75 | * @return true - pass to next handler in chain, false - stop chain execution 76 | * @type boolean 77 | */ 78 | ,execCommand: function(cmd, param){ 79 | // Handle commands 80 | switch(cmd){ 81 | case "test_select_change": 82 | var val= document.getElementById("test_select").value; 83 | if(val!=-1) 84 | parent.editAreaLoader.insertTags(editArea.id, "<"+val+">", ""); 85 | document.getElementById("test_select").options[0].selected=true; 86 | return false; 87 | case "test_cmd": 88 | alert("user clicked on test_cmd"); 89 | return false; 90 | } 91 | // Pass to next handler in chain 92 | return true; 93 | } 94 | 95 | /** 96 | * This is just an internal plugin method, prefix all internal methods with a _ character. 97 | * The prefix is needed so they doesn't collide with future EditArea callback functions. 98 | * 99 | * @param {string} a Some arg1. 100 | * @param {string} b Some arg2. 101 | * @return Some return. 102 | * @type unknown 103 | */ 104 | ,_someInternalFunction : function(a, b) { 105 | return a+b; 106 | } 107 | }; 108 | 109 | // Adds the plugin class to the list of available EditArea plugins 110 | editArea.add_plugin("test", EditArea_test); 111 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/js.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["js"] = { 2 | 'DISPLAY_NAME' : 'Javascript' 3 | ,'COMMENT_SINGLE' : {1 : '//'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements' : [ 9 | 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', 10 | 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', 11 | 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', 12 | 'while', 'write', 'with' 13 | ] 14 | ,'keywords' : [ 15 | 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', 16 | 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', 17 | 'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document', 18 | // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice 19 | 'Link ', 'outerHeight ', 'Anchor', 'FileUpload', 20 | 'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self', 21 | 'arguments', 'locationbar', 'pageXoffset', 'Form', 22 | 'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status', 23 | 'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy', 24 | 'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden', 25 | 'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents', 26 | 'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text', 27 | 'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity', 28 | 'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed', 29 | 'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents', 30 | 'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus', 31 | 'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document', 32 | 'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window', 33 | 'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy' 34 | ] 35 | ,'functions' : [ 36 | // common functions for Window object 37 | 'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home', 38 | 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', 39 | 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status', 40 | 'stop' 41 | ] 42 | } 43 | ,'OPERATORS' :[ 44 | '+', '-', '/', '*', '=', '<', '>', '%', '!' 45 | ] 46 | ,'DELIMITERS' :[ 47 | '(', ')', '[', ']', '{', '}' 48 | ] 49 | ,'STYLES' : { 50 | 'COMMENTS': 'color: #AAAAAA;' 51 | ,'QUOTESMARKS': 'color: #6381F8;' 52 | ,'KEYWORDS' : { 53 | 'statements' : 'color: #60CA00;' 54 | ,'keywords' : 'color: #48BDDF;' 55 | ,'functions' : 'color: #2B60FF;' 56 | } 57 | ,'OPERATORS' : 'color: #FF00FF;' 58 | ,'DELIMITERS' : 'color: #0038E1;' 59 | 60 | } 61 | ,'AUTO_COMPLETION' : { 62 | "default": { // the name of this definition group. It's posisble to have different rules inside the same definition file 63 | "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.| 64 | ,"possible_words_letters": "[a-zA-Z0-9_]+" 65 | ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$" 66 | ,"prefix_separator": "\\." 67 | } 68 | ,"CASE_SENSITIVE": true 69 | ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position 70 | ,"KEYWORDS": { 71 | '': [ // the prefix of thoses items 72 | /** 73 | * 0 : the keyword the user is typing 74 | * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous ) 75 | * If empty the keyword will be displayed 76 | * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed) 77 | */ 78 | ['Array', '§()', ''] 79 | ,['alert', '§({@})', 'alert(String message)'] 80 | ,['document'] 81 | ,['window'] 82 | ] 83 | ,'window' : [ 84 | ['location'] 85 | ,['document'] 86 | ,['scrollTo', 'scrollTo({@})', 'scrollTo(Int x,Int y)'] 87 | ] 88 | ,'location' : [ 89 | ['href'] 90 | ] 91 | } 92 | } 93 | } 94 | }; 95 | -------------------------------------------------------------------------------- /edit_area/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EditArea 6 | 7 | 8 | [__CSSRULES__] 9 | [__JSCODE__] 10 | 11 | 12 |
13 |
[__TOOLBAR__]
14 |
15 |
16 |
17 |
18 |
 
19 |
 
20 |
21 |
22 |
23 |
24 |
25 | 27 | 28 |
29 |
30 |
31 | 32 | 33 | 34 | 37 | 38 | 41 | 44 | 45 |
{$position}: 35 | {$line_abbr} 0, {$char_abbr} 0 36 | {$total}: 39 | {$line_abbr} 0, {$char_abbr} 0 40 | 42 | resize 43 |
46 |
47 |
48 |
49 |
50 | {$processing} 51 |
52 |
53 | 54 |
55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | 66 |
{$search} 60 | {$close_popup}
61 |
{$replace}{$move_popup}
67 |
68 | 69 | 70 |
71 | {$find_next} 72 | {$replace} 73 | {$replace_all}
74 |
75 |
76 |
77 |
78 |
79 | {$close_popup} 80 |
81 |

Editarea [__EA_VERSION__]


82 |

{$shortcuts}:

83 | {$tab}: {$add_tab}
84 | {$shift}+{$tab}: {$remove_tab}
85 | {$ctrl}+f: {$search_command}
86 | {$ctrl}+r: {$replace_command}
87 | {$ctrl}+h: {$highlight}
88 | {$ctrl}+g: {$go_to_line}
89 | {$ctrl}+z: {$undo}
90 | {$ctrl}+y: {$redo}
91 | {$ctrl}+e: {$help}
92 | {$ctrl}+q, {$esc}: {$close_popup}
93 | {$accesskey} E: {$toggle}
94 |
95 | {$about_notice} 96 |
97 |
98 |
99 | 100 | 101 | -------------------------------------------------------------------------------- /edit_area/keyboard.js: -------------------------------------------------------------------------------- 1 | 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"}; 2 | 3 | 4 | 5 | function keyDown(e){ 6 | if(!e){ // if IE 7 | e=event; 8 | } 9 | 10 | // send the event to the plugins 11 | for(var i in editArea.plugins){ 12 | if(typeof(editArea.plugins[i].onkeydown)=="function"){ 13 | if(editArea.plugins[i].onkeydown(e)===false){ // stop propaging 14 | if(editArea.isIE) 15 | e.keyCode=0; 16 | return false; 17 | } 18 | } 19 | } 20 | 21 | var target_id=(e.target || e.srcElement).id; 22 | var use=false; 23 | if (EA_keys[e.keyCode]) 24 | letter=EA_keys[e.keyCode]; 25 | else 26 | letter=String.fromCharCode(e.keyCode); 27 | 28 | var low_letter= letter.toLowerCase(); 29 | 30 | if(letter=="Page up" && !AltPressed(e) && !editArea.isOpera){ 31 | editArea.execCommand("scroll_page", {"dir": "up", "shift": ShiftPressed(e)}); 32 | use=true; 33 | }else if(letter=="Page down" && !AltPressed(e) && !editArea.isOpera){ 34 | editArea.execCommand("scroll_page", {"dir": "down", "shift": ShiftPressed(e)}); 35 | use=true; 36 | }else if(editArea.is_editable==false){ 37 | // do nothing but also do nothing else (allow to navigate with page up and page down) 38 | return true; 39 | }else if(letter=="Tabulation" && target_id=="textarea" && !CtrlPressed(e) && !AltPressed(e)){ 40 | if(ShiftPressed(e)) 41 | editArea.execCommand("invert_tab_selection"); 42 | else 43 | editArea.execCommand("tab_selection"); 44 | 45 | use=true; 46 | if(editArea.isOpera || (editArea.isFirefox && editArea.isMac) ) // opera && firefox mac can't cancel tabulation events... 47 | setTimeout("editArea.execCommand('focus');", 1); 48 | }else if(letter=="Entrer" && target_id=="textarea"){ 49 | if(editArea.press_enter()) 50 | use=true; 51 | }else if(letter=="Entrer" && target_id=="area_search"){ 52 | editArea.execCommand("area_search"); 53 | use=true; 54 | }else if(letter=="Esc"){ 55 | editArea.execCommand("close_all_inline_popup", e); 56 | use=true; 57 | }else if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){ 58 | switch(low_letter){ 59 | case "f": 60 | editArea.execCommand("area_search"); 61 | use=true; 62 | break; 63 | case "r": 64 | editArea.execCommand("area_replace"); 65 | use=true; 66 | break; 67 | case "q": 68 | editArea.execCommand("close_all_inline_popup", e); 69 | use=true; 70 | break; 71 | case "h": 72 | editArea.execCommand("change_highlight"); 73 | use=true; 74 | break; 75 | case "g": 76 | setTimeout("editArea.execCommand('go_to_line');", 5); // the prompt stop the return false otherwise 77 | use=true; 78 | break; 79 | case "e": 80 | editArea.execCommand("show_help"); 81 | use=true; 82 | break; 83 | case "z": 84 | use=true; 85 | editArea.execCommand("undo"); 86 | break; 87 | case "y": 88 | use=true; 89 | editArea.execCommand("redo"); 90 | break; 91 | default: 92 | break; 93 | } 94 | } 95 | 96 | // check to disable the redo possibility if the textarea content change 97 | if(editArea.next.length > 0){ 98 | setTimeout("editArea.check_redo();", 10); 99 | } 100 | 101 | setTimeout("editArea.check_file_changes();", 10); 102 | 103 | 104 | if(use){ 105 | // 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 106 | if(editArea.isIE) 107 | e.keyCode=0; 108 | return false; 109 | } 110 | //alert("Test: "+ letter + " ("+e.keyCode+") ALT: "+ AltPressed(e) + " CTRL "+ CtrlPressed(e) + " SHIFT "+ ShiftPressed(e)); 111 | 112 | return true; 113 | 114 | }; 115 | 116 | 117 | // return true if Alt key is pressed 118 | function AltPressed(e) { 119 | if (window.event) { 120 | return (window.event.altKey); 121 | } else { 122 | if(e.modifiers) 123 | return (e.altKey || (e.modifiers % 2)); 124 | else 125 | return e.altKey; 126 | } 127 | }; 128 | 129 | // return true if Ctrl key is pressed 130 | function CtrlPressed(e) { 131 | if (window.event) { 132 | return (window.event.ctrlKey); 133 | } else { 134 | return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5)); 135 | } 136 | }; 137 | 138 | // return true if Shift key is pressed 139 | function ShiftPressed(e) { 140 | if (window.event) { 141 | return (window.event.shiftKey); 142 | } else { 143 | return (e.shiftKey || (e.modifiers>3)); 144 | } 145 | }; 146 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/css.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["css"] = { 2 | 'DISPLAY_NAME' : 'CSS' 3 | ,'COMMENT_SINGLE' : {1 : '@'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : ['"', "'"] 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'attributes' : [ 9 | 'aqua', 'azimuth', 'background-attachment', 'background-color', 10 | 'background-image', 'background-position', 'background-repeat', 11 | 'background', 'border-bottom-color', 'border-bottom-style', 12 | 'border-bottom-width', 'border-left-color', 'border-left-style', 13 | 'border-left-width', 'border-right', 'border-right-color', 14 | 'border-right-style', 'border-right-width', 'border-top-color', 15 | 'border-top-style', 'border-top-width','border-bottom', 'border-collapse', 16 | 'border-left', 'border-width', 'border-color', 'border-spacing', 17 | 'border-style', 'border-top', 'border', 'caption-side', 18 | 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset', 19 | 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display', 20 | 'elevation', 'empty-cells', 'float', 'font-family', 'font-size', 21 | 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 22 | 'font-weight', 'font', 'height', 'letter-spacing', 'line-height', 23 | 'list-style', 'list-style-image', 'list-style-position', 'list-style-type', 24 | 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin', 25 | 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height', 26 | 'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style', 27 | 'outline-width', 'overflow', 'padding-bottom', 'padding-left', 28 | 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after', 29 | 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before', 30 | 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', 31 | 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation', 32 | 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration', 33 | 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi', 34 | 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows', 35 | 'width', 'word-spacing', 'z-index', 'bottom', 'left' 36 | ] 37 | ,'values' : [ 38 | 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid', 39 | 'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both', 40 | 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic', 41 | 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive', 42 | 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double', 43 | 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded', 44 | 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia', 45 | 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher', 46 | 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline', 47 | 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana', 48 | 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', 49 | 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace', 50 | 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize', 51 | 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline', 52 | 'pointer', 'portrait', 'purple', 'px', 53 | 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards', 54 | 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square', 55 | 'static', 'status-bar', 'super', 'sw-resize', 56 | 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent', 57 | 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url', 58 | 'visible', 59 | 'w-resize', 'wait', 'white', 'wider', 60 | 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 61 | 'yellow', 'yes' 62 | ] 63 | ,'specials' : [ 64 | 'important' 65 | ] 66 | } 67 | ,'OPERATORS' :[ 68 | ':', ';', '!', '.', '#' 69 | ] 70 | ,'DELIMITERS' :[ 71 | '{', '}' 72 | ] 73 | ,'STYLES' : { 74 | 'COMMENTS': 'color: #AAAAAA;' 75 | ,'QUOTESMARKS': 'color: #6381F8;' 76 | ,'KEYWORDS' : { 77 | 'attributes' : 'color: #48BDDF;' 78 | ,'values' : 'color: #2B60FF;' 79 | ,'specials' : 'color: #FF0000;' 80 | } 81 | ,'OPERATORS' : 'color: #FF00FF;' 82 | ,'DELIMITERS' : 'color: #60CA00;' 83 | 84 | } 85 | }; 86 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/tsql.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["tsql"] = { 2 | 'DISPLAY_NAME' : 'T-SQL' 3 | ,'COMMENT_SINGLE' : {1 : '--'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'" } 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements': [ 9 | 'ADD', 'EXCEPT', 'PERCENT', 'EXEC', 'PLAN', 'ALTER', 'EXECUTE', 'PRECISION', 10 | 'PRIMARY', 'EXIT', 'PRINT', 'AS', 'FETCH', 'PROC', 'ASC', 11 | 'FILE', 'PROCEDURE', 'AUTHORIZATION', 'FILLFACTOR', 'PUBLIC', 'BACKUP', 'FOR', 'RAISERROR', 12 | 'BEGIN', 'FOREIGN', 'READ', 'FREETEXT', 'READTEXT', 'BREAK', 'FREETEXTTABLE', 13 | 'RECONFIGURE', 'BROWSE', 'FROM', 'REFERENCES', 'BULK', 'FULL', 'REPLICATION', 'BY', 14 | 'FUNCTION', 'RESTORE', 'CASCADE', 'GOTO', 'RESTRICT', 'CASE', 'GRANT', 'RETURN', 15 | 'CHECK', 'GROUP', 'REVOKE', 'CHECKPOINT', 'HAVING', 'RIGHT', 'CLOSE', 'HOLDLOCK', 'ROLLBACK', 16 | 'CLUSTERED', 'IDENTITY', 'ROWCOUNT', 'IDENTITY_INSERT', 'ROWGUIDCOL', 'COLLATE', 17 | 'IDENTITYCOL', 'RULE', 'COLUMN', 'IF', 'SAVE', 'COMMIT', 'SCHEMA', 'COMPUTE', 'INDEX', 18 | 'SELECT', 'CONSTRAINT', 'CONTAINS', 'INSERT', 'SET', 19 | 'CONTAINSTABLE', 'INTERSECT', 'SETUSER', 'CONTINUE', 'INTO', 'SHUTDOWN', 'SOME', 20 | 'CREATE', 'STATISTICS', 'KEY', 'CURRENT', 'KILL', 'TABLE', 21 | 'CURRENT_DATE', 'TEXTSIZE', 'CURRENT_TIME', 'THEN', 'LINENO', 22 | 'TO', 'LOAD', 'TOP', 'CURSOR', 'NATIONAL', 'TRAN', 'DATABASE', 'NOCHECK', 23 | 'TRANSACTION', 'DBCC', 'NONCLUSTERED', 'TRIGGER', 'DEALLOCATE', 'TRUNCATE', 24 | 'DECLARE', 'TSEQUAL', 'DEFAULT', 'UNION', 'DELETE', 'OF', 'UNIQUE', 25 | 'DENY', 'OFF', 'UPDATE', 'DESC', 'OFFSETS', 'UPDATETEXT', 'DISK', 'ON', 'USE', 'DISTINCT', 'OPEN', 26 | 'DISTRIBUTED', 'OPENDATASOURCE', 'VALUES', 'DOUBLE', 'OPENQUERY', 'VARYING', 'DROP', 27 | 'OPENROWSET', 'VIEW', 'DUMMY', 'OPENXML', 'WAITFOR', 'DUMP', 'OPTION', 'WHEN', 'ELSE', 'WHERE', 28 | 'END', 'ORDER', 'WHILE', 'ERRLVL', 'WITH', 'ESCAPE', 'OVER', 'WRITETEXT' 29 | ], 30 | 'functions': [ 31 | 'COALESCE', 'SESSION_USER', 'CONVERT', 'SYSTEM_USER', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'NULLIF', 'USER', 32 | 'AVG', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'GROUPING', 'VARP', 'MAX', 33 | '@@DATEFIRST', '@@OPTIONS', '@@DBTS', '@@REMSERVER', '@@LANGID', '@@SERVERNAME', '@@LANGUAGE', '@@SERVICENAME', '@@LOCK_TIMEOUT', 34 | '@@SPID', '@@MAX_CONNECTIONS', '@@TEXTSIZE', '@@MAX_PRECISION', '@@VERSION', '@@NESTLEVEL', 35 | '@@CURSOR_ROWS', 'CURSOR_STATUS', '@@FETCH_STATUS', 36 | 'DATEADD', 'DATEDIFF', 'DATENAME', 'DATEPART', 'DAY', 'GETDATE', 'GETUTCDATE', 'MONTH', 'YEAR', 37 | 'ABS', 'DEGREES', 'RAND', 'ACOS', 'EXP', 'ROUND', 'ASIN', 'FLOOR', 'SIGN', 'ATAN', 'LOG', 'SIN', 'ATN2', 'LOG10', 'SQRT', 38 | 'CEILING', 'PI ', 'SQUARE', 'COS', 'POWER', 'TAN', 'COT', 'RADIANS', 39 | '@@PROCID', 'COL_LENGTH', 'FULLTEXTCATALOGPROPERTY', 'COL_NAME', 'FULLTEXTSERVICEPROPERTY', 'COLUMNPROPERTY', 'INDEX_COL', 40 | 'DATABASEPROPERTY', 'INDEXKEY_PROPERTY', 'DATABASEPROPERTYEX', 'INDEXPROPERTY', 'DB_ID', 'OBJECT_ID', 'DB_NAME', 'OBJECT_NAME', 41 | 'FILE_ID', 'OBJECTPROPERTY', 'OBJECTPROPERTYEX', 'FILE_NAME', 'SQL_VARIANT_PROPERTY', 'FILEGROUP_ID', 'FILEGROUP_NAME', 42 | 'FILEGROUPPROPERTY', 'TYPEPROPERTY', 'FILEPROPERTY', 43 | 'CURRENT_USER', 'SUSER_ID', 'SUSER_SID', 'IS_MEMBER', 'SUSER_SNAME', 'IS_SRVROLEMEMBER', 'PERMISSIONS', 'SYSTEM_USER', 44 | 'SUSER_NAME', 'USER_ID', 'SESSION_USER', 'USER_NAME', 'ASCII', 'SOUNDEX', 'PATINDEX', 'SPACE', 'CHARINDEX', 'QUOTENAME', 45 | 'STR', 'DIFFERENCE', 'REPLACE', 'STUFF', 'REPLICATE', 'SUBSTRING', 'LEN', 'REVERSE', 'UNICODE', 'LOWER', 46 | 'UPPER', 'LTRIM', 'RTRIM', 'APP_NAME', 'CAST', 'CONVERT', 'COALESCE', 'COLLATIONPROPERTY', 'COLUMNS_UPDATED', 'CURRENT_TIMESTAMP', 47 | 'CURRENT_USER', 'DATALENGTH', '@@ERROR', 'FORMATMESSAGE', 'GETANSINULL', 'HOST_ID', 'HOST_NAME', 'IDENT_CURRENT', 'IDENT_INCR', 48 | 'IDENT_SEED', '@@IDENTITY', 'ISDATE', 'ISNULL', 'ISNUMERIC', 'NEWID', 'NULLIF', 'PARSENAME', '@@ROWCOUNT', 49 | 'SCOPE_IDENTITY', 'SERVERPROPERTY', 'SESSIONPROPERTY', 'SESSION_USER', 'STATS_DATE', 'SYSTEM_USER', '@@TRANCOUNT', 'USER_NAME', 50 | '@@CONNECTIONS', '@@PACK_RECEIVED', '@@CPU_BUSY', '@@PACK_SENT', '@@TIMETICKS', '@@IDLE', '@@TOTAL_ERRORS', '@@IO_BUSY', '@@TOTAL_READ', 51 | '@@PACKET_ERRORS', '@@TOTAL_WRITE', 'PATINDEX', 'TEXTVALID', 'TEXTPTR' 52 | ], 53 | 'reserved': [ 54 | 'RIGHT', 'INNER', 'IS', 'JOIN', 'CROSS', 'LEFT', 'NULL', 'OUTER' 55 | ] 56 | } 57 | ,'OPERATORS' :[ 58 | '+', '-', '*', '/', '%', '=', '&' ,'|', '^', '>', '<', '>=', '<=', '<>', '!=', '!<', '!>', 'ALL', 'AND', 'ANY', 'BETWEEN', 'EXISTS', 'IN', 'LIKE', 'NOT', 'OR', '~' 59 | ] 60 | ,'DELIMITERS' :[ 61 | '(', ')', '[', ']', '{', '}' 62 | ] 63 | ,'REGEXPS' : { 64 | // highlight all variables (@...) 65 | 'variables' : { 66 | 'search' : '()(\\@\\w+)()' 67 | ,'class' : 'variables' 68 | ,'modifiers' : 'g' 69 | ,'execute' : 'before' // before or after 70 | } 71 | } 72 | ,'STYLES' : { 73 | 'COMMENTS': 'color: #008000;' 74 | ,'QUOTESMARKS': 'color: #FF0000;' 75 | ,'KEYWORDS' : { 76 | 'reserved' : 'color: #808080;' 77 | ,'functions' : 'color: #FF00FF;' 78 | ,'statements' : 'color: #0000FF;' 79 | } 80 | ,'OPERATORS' : 'color: #808080;' 81 | ,'DELIMITERS' : 'color: #FF8000;' 82 | ,'REGEXPS' : { 83 | 'variables' : 'color: #E0BD54;' 84 | } 85 | } 86 | }; 87 | 88 | 89 | -------------------------------------------------------------------------------- /edit_area/regexp.js: -------------------------------------------------------------------------------- 1 | /*EditArea.prototype.comment_or_quotes= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){ 2 | new_class="quotes"; 3 | if(v6 && v6 != undefined && v6!="") 4 | new_class="comments"; 5 | return "µ__"+ new_class +"__µ"+v0+"µ_END_µ"; 6 | 7 | };*/ 8 | 9 | /* EditArea.prototype.htmlTag= function(v0, v1, v2, v3, v4,v5,v6,v7,v8,v9, v10){ 10 | res=""+v2; 11 | alert("v2: "+v2+" v3: "+v3); 12 | tab=v3.split("="); 13 | attributes=""; 14 | if(tab.length>1){ 15 | attributes=""+tab[0]+"="; 16 | for(i=1; i"; 19 | attributes+=""+tab[i].substr(cut)+"="; 20 | } 21 | attributes+=""+tab[tab.length-1]+""; 22 | } 23 | res+=attributes+v5+""; 24 | return res; 25 | };*/ 26 | 27 | // determine if the selected text if a comment or a quoted text 28 | EditArea.prototype.comment_or_quote= function(){ 29 | var new_class="", close_tag="", sy, arg, i; 30 | sy = parent.editAreaLoader.syntax[editArea.current_code_lang]; 31 | arg = EditArea.prototype.comment_or_quote.arguments[0]; 32 | 33 | for( i in sy["quotes"] ){ 34 | if(arg.indexOf(i)==0){ 35 | new_class="quotesmarks"; 36 | close_tag=sy["quotes"][i]; 37 | } 38 | } 39 | if(new_class.length==0) 40 | { 41 | for(var i in sy["comments"]){ 42 | if( arg.indexOf(i)==0 ){ 43 | new_class="comments"; 44 | close_tag=sy["comments"][i]; 45 | } 46 | } 47 | } 48 | // for single line comment the \n must not be included in the span tags 49 | if(close_tag=="\n"){ 50 | return "µ__"+ new_class +"__µ"+ arg.replace(/(\r?\n)?$/m, "µ_END_µ$1"); 51 | }else{ 52 | // the closing tag must be set only if the comment or quotes is closed 53 | reg= new RegExp(parent.editAreaLoader.get_escaped_regexp(close_tag)+"$", "m"); 54 | if( arg.search(reg)!=-1 ) 55 | return "µ__"+ new_class +"__µ"+ arg +"µ_END_µ"; 56 | else 57 | return "µ__"+ new_class +"__µ"+ arg; 58 | } 59 | }; 60 | 61 | /* 62 | // apply special tags arround text to highlight 63 | EditArea.prototype.custom_highlight= function(){ 64 | res= EditArea.prototype.custom_highlight.arguments[1]+"µ__"+ editArea.reg_exp_span_tag +"__µ" + EditArea.prototype.custom_highlight.arguments[2]+"µ_END_µ"; 65 | if(EditArea.prototype.custom_highlight.arguments.length>5) 66 | res+= EditArea.prototype.custom_highlight.arguments[ EditArea.prototype.custom_highlight.arguments.length-3 ]; 67 | return res; 68 | }; 69 | */ 70 | 71 | // return identication that allow to know if revalidating only the text line won't make the syntax go mad 72 | EditArea.prototype.get_syntax_trace= function(text){ 73 | if(this.settings["syntax"].length>0 && parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"]) 74 | return text.replace(parent.editAreaLoader.syntax[this.settings["syntax"]]["syntax_trace_regexp"], "$3"); 75 | }; 76 | 77 | 78 | EditArea.prototype.colorize_text= function(text){ 79 | //text="
"; 80 | /* 81 | if(this.isOpera){ 82 | // opera can't use pre element tabulation cause a tab=6 chars in the textarea and 8 chars in the pre 83 | text= this.replace_tab(text); 84 | }*/ 85 | 86 | text= " "+text; // for easier regExp 87 | 88 | /*if(this.do_html_tags) 89 | text= text.replace(/(<[a-z]+ [^>]*>)/gi, '[__htmlTag__]$1[_END_]');*/ 90 | if(this.settings["syntax"].length>0) 91 | text= this.apply_syntax(text, this.settings["syntax"]); 92 | 93 | // remove the first space added 94 | return text.substr(1).replace(/&/g,"&").replace(//g,">").replace(/µ_END_µ/g,"").replace(/µ__([a-zA-Z0-9]+)__µ/g,""); 95 | }; 96 | 97 | EditArea.prototype.apply_syntax= function(text, lang){ 98 | var sy; 99 | this.current_code_lang=lang; 100 | 101 | if(!parent.editAreaLoader.syntax[lang]) 102 | return text; 103 | 104 | sy = parent.editAreaLoader.syntax[lang]; 105 | if(sy["custom_regexp"]['before']){ 106 | for( var i in sy["custom_regexp"]['before']){ 107 | var convert="$1µ__"+ sy["custom_regexp"]['before'][i]['class'] +"__µ$2µ_END_µ$3"; 108 | text= text.replace(sy["custom_regexp"]['before'][i]['regexp'], convert); 109 | } 110 | } 111 | 112 | if(sy["comment_or_quote_reg_exp"]){ 113 | //setTimeout("_$('debug_area').value=editArea.comment_or_quote_reg_exp;", 500); 114 | text= text.replace(sy["comment_or_quote_reg_exp"], this.comment_or_quote); 115 | } 116 | 117 | if(sy["keywords_reg_exp"]){ 118 | for(var i in sy["keywords_reg_exp"]){ 119 | text= text.replace(sy["keywords_reg_exp"][i], 'µ__'+i+'__µ$2µ_END_µ'); 120 | } 121 | } 122 | 123 | if(sy["delimiters_reg_exp"]){ 124 | text= text.replace(sy["delimiters_reg_exp"], 'µ__delimiters__µ$1µ_END_µ'); 125 | } 126 | 127 | if(sy["operators_reg_exp"]){ 128 | text= text.replace(sy["operators_reg_exp"], 'µ__operators__µ$1µ_END_µ'); 129 | } 130 | 131 | if(sy["custom_regexp"]['after']){ 132 | for( var i in sy["custom_regexp"]['after']){ 133 | var convert="$1µ__"+ sy["custom_regexp"]['after'][i]['class'] +"__µ$2µ_END_µ$3"; 134 | text= text.replace(sy["custom_regexp"]['after'][i]['regexp'], convert); 135 | } 136 | } 137 | 138 | return text; 139 | }; 140 | -------------------------------------------------------------------------------- /edit_area/search_replace.js: -------------------------------------------------------------------------------- 1 | EditArea.prototype.show_search = function(){ 2 | if(_$("area_search_replace").style.visibility=="visible"){ 3 | this.hidden_search(); 4 | }else{ 5 | this.open_inline_popup("area_search_replace"); 6 | var text= this.area_get_selection(); 7 | var search= text.split("\n")[0]; 8 | _$("area_search").value= search; 9 | _$("area_search").focus(); 10 | } 11 | }; 12 | 13 | EditArea.prototype.hidden_search= function(){ 14 | /*_$("area_search_replace").style.visibility="hidden"; 15 | this.textarea.focus(); 16 | var icon= _$("search"); 17 | setAttribute(icon, "class", getAttribute(icon, "class").replace(/ selected/g, "") );*/ 18 | this.close_inline_popup("area_search_replace"); 19 | }; 20 | 21 | EditArea.prototype.area_search= function(mode){ 22 | 23 | if(!mode) 24 | mode="search"; 25 | _$("area_search_msg").innerHTML=""; 26 | var search=_$("area_search").value; 27 | 28 | this.textarea.focus(); 29 | this.textarea.textareaFocused=true; 30 | 31 | var infos= this.get_selection_infos(); 32 | var start= infos["selectionStart"]; 33 | var pos=-1; 34 | var pos_begin=-1; 35 | var length=search.length; 36 | 37 | if(_$("area_search_replace").style.visibility!="visible"){ 38 | this.show_search(); 39 | return; 40 | } 41 | if(search.length==0){ 42 | _$("area_search_msg").innerHTML=this.get_translation("search_field_empty"); 43 | return; 44 | } 45 | // advance to the next occurence if no text selected 46 | if(mode!="replace" ){ 47 | if(_$("area_search_reg_exp").checked) 48 | start++; 49 | else 50 | start+= search.length; 51 | } 52 | 53 | //search 54 | if(_$("area_search_reg_exp").checked){ 55 | // regexp search 56 | var opt="m"; 57 | if(!_$("area_search_match_case").checked) 58 | opt+="i"; 59 | var reg= new RegExp(search, opt); 60 | pos= infos["full_text"].substr(start).search(reg); 61 | pos_begin= infos["full_text"].search(reg); 62 | if(pos!=-1){ 63 | pos+=start; 64 | length=infos["full_text"].substr(start).match(reg)[0].length; 65 | }else if(pos_begin!=-1){ 66 | length=infos["full_text"].match(reg)[0].length; 67 | } 68 | }else{ 69 | if(_$("area_search_match_case").checked){ 70 | pos= infos["full_text"].indexOf(search, start); 71 | pos_begin= infos["full_text"].indexOf(search); 72 | }else{ 73 | pos= infos["full_text"].toLowerCase().indexOf(search.toLowerCase(), start); 74 | pos_begin= infos["full_text"].toLowerCase().indexOf(search.toLowerCase()); 75 | } 76 | } 77 | 78 | // interpret result 79 | if(pos==-1 && pos_begin==-1){ 80 | _$("area_search_msg").innerHTML=""+search+" "+this.get_translation("not_found"); 81 | return; 82 | }else if(pos==-1 && pos_begin != -1){ 83 | begin= pos_begin; 84 | _$("area_search_msg").innerHTML=this.get_translation("restart_search_at_begin"); 85 | }else 86 | begin= pos; 87 | 88 | //_$("area_search_msg").innerHTML+=""+search+" found at "+begin+" strat at "+start+" pos "+pos+" curs"+ infos["indexOfCursor"]+"."; 89 | if(mode=="replace" && pos==infos["indexOfCursor"]){ 90 | var replace= _$("area_replace").value; 91 | var new_text=""; 92 | if(_$("area_search_reg_exp").checked){ 93 | var opt="m"; 94 | if(!_$("area_search_match_case").checked) 95 | opt+="i"; 96 | var reg= new RegExp(search, opt); 97 | new_text= infos["full_text"].substr(0, begin) + infos["full_text"].substr(start).replace(reg, replace); 98 | }else{ 99 | new_text= infos["full_text"].substr(0, begin) + replace + infos["full_text"].substr(begin + length); 100 | } 101 | this.textarea.value=new_text; 102 | this.area_select(begin, length); 103 | this.area_search(); 104 | }else 105 | this.area_select(begin, length); 106 | }; 107 | 108 | 109 | 110 | 111 | EditArea.prototype.area_replace= function(){ 112 | this.area_search("replace"); 113 | }; 114 | 115 | EditArea.prototype.area_replace_all= function(){ 116 | /* this.area_select(0, 0); 117 | _$("area_search_msg").innerHTML=""; 118 | while(_$("area_search_msg").innerHTML==""){ 119 | this.area_replace(); 120 | }*/ 121 | 122 | var base_text= this.textarea.value; 123 | var search= _$("area_search").value; 124 | var replace= _$("area_replace").value; 125 | if(search.length==0){ 126 | _$("area_search_msg").innerHTML=this.get_translation("search_field_empty"); 127 | return ; 128 | } 129 | 130 | var new_text=""; 131 | var nb_change=0; 132 | if(_$("area_search_reg_exp").checked){ 133 | // regExp 134 | var opt="mg"; 135 | if(!_$("area_search_match_case").checked) 136 | opt+="i"; 137 | var reg= new RegExp(search, opt); 138 | nb_change= infos["full_text"].match(reg).length; 139 | new_text= infos["full_text"].replace(reg, replace); 140 | 141 | }else{ 142 | 143 | if(_$("area_search_match_case").checked){ 144 | var tmp_tab=base_text.split(search); 145 | nb_change= tmp_tab.length -1 ; 146 | new_text= tmp_tab.join(replace); 147 | }else{ 148 | // case insensitive 149 | var lower_value=base_text.toLowerCase(); 150 | var lower_search=search.toLowerCase(); 151 | 152 | var start=0; 153 | var pos= lower_value.indexOf(lower_search); 154 | while(pos!=-1){ 155 | nb_change++; 156 | new_text+= this.textarea.value.substring(start , pos)+replace; 157 | start=pos+ search.length; 158 | pos= lower_value.indexOf(lower_search, pos+1); 159 | } 160 | new_text+= this.textarea.value.substring(start); 161 | } 162 | } 163 | if(new_text==base_text){ 164 | _$("area_search_msg").innerHTML=""+search+" "+this.get_translation("not_found"); 165 | }else{ 166 | this.textarea.value= new_text; 167 | _$("area_search_msg").innerHTML=""+nb_change+" "+this.get_translation("occurrence_replaced"); 168 | // firefox and opera doesn't manage with the focus if it's done directly 169 | //editArea.textarea.focus();editArea.textarea.textareaFocused=true; 170 | setTimeout("editArea.textarea.focus();editArea.textarea.textareaFocused=true;", 100); 171 | } 172 | 173 | 174 | }; 175 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/coldfusion.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["coldfusion"] = { 2 | 'DISPLAY_NAME' : 'Coldfusion' 3 | ,'COMMENT_SINGLE' : {1 : '//', 2 : '#'} 4 | ,'COMMENT_MULTI' : {''} 5 | ,'COMMENT_MULTI2' : {''} 6 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 7 | ,'KEYWORD_CASE_SENSITIVE' : false 8 | ,'KEYWORDS' : { 9 | 'statements' : [ 10 | 'include', 'require', 'include_once', 'require_once', 11 | 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 12 | 'endif', 'switch', 'case', 'endswitch', 13 | 'return', 'break', 'continue' 14 | ] 15 | ,'reserved' : [ 16 | 'AND', 'break', 'case', 'CONTAIN', 'CONTAINS', 'continue', 'default', 'do', 17 | 'DOES', 'else', 'EQ', 'EQUAL', 'EQUALTO', 'EQV', 'FALSE', 'for', 'GE', 18 | 'GREATER', 'GT', 'GTE', 'if', 'IMP', 'in', 'IS', 'LE', 'LESS', 'LT', 'LTE', 19 | 'MOD', 'NEQ', 'NOT', 'OR', 'return', 'switch', 'THAN', 'TO', 'TRUE', 'var', 20 | 'while', 'XOR' 21 | ] 22 | ,'functions' : [ 23 | 'Abs', 'ACos', 'ArrayAppend', 'ArrayAvg', 'ArrayClear', 'ArrayDeleteAt', 'ArrayInsertAt', 24 | 'ArrayIsEmpty', 'ArrayLen', 'ArrayMax', 'ArrayMin', 'ArrayNew', 'ArrayPrepend', 'ArrayResize', 25 | 'ArraySet', 'ArraySort', 'ArraySum', 'ArraySwap', 'ArrayToList', 'Asc', 'ASin', 'Atn', 'AuthenticatedContext', 26 | 'AuthenticatedUser', 'BitAnd', 'BitMaskClear', 'BitMaskRead', 'BitMaskSet', 'BitNot', 'BitOr', 27 | 'BitSHLN', 'BitSHRN', 'BitXor', 'Ceiling', 'Chr', 'CJustify', 'Compare', 'CompareNoCase', 'Cos', 28 | 'CreateDate', 'CreateDateTime', 'CreateODBCDate', 'CreateODBCDateTime', 'CreateODBCTime', 29 | 'CreateTime', 'CreateTimeSpan', 'DateAdd', 'DateCompare', 'DateConvert', 'DateDiff', 30 | 'DateFormat', 'DatePart', 'Day', 'DayOfWeek', 'DayOfWeekAsString', 'DayOfYear', 'DaysInMonth', 31 | 'DaysInYear', 'DE', 'DecimalFormat', 'DecrementValue', 'Decrypt', 'DeleteClientVariable', 32 | 'DirectoryExists', 'DollarFormat', 'Duplicate', 'Encrypt', 'Evaluate', 'Exp', 'ExpandPath', 33 | 'FileExists', 'Find', 'FindNoCase', 'FindOneOf', 'FirstDayOfMonth', 'Fix', 'FormatBaseN', 34 | 'GetBaseTagData', 'GetBaseTagList', 'GetBaseTemplatePath', 'GetClientVariablesList', 35 | 'GetCurrentTemplatePath', 'GetDirectoryFromPath', 'GetException', 'GetFileFromPath', 36 | 'GetFunctionList', 'GetHttpTimeString', 'GetHttpRequestData', 'GetLocale', 'GetMetricData', 37 | 'GetProfileString', 'GetTempDirectory', 'GetTempFile', 'GetTemplatePath', 'GetTickCount', 38 | 'GetTimeZoneInfo', 'GetToken', 'Hash', 'Hour', 'HTMLCodeFormat', 'HTMLEditFormat', 'IIf', 39 | 'IncrementValue', 'InputBaseN', 'Insert', 'Int', 'IsArray', 'IsAuthenticated', 'IsAuthorized', 40 | 'IsBoolean', 'IsBinary', 'IsCustomFunction', 'IsDate', 'IsDebugMode', 'IsDefined', 'IsLeapYear', 41 | 'IsNumeric', 'IsNumericDate', 'IsProtected', 'IsQuery', 'IsSimpleValue', 'IsStruct', 'IsWDDX', 42 | 'JavaCast', 'JSStringFormat', 'LCase', 'Left', 'Len', 'ListAppend', 'ListChangeDelims', 43 | 'ListContains', 'ListContainsNoCase', 'ListDeleteAt', 'ListFind', 'ListFindNoCase', 'ListFirst', 44 | 'ListGetAt', 'ListInsertAt', 'ListLast', 'ListLen', 'ListPrepend', 'ListQualify', 'ListRest', 45 | 'ListSetAt', 'ListSort', 'ListToArray', 'ListValueCount', 'ListValueCountNoCase', 'LJustify', 46 | 'Log', 'Log10', 'LSCurrencyFormat', 'LSDateFormat', 'LSEuroCurrencyFormat', 'LSIsCurrency', 47 | 'LSIsDate', 'LSIsNumeric', 'LSNumberFormat', 'LSParseCurrency', 'LSParseDateTime', 'LSParseNumber', 48 | 'LSTimeFormat', 'LTrim', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'MonthAsString', 'Now', 'NumberFormat', 49 | 'ParagraphFormat', 'ParameterExists', 'ParseDateTime', 'Pi', 'PreserveSingleQuotes', 'Quarter', 50 | 'QueryAddRow', 'QueryNew', 'QuerySetCell', 'QuotedValueList', 'Rand', 'Randomize', 'RandRange', 51 | 'REFind', 'REFindNoCase', 'RemoveChars', 'RepeatString', 'Replace', 'ReplaceList', 'ReplaceNoCase', 52 | 'REReplace', 'REReplaceNoCase', 'Reverse', 'Right', 'RJustify', 'Round', 'RTrim', 'Second', 'SetLocale', 53 | 'SetProfileString', 'SetVariable', 'Sgn', 'Sin', 'SpanExcluding', 'SpanIncluding', 'Sqr', 'StripCR', 54 | 'StructAppend', 'StructClear', 'StructCopy', 'StructCount', 'StructDelete', 'StructFind', 'StructFindKey', 55 | 'StructFindValue', 'StructGet', 'StructInsert', 'StructIsEmpty', 'StructKeyArray', 'StructKeyExists', 56 | 'StructKeyList', 'StructNew', 'StructSort', 'StructUpdate', 'Tan', 'TimeFormat', 'ToBase64', 'ToBinary', 57 | 'ToString', 'Trim', 'UCase', 'URLDecode', 'URLEncodedFormat', 'Val', 'ValueList', 'Week', 'WriteOutput', 58 | 'XMLFormat', 'Year', 'YesNoFormat' 59 | ] 60 | } 61 | ,'OPERATORS' :[ 62 | '+', '-', '/', '*', '%', '!', '&&', '||' 63 | ] 64 | ,'DELIMITERS' :[ 65 | '(', ')', '[', ']', '{', '}' 66 | ] 67 | ,'REGEXPS' : { 68 | 'doctype' : { 69 | 'search' : '()(]*>)()' 70 | ,'class' : 'doctype' 71 | ,'modifiers' : '' 72 | ,'execute' : 'before' // before or after 73 | } 74 | ,'cftags' : { 75 | 'search' : '(<)(/cf[a-z][^ \r\n\t>]*)([^>]*>)' 76 | ,'class' : 'cftags' 77 | ,'modifiers' : 'gi' 78 | ,'execute' : 'before' // before or after 79 | } 80 | ,'cftags2' : { 81 | 'search' : '(<)(cf[a-z][^ \r\n\t>]*)([^>]*>)' 82 | ,'class' : 'cftags2' 83 | ,'modifiers' : 'gi' 84 | ,'execute' : 'before' // before or after 85 | } 86 | ,'tags' : { 87 | 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)' 88 | ,'class' : 'tags' 89 | ,'modifiers' : 'gi' 90 | ,'execute' : 'before' // before or after 91 | } 92 | ,'attributes' : { 93 | 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)' 94 | ,'class' : 'attributes' 95 | ,'modifiers' : 'g' 96 | ,'execute' : 'before' // before or after 97 | } 98 | } 99 | ,'STYLES' : { 100 | 'COMMENTS': 'color: #AAAAAA;' 101 | ,'QUOTESMARKS': 'color: #6381F8;' 102 | ,'KEYWORDS' : { 103 | 'reserved' : 'color: #48BDDF;' 104 | ,'functions' : 'color: #0000FF;' 105 | ,'statements' : 'color: #60CA00;' 106 | } 107 | ,'OPERATORS' : 'color: #E775F0;' 108 | ,'DELIMITERS' : '' 109 | ,'REGEXPS' : { 110 | 'attributes': 'color: #990033;' 111 | ,'cftags': 'color: #990033;' 112 | ,'cftags2': 'color: #990033;' 113 | ,'tags': 'color: #000099;' 114 | ,'doctype': 'color: #8DCFB5;' 115 | ,'test': 'color: #00FF00;' 116 | } 117 | } 118 | }; 119 | 120 | 121 | -------------------------------------------------------------------------------- /edit_area/reg_syntax.js: -------------------------------------------------------------------------------- 1 | EditAreaLoader.prototype.get_regexp= function(text_array){ 2 | //res="( |=|\\n|\\r|\\[|\\(|µ|)("; 3 | res="(\\b)("; 4 | for(i=0; i0) 6 | res+="|"; 7 | //res+="("+ tab_text[i] +")"; 8 | //res+=tab_text[i].replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\{|\})/g, "\\$1"); 9 | res+=this.get_escaped_regexp(text_array[i]); 10 | } 11 | //res+=")( |\\.|:|\\{|\\(|\\)|\\[|\\]|\'|\"|\\r|\\n|\\t|$)"; 12 | res+=")(\\b)"; 13 | reg= new RegExp(res); 14 | 15 | return res; 16 | }; 17 | 18 | 19 | EditAreaLoader.prototype.get_escaped_regexp= function(str){ 20 | return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g, "\\$1"); 21 | }; 22 | 23 | EditAreaLoader.prototype.init_syntax_regexp= function(){ 24 | var lang_style= {}; 25 | for(var lang in this.load_syntax){ 26 | if(!this.syntax[lang]) // init the regexp if not already initialized 27 | { 28 | this.syntax[lang]= {}; 29 | this.syntax[lang]["keywords_reg_exp"]= {}; 30 | this.keywords_reg_exp_nb=0; 31 | 32 | if(this.load_syntax[lang]['KEYWORDS']){ 33 | param="g"; 34 | if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false) 35 | param+="i"; 36 | for(var i in this.load_syntax[lang]['KEYWORDS']){ 37 | if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function") continue; 38 | this.syntax[lang]["keywords_reg_exp"][i]= new RegExp(this.get_regexp( this.load_syntax[lang]['KEYWORDS'][i] ), param); 39 | this.keywords_reg_exp_nb++; 40 | } 41 | } 42 | 43 | if(this.load_syntax[lang]['OPERATORS']){ 44 | var str=""; 45 | var nb=0; 46 | for(var i in this.load_syntax[lang]['OPERATORS']){ 47 | if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function") continue; 48 | if(nb>0) 49 | str+="|"; 50 | str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]); 51 | nb++; 52 | } 53 | if(str.length>0) 54 | this.syntax[lang]["operators_reg_exp"]= new RegExp("("+str+")","g"); 55 | } 56 | 57 | if(this.load_syntax[lang]['DELIMITERS']){ 58 | var str=""; 59 | var nb=0; 60 | for(var i in this.load_syntax[lang]['DELIMITERS']){ 61 | if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function") continue; 62 | if(nb>0) 63 | str+="|"; 64 | str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]); 65 | nb++; 66 | } 67 | if(str.length>0) 68 | this.syntax[lang]["delimiters_reg_exp"]= new RegExp("("+str+")","g"); 69 | } 70 | 71 | 72 | // /(("(\\"|[^"])*"?)|('(\\'|[^'])*'?)|(//(.|\r|\t)*\n)|(/\*(.|\n|\r|\t)*\*/)|())/gi 73 | var syntax_trace=[]; 74 | 75 | // /("(?:[^"\\]*(\\\\)*(\\"?)?)*("|$))/g 76 | 77 | this.syntax[lang]["quotes"]={}; 78 | var quote_tab= []; 79 | if(this.load_syntax[lang]['QUOTEMARKS']){ 80 | for(var i in this.load_syntax[lang]['QUOTEMARKS']){ 81 | if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function") continue; 82 | var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]); 83 | this.syntax[lang]["quotes"][x]=x; 84 | //quote_tab[quote_tab.length]="("+x+"(?:\\\\"+x+"|[^"+x+"])*("+x+"|$))"; 85 | //previous working : quote_tab[quote_tab.length]="("+x+"(?:[^"+x+"\\\\]*(\\\\\\\\)*(\\\\"+x+"?)?)*("+x+"|$))"; 86 | quote_tab[quote_tab.length]="("+ x +"(\\\\.|[^"+ x +"])*(?:"+ x +"|$))"; 87 | 88 | syntax_trace.push(x); 89 | } 90 | } 91 | 92 | this.syntax[lang]["comments"]={}; 93 | if(this.load_syntax[lang]['COMMENT_SINGLE']){ 94 | for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){ 95 | if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function") continue; 96 | var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]); 97 | quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))"; 98 | syntax_trace.push(x); 99 | this.syntax[lang]["comments"][x]="\n"; 100 | } 101 | } 102 | // (/\*(.|[\r\n])*?\*/) 103 | if(this.load_syntax[lang]['COMMENT_MULTI']){ 104 | for(var i in this.load_syntax[lang]['COMMENT_MULTI']){ 105 | if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function") continue; 106 | var start=this.get_escaped_regexp(i); 107 | var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]); 108 | quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))"; 109 | syntax_trace.push(start); 110 | syntax_trace.push(end); 111 | this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i]; 112 | } 113 | } 114 | if(quote_tab.length>0) 115 | this.syntax[lang]["comment_or_quote_reg_exp"]= new RegExp("("+quote_tab.join("|")+")","gi"); 116 | 117 | if(syntax_trace.length>0) // /((.|\n)*?)(\\*("|'|\/\*|\*\/|\/\/|$))/g 118 | this.syntax[lang]["syntax_trace_regexp"]= new RegExp("((.|\n)*?)(\\\\*("+ syntax_trace.join("|") +"|$))", "gmi"); 119 | 120 | if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){ 121 | this.syntax[lang]["script_delimiters"]= {}; 122 | for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){ 123 | if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function") continue; 124 | this.syntax[lang]["script_delimiters"][i]= this.load_syntax[lang]['SCRIPT_DELIMITERS']; 125 | } 126 | } 127 | 128 | this.syntax[lang]["custom_regexp"]= {}; 129 | if(this.load_syntax[lang]['REGEXPS']){ 130 | for(var i in this.load_syntax[lang]['REGEXPS']){ 131 | if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function") continue; 132 | var val= this.load_syntax[lang]['REGEXPS'][i]; 133 | if(!this.syntax[lang]["custom_regexp"][val['execute']]) 134 | this.syntax[lang]["custom_regexp"][val['execute']]= {}; 135 | this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp' : new RegExp(val['search'], val['modifiers']) 136 | , 'class' : val['class']}; 137 | } 138 | } 139 | 140 | if(this.load_syntax[lang]['STYLES']){ 141 | lang_style[lang]= {}; 142 | for(var i in this.load_syntax[lang]['STYLES']){ 143 | if(typeof(this.load_syntax[lang]['STYLES'][i])=="function") continue; 144 | if(typeof(this.load_syntax[lang]['STYLES'][i]) != "string"){ 145 | for(var j in this.load_syntax[lang]['STYLES'][i]){ 146 | lang_style[lang][j]= this.load_syntax[lang]['STYLES'][i][j]; 147 | } 148 | }else{ 149 | lang_style[lang][i]= this.load_syntax[lang]['STYLES'][i]; 150 | } 151 | } 152 | } 153 | // build style string 154 | var style=""; 155 | for(var i in lang_style[lang]){ 156 | if(lang_style[lang][i].length>0){ 157 | style+= "."+ lang +" ."+ i.toLowerCase() +" span{"+lang_style[lang][i]+"}\n"; 158 | style+= "."+ lang +" ."+ i.toLowerCase() +"{"+lang_style[lang][i]+"}\n"; 159 | } 160 | } 161 | this.syntax[lang]["styles"]=style; 162 | } 163 | } 164 | }; 165 | 166 | editAreaLoader.waiting_loading["reg_syntax.js"]= "loaded"; 167 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/python.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Python syntax v 1.1 3 | * 4 | * v1.1 by Andre Roberge (2006/12/27) 5 | * 6 | **/ 7 | editAreaLoader.load_syntax["python"] = { 8 | 'DISPLAY_NAME' : 'Python' 9 | ,'COMMENT_SINGLE' : {1 : '#'} 10 | ,'COMMENT_MULTI' : {} 11 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 12 | ,'KEYWORD_CASE_SENSITIVE' : true 13 | ,'KEYWORDS' : { 14 | /* 15 | ** Set 1: reserved words 16 | ** http://python.org/doc/current/ref/keywords.html 17 | ** Note: 'as' and 'with' have been added starting with Python 2.5 18 | */ 19 | 'reserved' : [ 20 | 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 21 | 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 22 | 'import', 'is', 'in', 'lambda', 'not', 'or', 'pass', 'print', 'raise', 23 | 'return', 'try', 'while', 'with', 'yield' 24 | //the following are *almost* reserved; we'll treat them as such 25 | , 'False', 'True', 'None' 26 | ] 27 | /* 28 | ** Set 2: builtins 29 | ** http://python.org/doc/current/lib/built-in-funcs.html 30 | */ 31 | ,'builtins' : [ 32 | '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', 33 | 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', 34 | 'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 35 | 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals', 36 | 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', 37 | 'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 38 | 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 39 | 'vars', 'xrange', 'zip', 40 | // Built-in constants: http://www.python.org/doc/2.4.1/lib/node35.html 41 | //'False', 'True', 'None' have been included in 'reserved' 42 | 'NotImplemented', 'Ellipsis', 43 | // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html 44 | 'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError', 45 | 'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError', 46 | 'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError', 47 | 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError', 48 | 'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError', 49 | 'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', 50 | 'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning', 51 | 'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', 52 | 'RuntimeWarning', 'FutureWarning', 53 | // we will include the string methods as well 54 | // http://python.org/doc/current/lib/string-methods.html 55 | 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 56 | 'find', 'index', 'isalnum', 'isaplpha', 'isdigit', 'islower', 'isspace', 'istitle', 57 | 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', 58 | 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 59 | 'translate', 'upper', 'zfill' 60 | ] 61 | /* 62 | ** Set 3: standard library 63 | ** http://python.org/doc/current/lib/modindex.html 64 | */ 65 | ,'stdlib' : [ 66 | '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm', 67 | 'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer', 68 | 'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi', 69 | 'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop', 70 | 'collections', 'colorsys', 'commands', 'compileall', 'compiler', 'compiler', 71 | 'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt', 72 | 'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE', 73 | 'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm', 74 | 'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl', 75 | 'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl', 76 | 'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob', 77 | 'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib', 78 | 'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect', 79 | 'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap', 80 | 'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify', 81 | 'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator', 82 | 'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes', 83 | 'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile', 84 | 'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random', 85 | 're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter', 86 | 'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve', 87 | 'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd', 88 | 'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string', 89 | 'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev', 90 | 'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', 91 | 'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token', 92 | 'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2', 93 | 'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings', 94 | 'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml', 95 | 'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib' 96 | 97 | ] 98 | /* 99 | ** Set 4: special methods 100 | ** http://python.org/doc/current/ref/specialnames.html 101 | */ 102 | ,'special' : [ 103 | // Basic customization: http://python.org/doc/current/ref/customization.html 104 | '__new__', '__init__', '__del__', '__repr__', '__str__', 105 | '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__', 106 | '__hash__', '__nonzero__', '__unicode__', '__dict__', 107 | // Attribute access: http://python.org/doc/current/ref/attribute-access.html 108 | '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__', 109 | '__delete__', '__slots__', 110 | // Class creation, callable objects 111 | '__metaclass__', '__call__', 112 | // Container types: http://python.org/doc/current/ref/sequence-types.html 113 | '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__', 114 | '__getslice__', '__setslice__', '__delslice__', 115 | // Numeric types: http://python.org/doc/current/ref/numeric-types.html 116 | '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__', 117 | '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__', 118 | '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__', 119 | '__long__','__lshift__', 120 | '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__', 121 | '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__', 122 | '__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__', 123 | '__sub__','__xor__' 124 | ] 125 | } 126 | ,'OPERATORS' :[ 127 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ',' 128 | ] 129 | ,'DELIMITERS' :[ 130 | '(', ')', '[', ']', '{', '}' 131 | ] 132 | ,'STYLES' : { 133 | 'COMMENTS': 'color: #AAAAAA;' 134 | ,'QUOTESMARKS': 'color: #660066;' 135 | ,'KEYWORDS' : { 136 | 'reserved' : 'color: #0000FF;' 137 | ,'builtins' : 'color: #009900;' 138 | ,'stdlib' : 'color: #009900;' 139 | ,'special': 'color: #006666;' 140 | } 141 | ,'OPERATORS' : 'color: #993300;' 142 | ,'DELIMITERS' : 'color: #993300;' 143 | 144 | } 145 | }; 146 | -------------------------------------------------------------------------------- /edit_area/elements_functions.js: -------------------------------------------------------------------------------- 1 | /**** 2 | * This page contains some general usefull functions for javascript 3 | * 4 | ****/ 5 | 6 | 7 | // need to redefine this functiondue to IE problem 8 | function getAttribute( elm, aName ) { 9 | var aValue,taName,i; 10 | try{ 11 | aValue = elm.getAttribute( aName ); 12 | }catch(exept){} 13 | 14 | if( ! aValue ){ 15 | for( i = 0; i < elm.attributes.length; i ++ ) { 16 | taName = elm.attributes[i] .name.toLowerCase(); 17 | if( taName == aName ) { 18 | aValue = elm.attributes[i] .value; 19 | return aValue; 20 | } 21 | } 22 | } 23 | return aValue; 24 | }; 25 | 26 | // need to redefine this function due to IE problem 27 | function setAttribute( elm, attr, val ) { 28 | if(attr=="class"){ 29 | elm.setAttribute("className", val); 30 | elm.setAttribute("class", val); 31 | }else{ 32 | elm.setAttribute(attr, val); 33 | } 34 | }; 35 | 36 | /* return a child element 37 | elem: element we are searching in 38 | elem_type: type of the eleemnt we are searching (DIV, A, etc...) 39 | elem_attribute: attribute of the searched element that must match 40 | elem_attribute_match: value that elem_attribute must match 41 | option: "all" if must return an array of all children, otherwise return the first match element 42 | depth: depth of search (-1 or no set => unlimited) 43 | */ 44 | function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth) 45 | { 46 | if(!option) 47 | var option="single"; 48 | if(!depth) 49 | var depth=-1; 50 | if(elem){ 51 | var children= elem.childNodes; 52 | var result=null; 53 | var results= []; 54 | for (var x=0;x0){ 70 | results= results.concat(result); 71 | } 72 | }else if(result!=null){ 73 | return result; 74 | } 75 | } 76 | } 77 | } 78 | if(option=="all") 79 | return results; 80 | } 81 | return null; 82 | }; 83 | 84 | function isChildOf(elem, parent){ 85 | if(elem){ 86 | if(elem==parent) 87 | return true; 88 | while(elem.parentNode != 'undefined'){ 89 | return isChildOf(elem.parentNode, parent); 90 | } 91 | } 92 | return false; 93 | }; 94 | 95 | function getMouseX(e){ 96 | 97 | if(e!=null && typeof(e.pageX)!="undefined"){ 98 | return e.pageX; 99 | }else{ 100 | return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft; 101 | } 102 | }; 103 | 104 | function getMouseY(e){ 105 | if(e!=null && typeof(e.pageY)!="undefined"){ 106 | return e.pageY; 107 | }else{ 108 | return (e!=null?e.y:event.y)+ document.documentElement.scrollTop; 109 | } 110 | }; 111 | 112 | function calculeOffsetLeft(r){ 113 | return calculeOffset(r,"offsetLeft") 114 | }; 115 | 116 | function calculeOffsetTop(r){ 117 | return calculeOffset(r,"offsetTop") 118 | }; 119 | 120 | function calculeOffset(element,attr){ 121 | var offset=0; 122 | while(element){ 123 | offset+=element[attr]; 124 | element=element.offsetParent 125 | } 126 | return offset; 127 | }; 128 | 129 | /** return the computed style 130 | * @param: elem: the reference to the element 131 | * @param: prop: the name of the css property 132 | */ 133 | function get_css_property(elem, prop) 134 | { 135 | if(document.defaultView) 136 | { 137 | return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop); 138 | } 139 | else if(elem.currentStyle) 140 | { 141 | var prop = prop.replace(/-\D/gi, function(sMatch) 142 | { 143 | return sMatch.charAt(sMatch.length - 1).toUpperCase(); 144 | }); 145 | return elem.currentStyle[prop]; 146 | } 147 | else return null; 148 | } 149 | 150 | /**** 151 | * Moving an element 152 | ***/ 153 | 154 | var _mCE; // currently moving element 155 | 156 | /* allow to move an element in a window 157 | e: the event 158 | id: the id of the element 159 | frame: the frame of the element 160 | ex of use: 161 | in html: 162 | or 163 | in javascript: document.getElementById("my_div").onmousedown= start_move_element 164 | */ 165 | function start_move_element(e, id, frame){ 166 | var elem_id=(e.target || e.srcElement).id; 167 | if(id) 168 | elem_id=id; 169 | if(!frame) 170 | frame=window; 171 | if(frame.event) 172 | e=frame.event; 173 | 174 | _mCE= frame.document.getElementById(elem_id); 175 | _mCE.frame=frame; 176 | frame.document.onmousemove= move_element; 177 | frame.document.onmouseup= end_move_element; 178 | /*_mCE.onmousemove= move_element; 179 | _mCE.onmouseup= end_move_element;*/ 180 | 181 | //alert(_mCE.frame.document.body.offsetHeight); 182 | 183 | mouse_x= getMouseX(e); 184 | mouse_y= getMouseY(e); 185 | //window.status=frame+ " elem: "+elem_id+" elem: "+ _mCE + " mouse_x: "+mouse_x; 186 | _mCE.start_pos_x = mouse_x - (_mCE.style.left.replace("px","") || calculeOffsetLeft(_mCE)); 187 | _mCE.start_pos_y = mouse_y - (_mCE.style.top.replace("px","") || calculeOffsetTop(_mCE)); 188 | return false; 189 | }; 190 | 191 | function end_move_element(e){ 192 | _mCE.frame.document.onmousemove= ""; 193 | _mCE.frame.document.onmouseup= ""; 194 | _mCE=null; 195 | }; 196 | 197 | function move_element(e){ 198 | var newTop,newLeft,maxLeft; 199 | 200 | if( _mCE.frame && _mCE.frame.event ) 201 | e=_mCE.frame.event; 202 | newTop = getMouseY(e) - _mCE.start_pos_y; 203 | newLeft = getMouseX(e) - _mCE.start_pos_x; 204 | 205 | maxLeft = _mCE.frame.document.body.offsetWidth- _mCE.offsetWidth; 206 | max_top = _mCE.frame.document.body.offsetHeight- _mCE.offsetHeight; 207 | newTop = Math.min(Math.max(0, newTop), max_top); 208 | newLeft = Math.min(Math.max(0, newLeft), maxLeft); 209 | 210 | _mCE.style.top = newTop+"px"; 211 | _mCE.style.left = newLeft+"px"; 212 | return false; 213 | }; 214 | 215 | /*** 216 | * Managing a textarea (this part need the navigator infos from editAreaLoader 217 | ***/ 218 | 219 | var nav= editAreaLoader.nav; 220 | 221 | // allow to get infos on the selection: array(start, end) 222 | function getSelectionRange(textarea){ 223 | return {"start": textarea.selectionStart, "end": textarea.selectionEnd}; 224 | }; 225 | 226 | // allow to set the selection 227 | function setSelectionRange(t, start, end){ 228 | t.focus(); 229 | 230 | start = Math.max(0, Math.min(t.value.length, start)); 231 | end = Math.max(start, Math.min(t.value.length, end)); 232 | 233 | if( nav.isOpera && nav.isOpera < 9.6 ){ // Opera bug when moving selection start and selection end 234 | t.selectionEnd = 1; 235 | t.selectionStart = 0; 236 | t.selectionEnd = 1; 237 | t.selectionStart = 0; 238 | } 239 | t.selectionStart = start; 240 | t.selectionEnd = end; 241 | //textarea.setSelectionRange(start, end); 242 | 243 | if(nav.isIE) 244 | set_IE_selection(t); 245 | }; 246 | 247 | 248 | // set IE position in Firefox mode (textarea.selectionStart and textarea.selectionEnd). should work as a repeated task 249 | function get_IE_selection(t){ 250 | var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab; 251 | if(t && t.focused) 252 | { 253 | if(!t.ea_line_height) 254 | { // calculate the lineHeight 255 | div= d.createElement("div"); 256 | div.style.fontFamily= get_css_property(t, "font-family"); 257 | div.style.fontSize= get_css_property(t, "font-size"); 258 | div.style.visibility= "hidden"; 259 | div.innerHTML="0"; 260 | d.body.appendChild(div); 261 | t.ea_line_height= div.offsetHeight; 262 | d.body.removeChild(div); 263 | } 264 | //t.focus(); 265 | range = d.selection.createRange(); 266 | try 267 | { 268 | stored_range = range.duplicate(); 269 | stored_range.moveToElementText( t ); 270 | stored_range.setEndPoint( 'EndToEnd', range ); 271 | if(stored_range.parentElement() == t){ 272 | // the range don't take care of empty lines in the end of the selection 273 | elem = t; 274 | scrollTop = 0; 275 | while(elem.parentNode){ 276 | scrollTop+= elem.scrollTop; 277 | elem = elem.parentNode; 278 | } 279 | 280 | // var scrollTop= t.scrollTop + document.body.scrollTop; 281 | 282 | // var relative_top= range.offsetTop - calculeOffsetTop(t) + scrollTop; 283 | relative_top= range.offsetTop - calculeOffsetTop(t)+ scrollTop; 284 | // alert("rangeoffset: "+ range.offsetTop +"\ncalcoffsetTop: "+ calculeOffsetTop(t) +"\nrelativeTop: "+ relative_top); 285 | line_start = Math.round((relative_top / t.ea_line_height) +1); 286 | 287 | line_nb = Math.round(range.boundingHeight / t.ea_line_height); 288 | 289 | range_start = stored_range.text.length - range.text.length; 290 | tab = t.value.substr(0, range_start).split("\n"); 291 | range_start += (line_start - tab.length)*2; // add missing empty lines to the selection 292 | t.selectionStart = range_start; 293 | 294 | range_end = t.selectionStart + range.text.length; 295 | tab = t.value.substr(0, range_start + range.text.length).split("\n"); 296 | range_end += (line_start + line_nb - 1 - tab.length)*2; 297 | t.selectionEnd = range_end; 298 | } 299 | } 300 | catch(e){} 301 | } 302 | if( t && t.id ) 303 | { 304 | setTimeout("get_IE_selection(document.getElementById('"+ t.id +"'));", 50); 305 | } 306 | }; 307 | 308 | function IE_textarea_focus(){ 309 | event.srcElement.focused= true; 310 | } 311 | 312 | function IE_textarea_blur(){ 313 | event.srcElement.focused= false; 314 | } 315 | 316 | // select the text for IE (take into account the \r difference) 317 | function set_IE_selection( t ){ 318 | var nbLineStart,nbLineStart,nbLineEnd,range; 319 | if(!window.closed){ 320 | nbLineStart=t.value.substr(0, t.selectionStart).split("\n").length - 1; 321 | nbLineEnd=t.value.substr(0, t.selectionEnd).split("\n").length - 1; 322 | try 323 | { 324 | range = document.selection.createRange(); 325 | range.moveToElementText( t ); 326 | range.setEndPoint( 'EndToStart', range ); 327 | range.moveStart('character', t.selectionStart - nbLineStart); 328 | range.moveEnd('character', t.selectionEnd - nbLineEnd - (t.selectionStart - nbLineStart) ); 329 | range.select(); 330 | } 331 | catch(e){} 332 | } 333 | }; 334 | 335 | 336 | editAreaLoader.waiting_loading["elements_functions.js"]= "loaded"; 337 | -------------------------------------------------------------------------------- /edit_area/edit_area.css: -------------------------------------------------------------------------------- 1 | body, html{ 2 | margin: 0; 3 | padding: 0; 4 | height: 100%; 5 | border: none; 6 | overflow: hidden; 7 | background-color: #FFF; 8 | } 9 | 10 | body, html, table, form, textarea{ 11 | font: 12px monospace, sans-serif; 12 | } 13 | 14 | #editor{ 15 | border: solid #888 1px; 16 | overflow: hidden; 17 | } 18 | 19 | #result{ 20 | z-index: 4; 21 | overflow-x: auto; 22 | overflow-y: scroll; 23 | border-top: solid #888 1px; 24 | border-bottom: solid #888 1px; 25 | position: relative; 26 | clear: both; 27 | } 28 | 29 | #result.empty{ 30 | overflow: hidden; 31 | } 32 | 33 | #container{ 34 | overflow: hidden; 35 | border: solid blue 0; 36 | position: relative; 37 | z-index: 10; 38 | padding: 0 5px 0 45px; 39 | /*padding-right: 5px;*/ 40 | } 41 | 42 | #textarea{ 43 | position: relative; 44 | top: 0; 45 | left: 0; 46 | margin: 0; 47 | padding: 0; 48 | width: 100%; 49 | height: 100%; 50 | overflow: hidden; 51 | z-index: 7; 52 | border-width: 0; 53 | background-color: transparent; 54 | resize: none; 55 | } 56 | 57 | #textarea, #textarea:hover{ 58 | outline: none; /* safari outline fix */ 59 | } 60 | 61 | #content_highlight{ 62 | white-space: pre; 63 | margin: 0; 64 | padding: 0; 65 | position : absolute; 66 | z-index: 4; 67 | overflow: visible; 68 | } 69 | 70 | 71 | #selection_field, #selection_field_text{ 72 | margin: 0; 73 | background-color: #E1F2F9; 74 | /* height: 1px; */ 75 | position: absolute; 76 | z-index: 5; 77 | top: -100px; 78 | padding: 0; 79 | white-space: pre; 80 | overflow: hidden; 81 | } 82 | 83 | #selection_field.show_colors { 84 | z-index: 3; 85 | background-color:#EDF9FC; 86 | 87 | } 88 | 89 | #selection_field strong{ 90 | font-weight:normal; 91 | } 92 | 93 | #selection_field.show_colors *, #selection_field_text * { 94 | visibility: hidden; 95 | } 96 | 97 | #selection_field_text{ 98 | background-color:transparent; 99 | } 100 | 101 | #selection_field_text strong{ 102 | font-weight:normal; 103 | background-color:#3399FE; 104 | color: #FFF; 105 | visibility:visible; 106 | } 107 | 108 | #container.word_wrap #content_highlight, 109 | #container.word_wrap #selection_field, 110 | #container.word_wrap #selection_field_text, 111 | #container.word_wrap #test_font_size{ 112 | white-space: pre-wrap; /* css-3 */ 113 | white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ 114 | white-space: -pre-wrap; /* Opera 4-6 */ 115 | white-space: -o-pre-wrap; /* Opera 7 */ 116 | word-wrap: break-word; /* Internet Explorer 5.5+ */ 117 | width: 99%; 118 | } 119 | 120 | #line_number{ 121 | position: absolute; 122 | overflow: hidden; 123 | border-right: solid black 1px; 124 | z-index:8; 125 | width: 38px; 126 | padding: 0 5px 0 0; 127 | margin: 0 0 0 -45px; 128 | text-align: right; 129 | color: #AAAAAA; 130 | } 131 | 132 | #test_font_size{ 133 | padding: 0; 134 | margin: 0; 135 | visibility: hidden; 136 | position: absolute; 137 | white-space: pre; 138 | } 139 | 140 | pre{ 141 | margin: 0; 142 | padding: 0; 143 | } 144 | 145 | .hidden{ 146 | opacity: 0.2; 147 | filter:alpha(opacity=20); 148 | } 149 | 150 | #result .edit_area_cursor{ 151 | position: absolute; 152 | z-index:6; 153 | background-color: #FF6633; 154 | top: -100px; 155 | margin: 0; 156 | } 157 | 158 | #result .edit_area_selection_field .overline{ 159 | background-color: #996600; 160 | } 161 | 162 | 163 | /* area popup */ 164 | .editarea_popup{ 165 | border: solid 1px #888888; 166 | background-color: #ECE9D8; 167 | width: 250px; 168 | padding: 4px; 169 | position: absolute; 170 | visibility: hidden; 171 | z-index: 15; 172 | top: -500px; 173 | } 174 | 175 | .editarea_popup, .editarea_popup table{ 176 | font-family: sans-serif; 177 | font-size: 10pt; 178 | } 179 | 180 | .editarea_popup img{ 181 | border: 0; 182 | } 183 | 184 | .editarea_popup .close_popup{ 185 | float: right; 186 | line-height: 16px; 187 | border: 0; 188 | padding: 0; 189 | } 190 | 191 | .editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{ 192 | margin: 0; 193 | padding: 0; 194 | } 195 | 196 | .editarea_popup .copyright{ 197 | text-align: right; 198 | } 199 | 200 | /* Area_search */ 201 | div#area_search_replace{ 202 | /*width: 250px;*/ 203 | } 204 | 205 | div#area_search_replace img{ 206 | border: 0; 207 | } 208 | 209 | div#area_search_replace div.button{ 210 | text-align: center; 211 | line-height: 1.7em; 212 | } 213 | 214 | div#area_search_replace .button a{ 215 | cursor: pointer; 216 | border: solid 1px #888888; 217 | background-color: #DEDEDE; 218 | text-decoration: none; 219 | padding: 0 2px; 220 | color: #000000; 221 | white-space: nowrap; 222 | } 223 | 224 | div#area_search_replace a:hover{ 225 | /*border: solid 1px #888888;*/ 226 | background-color: #EDEDED; 227 | } 228 | 229 | div#area_search_replace #move_area_search_replace{ 230 | cursor: move; 231 | border: solid 1px #888; 232 | } 233 | 234 | div#area_search_replace #close_area_search_replace{ 235 | text-align: right; 236 | vertical-align: top; 237 | white-space: nowrap; 238 | } 239 | 240 | div#area_search_replace #area_search_msg{ 241 | height: 18px; 242 | overflow: hidden; 243 | border-top: solid 1px #888; 244 | margin-top: 3px; 245 | } 246 | 247 | /* area help */ 248 | #edit_area_help{ 249 | width: 350px; 250 | } 251 | 252 | #edit_area_help div.close_popup{ 253 | float: right; 254 | } 255 | 256 | /* area_toolbar */ 257 | .area_toolbar{ 258 | /*font: 11px sans-serif;*/ 259 | width: 100%; 260 | /*height: 21px; */ 261 | margin: 0; 262 | padding: 0; 263 | background-color: #ECE9D8; 264 | text-align: center; 265 | } 266 | 267 | .area_toolbar, .area_toolbar table{ 268 | font: 11px sans-serif; 269 | } 270 | 271 | .area_toolbar img{ 272 | border: 0; 273 | vertical-align: middle; 274 | } 275 | 276 | .area_toolbar input{ 277 | margin: 0; 278 | padding: 0; 279 | } 280 | 281 | .area_toolbar select{ 282 | font-family: 'MS Sans Serif',sans-serif,Verdana,Arial; 283 | font-size: 7pt; 284 | font-weight: normal; 285 | margin: 2px 0 0 0 ; 286 | padding: 0; 287 | vertical-align: top; 288 | background-color: #F0F0EE; 289 | } 290 | 291 | table.statusbar{ 292 | width: 100%; 293 | } 294 | 295 | .area_toolbar td.infos{ 296 | text-align: center; 297 | width: 130px; 298 | border-right: solid 1px #888; 299 | border-width: 0 1px 0 0; 300 | padding: 0; 301 | } 302 | 303 | .area_toolbar td.total{ 304 | text-align: right; 305 | width: 50px; 306 | padding: 0; 307 | } 308 | 309 | .area_toolbar td.resize{ 310 | text-align: right; 311 | } 312 | /* 313 | .area_toolbar span{ 314 | line-height: 1px; 315 | padding: 0; 316 | margin: 0; 317 | }*/ 318 | 319 | .area_toolbar span#resize_area{ 320 | cursor: nw-resize; 321 | visibility: hidden; 322 | } 323 | 324 | /* toolbar buttons */ 325 | .editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected { 326 | border: 0; margin: 0; padding: 0; background: transparent; 327 | margin-top: 0; 328 | margin-left: 1px; 329 | padding: 0; 330 | } 331 | 332 | .editAreaButtonNormal { 333 | border: 1px solid #ECE9D8 !important; 334 | cursor: pointer; 335 | } 336 | 337 | .editAreaButtonOver { 338 | border: 1px solid #0A246A !important; 339 | cursor: pointer; 340 | background-color: #B6BDD2; 341 | } 342 | 343 | .editAreaButtonDown { 344 | cursor: pointer; 345 | border: 1px solid #0A246A !important; 346 | background-color: #8592B5; 347 | } 348 | 349 | .editAreaButtonSelected { 350 | border: 1px solid #C0C0BB !important; 351 | cursor: pointer; 352 | background-color: #F4F2E8; 353 | } 354 | 355 | .editAreaButtonDisabled { 356 | filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); 357 | -moz-opacity:0.3; 358 | opacity: 0.3; 359 | border: 1px solid #F0F0EE !important; 360 | cursor: pointer; 361 | } 362 | 363 | .editAreaSeparatorLine { 364 | margin: 1px 2px; 365 | background-color: #C0C0BB; 366 | width: 2px; 367 | height: 18px; 368 | } 369 | 370 | /* waiting screen */ 371 | #processing{ 372 | display: none; 373 | background-color:#ECE9D8; 374 | border: solid #888 1px; 375 | position: absolute; 376 | top: 0; 377 | left: 0; 378 | width: 100%; 379 | height: 100%; 380 | z-index: 100; 381 | text-align: center; 382 | } 383 | 384 | #processing_text{ 385 | position:absolute; 386 | left: 50%; 387 | top: 50%; 388 | width: 200px; 389 | height: 20px; 390 | margin-left: -100px; 391 | margin-top: -10px; 392 | text-align: center; 393 | } 394 | /* end */ 395 | 396 | 397 | /**** tab browsing area ****/ 398 | #tab_browsing_area{ 399 | display: none; 400 | background-color: #CCC9A8; 401 | border-top: 1px solid #888; 402 | text-align: left; 403 | margin: 0; 404 | } 405 | 406 | #tab_browsing_list { 407 | padding: 0; 408 | margin: 0; 409 | list-style-type: none; 410 | white-space: nowrap; 411 | } 412 | #tab_browsing_list li { 413 | float: left; 414 | margin: -1px; 415 | } 416 | #tab_browsing_list a { 417 | position: relative; 418 | display: block; 419 | text-decoration: none; 420 | float: left; 421 | cursor: pointer; 422 | line-height:14px; 423 | } 424 | 425 | #tab_browsing_list a span { 426 | display: block; 427 | color: #000; 428 | background: #ECE9D8; 429 | border: 1px solid #888; 430 | border-width: 1px 1px 0; 431 | text-align: center; 432 | padding: 2px 2px 1px 4px; 433 | position: relative; /*IE 6 hack */ 434 | } 435 | 436 | #tab_browsing_list a b { 437 | display: block; 438 | border-bottom: 2px solid #617994; 439 | } 440 | 441 | #tab_browsing_list a .edited { 442 | display: none; 443 | } 444 | 445 | #tab_browsing_list a.edited .edited { 446 | display: inline; 447 | } 448 | 449 | #tab_browsing_list a img{ 450 | margin-left: 7px; 451 | } 452 | 453 | #tab_browsing_list a.edited img{ 454 | margin-left: 3px; 455 | } 456 | 457 | #tab_browsing_list a:hover span { 458 | background: #F4F2E8; 459 | border-color: #0A246A; 460 | } 461 | 462 | #tab_browsing_list .selected a span{ 463 | background: #046380; 464 | color: #FFF; 465 | } 466 | 467 | 468 | #no_file_selected{ 469 | height: 100%; 470 | width: 150%; /* Opera need more than 100% */ 471 | background: #CCC; 472 | display: none; 473 | z-index: 20; 474 | position: absolute; 475 | } 476 | 477 | 478 | /*** Non-editable mode ***/ 479 | .non_editable #editor 480 | { 481 | border-width: 0 1px; 482 | } 483 | 484 | .non_editable .area_toolbar 485 | { 486 | display: none; 487 | } 488 | 489 | /*** Auto completion ***/ 490 | #auto_completion_area 491 | { 492 | background: #FFF; 493 | border: solid 1px #888; 494 | position: absolute; 495 | z-index: 15; 496 | width: 280px; 497 | height: 180px; 498 | overflow: auto; 499 | display:none; 500 | } 501 | 502 | #auto_completion_area a, #auto_completion_area a:visited 503 | { 504 | display: block; 505 | padding: 0 2px 1px; 506 | color: #000; 507 | text-decoration:none; 508 | } 509 | 510 | #auto_completion_area a:hover, #auto_completion_area a:focus, #auto_completion_area a.focus 511 | { 512 | background: #D6E1FE; 513 | text-decoration:none; 514 | } 515 | 516 | #auto_completion_area ul 517 | { 518 | margin: 0; 519 | padding: 0; 520 | list-style: none inside; 521 | } 522 | #auto_completion_area li 523 | { 524 | padding: 0; 525 | } 526 | #auto_completion_area .prefix 527 | { 528 | font-style: italic; 529 | padding: 0 3px; 530 | } -------------------------------------------------------------------------------- /edit_area/plugins/charmap/jscripts/map.js: -------------------------------------------------------------------------------- 1 | var editArea; 2 | 3 | 4 | /** 5 | * UTF-8 list taken from http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec 6 | */ 7 | 8 | 9 | /* 10 | var char_range_list={ 11 | "Basic Latin":"0021,007F", 12 | "Latin-1 Supplement":"0080,00FF", 13 | "Latin Extended-A":"0100,017F", 14 | "Latin Extended-B":"0180,024F", 15 | "IPA Extensions":"0250,02AF", 16 | "Spacing Modifier Letters":"02B0,02FF", 17 | 18 | "Combining Diacritical Marks":"0300,036F", 19 | "Greek and Coptic":"0370,03FF", 20 | "Cyrillic":"0400,04FF", 21 | "Cyrillic Supplement":"0500,052F", 22 | "Armenian":"0530,058F", 23 | "Hebrew":"0590,05FF", 24 | "Arabic":"0600,06FF", 25 | "Syriac":"0700,074F", 26 | "Arabic Supplement":"0750,077F", 27 | 28 | "Thaana":"0780,07BF", 29 | "Devanagari":"0900,097F", 30 | "Bengali":"0980,09FF", 31 | "Gurmukhi":"0A00,0A7F", 32 | "Gujarati":"0A80,0AFF", 33 | "Oriya":"0B00,0B7F", 34 | "Tamil":"0B80,0BFF", 35 | "Telugu":"0C00,0C7F", 36 | "Kannada":"0C80,0CFF", 37 | 38 | "Malayalam":"0D00,0D7F", 39 | "Sinhala":"0D80,0DFF", 40 | "Thai":"0E00,0E7F", 41 | "Lao":"0E80,0EFF", 42 | "Tibetan":"0F00,0FFF", 43 | "Myanmar":"1000,109F", 44 | "Georgian":"10A0,10FF", 45 | "Hangul Jamo":"1100,11FF", 46 | "Ethiopic":"1200,137F", 47 | 48 | "Ethiopic Supplement":"1380,139F", 49 | "Cherokee":"13A0,13FF", 50 | "Unified Canadian Aboriginal Syllabics":"1400,167F", 51 | "Ogham":"1680,169F", 52 | "Runic":"16A0,16FF", 53 | "Tagalog":"1700,171F", 54 | "Hanunoo":"1720,173F", 55 | "Buhid":"1740,175F", 56 | "Tagbanwa":"1760,177F", 57 | 58 | "Khmer":"1780,17FF", 59 | "Mongolian":"1800,18AF", 60 | "Limbu":"1900,194F", 61 | "Tai Le":"1950,197F", 62 | "New Tai Lue":"1980,19DF", 63 | "Khmer Symbols":"19E0,19FF", 64 | "Buginese":"1A00,1A1F", 65 | "Phonetic Extensions":"1D00,1D7F", 66 | "Phonetic Extensions Supplement":"1D80,1DBF", 67 | 68 | "Combining Diacritical Marks Supplement":"1DC0,1DFF", 69 | "Latin Extended Additional":"1E00,1EFF", 70 | "Greek Extended":"1F00,1FFF", 71 | "General Punctuation":"2000,206F", 72 | "Superscripts and Subscripts":"2070,209F", 73 | "Currency Symbols":"20A0,20CF", 74 | "Combining Diacritical Marks for Symbols":"20D0,20FF", 75 | "Letterlike Symbols":"2100,214F", 76 | "Number Forms":"2150,218F", 77 | 78 | "Arrows":"2190,21FF", 79 | "Mathematical Operators":"2200,22FF", 80 | "Miscellaneous Technical":"2300,23FF", 81 | "Control Pictures":"2400,243F", 82 | "Optical Character Recognition":"2440,245F", 83 | "Enclosed Alphanumerics":"2460,24FF", 84 | "Box Drawing":"2500,257F", 85 | "Block Elements":"2580,259F", 86 | "Geometric Shapes":"25A0,25FF", 87 | 88 | "Miscellaneous Symbols":"2600,26FF", 89 | "Dingbats":"2700,27BF", 90 | "Miscellaneous Mathematical Symbols-A":"27C0,27EF", 91 | "Supplemental Arrows-A":"27F0,27FF", 92 | "Braille Patterns":"2800,28FF", 93 | "Supplemental Arrows-B":"2900,297F", 94 | "Miscellaneous Mathematical Symbols-B":"2980,29FF", 95 | "Supplemental Mathematical Operators":"2A00,2AFF", 96 | "Miscellaneous Symbols and Arrows":"2B00,2BFF", 97 | 98 | "Glagolitic":"2C00,2C5F", 99 | "Coptic":"2C80,2CFF", 100 | "Georgian Supplement":"2D00,2D2F", 101 | "Tifinagh":"2D30,2D7F", 102 | "Ethiopic Extended":"2D80,2DDF", 103 | "Supplemental Punctuation":"2E00,2E7F", 104 | "CJK Radicals Supplement":"2E80,2EFF", 105 | "Kangxi Radicals":"2F00,2FDF", 106 | "Ideographic Description Characters":"2FF0,2FFF", 107 | 108 | "CJK Symbols and Punctuation":"3000,303F", 109 | "Hiragana":"3040,309F", 110 | "Katakana":"30A0,30FF", 111 | "Bopomofo":"3100,312F", 112 | "Hangul Compatibility Jamo":"3130,318F", 113 | "Kanbun":"3190,319F", 114 | "Bopomofo Extended":"31A0,31BF", 115 | "CJK Strokes":"31C0,31EF", 116 | "Katakana Phonetic Extensions":"31F0,31FF", 117 | 118 | "Enclosed CJK Letters and Months":"3200,32FF", 119 | "CJK Compatibility":"3300,33FF", 120 | "CJK Unified Ideographs Extension A":"3400,4DBF", 121 | "Yijing Hexagram Symbols":"4DC0,4DFF", 122 | "CJK Unified Ideographs":"4E00,9FFF", 123 | "Yi Syllables":"A000,A48F", 124 | "Yi Radicals":"A490,A4CF", 125 | "Modifier Tone Letters":"A700,A71F", 126 | "Syloti Nagri":"A800,A82F", 127 | 128 | "Hangul Syllables":"AC00,D7AF", 129 | "High Surrogates":"D800,DB7F", 130 | "High Private Use Surrogates":"DB80,DBFF", 131 | "Low Surrogates":"DC00,DFFF", 132 | "Private Use Area":"E000,F8FF", 133 | "CJK Compatibility Ideographs":"F900,FAFF", 134 | "Alphabetic Presentation Forms":"FB00,FB4F", 135 | "Arabic Presentation Forms-A":"FB50,FDFF", 136 | "Variation Selectors":"FE00,FE0F", 137 | 138 | "Vertical Forms":"FE10,FE1F", 139 | "Combining Half Marks":"FE20,FE2F", 140 | "CJK Compatibility Forms":"FE30,FE4F", 141 | "Small Form Variants":"FE50,FE6F", 142 | "Arabic Presentation Forms-B":"FE70,FEFF", 143 | "Halfwidth and Fullwidth Forms":"FF00,FFEF", 144 | "Specials":"FFF0,FFFF", 145 | "Linear B Syllabary":"10000,1007F", 146 | "Linear B Ideograms":"10080,100FF", 147 | 148 | "Aegean Numbers":"10100,1013F", 149 | "Ancient Greek Numbers":"10140,1018F", 150 | "Old Italic":"10300,1032F", 151 | "Gothic":"10330,1034F", 152 | "Ugaritic":"10380,1039F", 153 | "Old Persian":"103A0,103DF", 154 | "Deseret":"10400,1044F", 155 | "Shavian":"10450,1047F", 156 | "Osmanya":"10480,104AF", 157 | 158 | "Cypriot Syllabary":"10800,1083F", 159 | "Kharoshthi":"10A00,10A5F", 160 | "Byzantine Musical Symbols":"1D000,1D0FF", 161 | "Musical Symbols":"1D100,1D1FF", 162 | "Ancient Greek Musical Notation":"1D200,1D24F", 163 | "Tai Xuan Jing Symbols":"1D300,1D35F", 164 | "Mathematical Alphanumeric Symbols":"1D400,1D7FF", 165 | "CJK Unified Ideographs Extension B":"20000,2A6DF", 166 | "CJK Compatibility Ideographs Supplement":"2F800,2FA1F", 167 | "Tags":"E0000,E007F", 168 | "Variation Selectors Supplement":"E0100,E01EF" 169 | }; 170 | */ 171 | var char_range_list={ 172 | "Aegean Numbers":"10100,1013F", 173 | "Alphabetic Presentation Forms":"FB00,FB4F", 174 | "Ancient Greek Musical Notation":"1D200,1D24F", 175 | "Ancient Greek Numbers":"10140,1018F", 176 | "Arabic":"0600,06FF", 177 | "Arabic Presentation Forms-A":"FB50,FDFF", 178 | "Arabic Presentation Forms-B":"FE70,FEFF", 179 | "Arabic Supplement":"0750,077F", 180 | "Armenian":"0530,058F", 181 | "Arrows":"2190,21FF", 182 | "Basic Latin":"0020,007F", 183 | "Bengali":"0980,09FF", 184 | "Block Elements":"2580,259F", 185 | "Bopomofo Extended":"31A0,31BF", 186 | "Bopomofo":"3100,312F", 187 | "Box Drawing":"2500,257F", 188 | "Braille Patterns":"2800,28FF", 189 | "Buginese":"1A00,1A1F", 190 | "Buhid":"1740,175F", 191 | "Byzantine Musical Symbols":"1D000,1D0FF", 192 | "CJK Compatibility Forms":"FE30,FE4F", 193 | "CJK Compatibility Ideographs Supplement":"2F800,2FA1F", 194 | "CJK Compatibility Ideographs":"F900,FAFF", 195 | "CJK Compatibility":"3300,33FF", 196 | "CJK Radicals Supplement":"2E80,2EFF", 197 | "CJK Strokes":"31C0,31EF", 198 | "CJK Symbols and Punctuation":"3000,303F", 199 | "CJK Unified Ideographs Extension A":"3400,4DBF", 200 | "CJK Unified Ideographs Extension B":"20000,2A6DF", 201 | "CJK Unified Ideographs":"4E00,9FFF", 202 | "Cherokee":"13A0,13FF", 203 | "Combining Diacritical Marks Supplement":"1DC0,1DFF", 204 | "Combining Diacritical Marks for Symbols":"20D0,20FF", 205 | "Combining Diacritical Marks":"0300,036F", 206 | "Combining Half Marks":"FE20,FE2F", 207 | "Control Pictures":"2400,243F", 208 | "Coptic":"2C80,2CFF", 209 | "Currency Symbols":"20A0,20CF", 210 | "Cypriot Syllabary":"10800,1083F", 211 | "Cyrillic Supplement":"0500,052F", 212 | "Cyrillic":"0400,04FF", 213 | "Deseret":"10400,1044F", 214 | "Devanagari":"0900,097F", 215 | "Dingbats":"2700,27BF", 216 | "Enclosed Alphanumerics":"2460,24FF", 217 | "Enclosed CJK Letters and Months":"3200,32FF", 218 | "Ethiopic Extended":"2D80,2DDF", 219 | "Ethiopic Supplement":"1380,139F", 220 | "Ethiopic":"1200,137F", 221 | "General Punctuation":"2000,206F", 222 | "Geometric Shapes":"25A0,25FF", 223 | "Georgian Supplement":"2D00,2D2F", 224 | "Georgian":"10A0,10FF", 225 | "Glagolitic":"2C00,2C5F", 226 | "Gothic":"10330,1034F", 227 | "Greek Extended":"1F00,1FFF", 228 | "Greek and Coptic":"0370,03FF", 229 | "Gujarati":"0A80,0AFF", 230 | "Gurmukhi":"0A00,0A7F", 231 | "Halfwidth and Fullwidth Forms":"FF00,FFEF", 232 | "Hangul Compatibility Jamo":"3130,318F", 233 | "Hangul Jamo":"1100,11FF", 234 | "Hangul Syllables":"AC00,D7AF", 235 | "Hanunoo":"1720,173F", 236 | "Hebrew":"0590,05FF", 237 | "High Private Use Surrogates":"DB80,DBFF", 238 | "High Surrogates":"D800,DB7F", 239 | "Hiragana":"3040,309F", 240 | "IPA Extensions":"0250,02AF", 241 | "Ideographic Description Characters":"2FF0,2FFF", 242 | "Kanbun":"3190,319F", 243 | "Kangxi Radicals":"2F00,2FDF", 244 | "Kannada":"0C80,0CFF", 245 | "Katakana Phonetic Extensions":"31F0,31FF", 246 | "Katakana":"30A0,30FF", 247 | "Kharoshthi":"10A00,10A5F", 248 | "Khmer Symbols":"19E0,19FF", 249 | "Khmer":"1780,17FF", 250 | "Lao":"0E80,0EFF", 251 | "Latin Extended Additional":"1E00,1EFF", 252 | "Latin Extended-A":"0100,017F", 253 | "Latin Extended-B":"0180,024F", 254 | "Latin-1 Supplement":"0080,00FF", 255 | "Letterlike Symbols":"2100,214F", 256 | "Limbu":"1900,194F", 257 | "Linear B Ideograms":"10080,100FF", 258 | "Linear B Syllabary":"10000,1007F", 259 | "Low Surrogates":"DC00,DFFF", 260 | "Malayalam":"0D00,0D7F", 261 | "Mathematical Alphanumeric Symbols":"1D400,1D7FF", 262 | "Mathematical Operators":"2200,22FF", 263 | "Miscellaneous Mathematical Symbols-A":"27C0,27EF", 264 | "Miscellaneous Mathematical Symbols-B":"2980,29FF", 265 | "Miscellaneous Symbols and Arrows":"2B00,2BFF", 266 | "Miscellaneous Symbols":"2600,26FF", 267 | "Miscellaneous Technical":"2300,23FF", 268 | "Modifier Tone Letters":"A700,A71F", 269 | "Mongolian":"1800,18AF", 270 | "Musical Symbols":"1D100,1D1FF", 271 | "Myanmar":"1000,109F", 272 | "New Tai Lue":"1980,19DF", 273 | "Number Forms":"2150,218F", 274 | "Ogham":"1680,169F", 275 | "Old Italic":"10300,1032F", 276 | "Old Persian":"103A0,103DF", 277 | "Optical Character Recognition":"2440,245F", 278 | "Oriya":"0B00,0B7F", 279 | "Osmanya":"10480,104AF", 280 | "Phonetic Extensions Supplement":"1D80,1DBF", 281 | "Phonetic Extensions":"1D00,1D7F", 282 | "Private Use Area":"E000,F8FF", 283 | "Runic":"16A0,16FF", 284 | "Shavian":"10450,1047F", 285 | "Sinhala":"0D80,0DFF", 286 | "Small Form Variants":"FE50,FE6F", 287 | "Spacing Modifier Letters":"02B0,02FF", 288 | "Specials":"FFF0,FFFF", 289 | "Superscripts and Subscripts":"2070,209F", 290 | "Supplemental Arrows-A":"27F0,27FF", 291 | "Supplemental Arrows-B":"2900,297F", 292 | "Supplemental Mathematical Operators":"2A00,2AFF", 293 | "Supplemental Punctuation":"2E00,2E7F", 294 | "Syloti Nagri":"A800,A82F", 295 | "Syriac":"0700,074F", 296 | "Tagalog":"1700,171F", 297 | "Tagbanwa":"1760,177F", 298 | "Tags":"E0000,E007F", 299 | "Tai Le":"1950,197F", 300 | "Tai Xuan Jing Symbols":"1D300,1D35F", 301 | "Tamil":"0B80,0BFF", 302 | "Telugu":"0C00,0C7F", 303 | "Thaana":"0780,07BF", 304 | "Thai":"0E00,0E7F", 305 | "Tibetan":"0F00,0FFF", 306 | "Tifinagh":"2D30,2D7F", 307 | "Ugaritic":"10380,1039F", 308 | "Unified Canadian Aboriginal Syllabics":"1400,167F", 309 | "Variation Selectors Supplement":"E0100,E01EF", 310 | "Variation Selectors":"FE00,FE0F", 311 | "Vertical Forms":"FE10,FE1F", 312 | "Yi Radicals":"A490,A4CF", 313 | "Yi Syllables":"A000,A48F", 314 | "Yijing Hexagram Symbols":"4DC0,4DFF" 315 | }; 316 | 317 | var insert="charmap_insert"; 318 | 319 | function map_load(){ 320 | editArea=opener.editArea; 321 | // translate the document 322 | insert= editArea.get_translation(insert, "word"); 323 | //alert(document.title); 324 | document.title= editArea.get_translation(document.title, "template"); 325 | document.body.innerHTML= editArea.get_translation(document.body.innerHTML, "template"); 326 | //document.title= editArea.get_translation(document.getElementBytitle, "template"); 327 | 328 | var selected_lang=opener.EditArea_charmap.default_language.toLowerCase(); 329 | var selected=0; 330 | 331 | var select= document.getElementById("select_range") 332 | for(var i in char_range_list){ 333 | if(i.toLowerCase()==selected_lang) 334 | selected=select.options.length; 335 | select.options[select.options.length]=new Option(i, char_range_list[i]); 336 | } 337 | select.options[selected].selected=true; 338 | /* start=0; 339 | end=127; 340 | content=""; 341 | for(var i=start; i"+ String.fromCharCode(i) +""; 358 | } 359 | document.getElementById("char_list").innerHTML= html; 360 | document.getElementById("preview_char").innerHTML=""; 361 | } 362 | 363 | function previewChar(i){ 364 | document.getElementById("preview_char").innerHTML= String.fromCharCode(i); 365 | document.getElementById("preview_code").innerHTML= "&#"+ i +";"; 366 | } 367 | 368 | function insertChar(i){ 369 | opener.parent.editAreaLoader.setSelectedText(editArea.id, String.fromCharCode( i)); 370 | range= opener.parent.editAreaLoader.getSelectionRange(editArea.id); 371 | opener.parent.editAreaLoader.setSelectionRange(editArea.id, range["end"], range["end"]); 372 | window.focus(); 373 | } 374 | -------------------------------------------------------------------------------- /edit_area/reg_syntax/php.js: -------------------------------------------------------------------------------- 1 | editAreaLoader.load_syntax["php"] = { 2 | 'DISPLAY_NAME' : 'Php' 3 | ,'COMMENT_SINGLE' : {1 : '//', 2 : '#'} 4 | ,'COMMENT_MULTI' : {'/*' : '*/'} 5 | ,'QUOTEMARKS' : {1: "'", 2: '"'} 6 | ,'KEYWORD_CASE_SENSITIVE' : false 7 | ,'KEYWORDS' : { 8 | 'statements' : [ 9 | 'include', 'require', 'include_once', 'require_once', 10 | 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 11 | 'endif', 'switch', 'case', 'endswitch', 12 | 'return', 'break', 'continue' 13 | ] 14 | ,'reserved' : [ 15 | '_GET', '_POST', '_SESSION', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST', 16 | 'null', '__LINE__', '__FILE__', 17 | 'false', '<?php', '?>', '<?', 18 | '<script language', '</script>', 19 | 'true', 'var', 'default', 20 | 'function', 'class', 'new', '&new', 'this', 21 | '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION', 22 | 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR', 23 | 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR', 24 | 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT', 25 | 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE', 26 | 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR', 27 | 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL' 28 | 29 | ] 30 | ,'functions' : [ 31 | 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined', 32 | 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions', 33 | 'extension_loaded', 'get_extension_funcs', 'debug_backtrace', 34 | 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv', 35 | 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime', 36 | 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar', 37 | 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown', 38 | 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate', 39 | 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode', 40 | 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat', 41 | 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from', 42 | 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport', 43 | 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die' 44 | 45 | ] 46 | } 47 | ,'OPERATORS' :[ 48 | '+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||' 49 | ] 50 | ,'DELIMITERS' :[ 51 | '(', ')', '[', ']', '{', '}' 52 | ] 53 | ,'REGEXPS' : { 54 | // highlight all variables ($...) 55 | 'variables' : { 56 | 'search' : '()(\\$\\w+)()' 57 | ,'class' : 'variables' 58 | ,'modifiers' : 'g' 59 | ,'execute' : 'before' // before or after 60 | } 61 | } 62 | ,'STYLES' : { 63 | 'COMMENTS': 'color: #AAAAAA;' 64 | ,'QUOTESMARKS': 'color: #879EFA;' 65 | ,'KEYWORDS' : { 66 | 'reserved' : 'color: #48BDDF;' 67 | ,'functions' : 'color: #0040FD;' 68 | ,'statements' : 'color: #60CA00;' 69 | } 70 | ,'OPERATORS' : 'color: #FF00FF;' 71 | ,'DELIMITERS' : 'color: #2B60FF;' 72 | ,'REGEXPS' : { 73 | 'variables' : 'color: #E0BD54;' 74 | } 75 | } 76 | ,'AUTO_COMPLETION' : { 77 | "default": { // the name of this definition group. It's posisble to have different rules inside the same definition file 78 | "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.| 79 | ,"possible_words_letters": "[a-zA-Z0-9_\$]+" 80 | ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$" 81 | ,"prefix_separator": "\\-\\>|\\:\\:" 82 | } 83 | ,"CASE_SENSITIVE": true 84 | ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position 85 | ,"KEYWORDS": { 86 | '': [ // the prefix of thoses items 87 | /** 88 | * 0 : the keyword the user is typing 89 | * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous ) 90 | * If empty the keyword will be displayed 91 | * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed) 92 | */ 93 | ['$_POST'] 94 | ,['$_GET'] 95 | ,['$_SESSION'] 96 | ,['$_SERVER'] 97 | ,['$_FILES'] 98 | ,['$_ENV'] 99 | ,['$_COOKIE'] 100 | ,['$_REQUEST'] 101 | // magic methods 102 | ,['__construct', '§( {@} )'] 103 | ,['__destruct', '§( {@} )'] 104 | ,['__sleep', '§( {@} )'] 105 | ,['__wakeup', '§( {@} )'] 106 | ,['__toString', '§( {@} )'] 107 | // include 108 | ,['include', '§ "{@}";'] 109 | ,['include_once', '§ "{@}";'] 110 | ,['require', '§ "{@}";'] 111 | ,['require_once', '§ "{@}";'] 112 | // statements 113 | ,['for', '§( {@} )'] 114 | ,['foreach', '§( {@} )'] 115 | ,['if', '§( {@} )'] 116 | ,['elseif', '§( {@} )'] 117 | ,['while', '§( {@} )'] 118 | ,['switch', '§( {@} )'] 119 | ,['break'] 120 | ,['case'] 121 | ,['continue'] 122 | ,['do'] 123 | ,['else'] 124 | ,['endif'] 125 | ,['endswitch'] 126 | ,['endwhile'] 127 | ,['return'] 128 | // function 129 | ,['unset', '§( {@} )'] 130 | ] 131 | } 132 | } 133 | ,"live": { 134 | 135 | // class NAME: /class\W+([a-z]+)\W+/gi 136 | // method: /^(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi 137 | // static: /^(public|private|protected)?\s+static\s+(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi 138 | // attributes: /(\$this\-\>|(?:var|public|protected|private)\W+\$)([a-z0-9\_]+)(?!\()\b/gi 139 | // v1 : /(\$this\-\>|var\W+|public\W+|protected\W+|private\W+)([a-z0-9\_]+)\W*(=|;)/gi 140 | // var type: /(\$(this\-\>)?[a-z0-9\_]+)\s*\=\s*new\s+([a-z0-9\_])+/gi 141 | 142 | 143 | "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.| 144 | ,"possible_words_letters": "[a-zA-Z0-9_\$]+" 145 | ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$" 146 | ,"prefix_separator": "\\-\\>" 147 | } 148 | ,"CASE_SENSITIVE": true 149 | ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position 150 | ,"KEYWORDS": { 151 | '$this': [ // the prefix of thoses items 152 | ['test'] 153 | ] 154 | } 155 | } 156 | } 157 | }; 158 | -------------------------------------------------------------------------------- /edit_area/edit_area_compressor.php: -------------------------------------------------------------------------------- 1 | __construct($param); 27 | } 28 | 29 | function __construct($param) 30 | { 31 | $this->start_time= $this->get_microtime(); 32 | $this->file_loaded_size=0; 33 | $this->param= $param; 34 | $this->script_list=""; 35 | $this->path= dirname(__FILE__)."/"; 36 | if(isset($_GET['plugins'])){ 37 | $this->load_all_plugins= true; 38 | $this->full_cache_file= $this->path."edit_area_full_with_plugins.js"; 39 | $this->gzip_cache_file= $this->path."edit_area_full_with_plugins.gz"; 40 | }else{ 41 | $this->load_all_plugins= false; 42 | $this->full_cache_file= $this->path."edit_area_full.js"; 43 | $this->gzip_cache_file= $this->path."edit_area_full.gz"; 44 | } 45 | 46 | $this->check_gzip_use(); 47 | $this->send_headers(); 48 | $this->check_cache(); 49 | $this->load_files(); 50 | $this->send_datas(); 51 | } 52 | 53 | function send_headers() 54 | { 55 | header("Content-type: text/javascript; charset: UTF-8"); 56 | header("Vary: Accept-Encoding"); // Handle proxies 57 | header(sprintf("Expires: %s GMT", gmdate("D, d M Y H:i:s", time() + $this->param['cache_duration'])) ); 58 | if($this->use_gzip) 59 | header("Content-Encoding: ".$this->gzip_enc_header); 60 | } 61 | 62 | function check_gzip_use() 63 | { 64 | $encodings = array(); 65 | $desactivate_gzip=false; 66 | 67 | if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) 68 | $encodings = explode(',', strtolower(preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING']))); 69 | 70 | // desactivate gzip for IE version < 7 71 | if(preg_match("/(?:msie )([0-9.]+)/i", $_SERVER['HTTP_USER_AGENT'], $ie)) 72 | { 73 | if($ie[1]<7) 74 | $desactivate_gzip=true; 75 | } 76 | 77 | // Check for gzip header or northon internet securities 78 | if (!$desactivate_gzip && $this->param['use_gzip'] && (in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) { 79 | $this->gzip_enc_header= in_array('x-gzip', $encodings) ? "x-gzip" : "gzip"; 80 | $this->use_gzip=true; 81 | $this->cache_file=$this->gzip_cache_file; 82 | }else{ 83 | $this->use_gzip=false; 84 | $this->cache_file=$this->full_cache_file; 85 | } 86 | } 87 | 88 | function check_cache() 89 | { 90 | // Only gzip the contents if clients and server support it 91 | if (file_exists($this->cache_file)) { 92 | // check if cache file must be updated 93 | $cache_date=0; 94 | if ($dir = opendir($this->path)) { 95 | while (($file = readdir($dir)) !== false) { 96 | if(is_file($this->path.$file) && $file!="." && $file!="..") 97 | $cache_date= max($cache_date, filemtime($this->path.$file)); 98 | } 99 | closedir($dir); 100 | } 101 | if($this->load_all_plugins){ 102 | $plug_path= $this->path."plugins/"; 103 | if (($dir = @opendir($plug_path)) !== false) 104 | { 105 | while (($file = readdir($dir)) !== false) 106 | { 107 | if ($file !== "." && $file !== "..") 108 | { 109 | if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js")) 110 | $cache_date= max($cache_date, filemtime("plugins/".$file."/".$file.".js")); 111 | } 112 | } 113 | closedir($dir); 114 | } 115 | } 116 | 117 | if(filemtime($this->cache_file) >= $cache_date){ 118 | // if cache file is up to date 119 | $last_modified = gmdate("D, d M Y H:i:s",filemtime($this->cache_file))." GMT"; 120 | if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) && strcasecmp($_SERVER["HTTP_IF_MODIFIED_SINCE"], $last_modified) === 0) 121 | { 122 | header("HTTP/1.1 304 Not Modified"); 123 | header("Last-modified: ".$last_modified); 124 | header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache 125 | header("Pragma:"); // Tells HTTP 1.0 clients to cache 126 | } 127 | else 128 | { 129 | header("Last-modified: ".$last_modified); 130 | header("Cache-Control: Public"); // Tells HTTP 1.1 clients to cache 131 | header("Pragma:"); // Tells HTTP 1.0 clients to cache 132 | header('Content-Length: '.filesize($this->cache_file)); 133 | echo file_get_contents($this->cache_file); 134 | } 135 | die; 136 | } 137 | } 138 | return false; 139 | } 140 | 141 | function load_files() 142 | { 143 | $loader= $this->get_content("edit_area_loader.js")."\n"; 144 | 145 | // get the list of other files to load 146 | $loader= preg_replace("/(t\.scripts_to_load=\s*)\[([^\]]*)\];/e" 147 | , "\$this->replace_scripts('script_list', '\\1', '\\2')" 148 | , $loader); 149 | 150 | $loader= preg_replace("/(t\.sub_scripts_to_load=\s*)\[([^\]]*)\];/e" 151 | , "\$this->replace_scripts('sub_script_list', '\\1', '\\2')" 152 | , $loader); 153 | 154 | // replace languages names 155 | $reg_path= $this->path."reg_syntax/"; 156 | $a_displayName = array(); 157 | if (($dir = @opendir($reg_path)) !== false) 158 | { 159 | while (($file = readdir($dir)) !== false) 160 | { 161 | if( $file !== "." && $file !== ".." && ( $pos = strpos( $file, '.js' ) ) !== false ) 162 | { 163 | $jsContent = $this->file_get_contents( $reg_path.$file ); 164 | if( preg_match( '@(\'|")DISPLAY_NAME\1\s*:\s*(\'|")(.*)\2@', $jsContent, $match ) ) 165 | { 166 | $a_displayName[] = "'". substr( $file, 0, $pos ) ."':'". htmlspecialchars( $match[3], ENT_QUOTES ) ."'"; 167 | } 168 | } 169 | } 170 | closedir($dir); 171 | } 172 | $loader = str_replace( '/*syntax_display_name_AUTO-FILL-BY-COMPRESSOR*/', implode( ",", $a_displayName ), $loader ); 173 | 174 | $this->datas= $loader; 175 | $this->compress_javascript($this->datas); 176 | 177 | // load other scripts needed for the loader 178 | preg_match_all('/"([^"]*)"/', $this->script_list, $match); 179 | foreach($match[1] as $key => $value) 180 | { 181 | $content= $this->get_content(preg_replace("/\\|\//i", "", $value).".js"); 182 | $this->compress_javascript($content); 183 | $this->datas.= $content."\n"; 184 | } 185 | //$this->datas); 186 | //$this->datas= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $this->datas); 187 | 188 | // improved compression step 1/2 189 | $this->datas= preg_replace(array("/(\b)EditAreaLoader(\b)/", "/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/"), array("EAL", "eAL", "eAs"), $this->datas); 190 | //$this->datas= str_replace(array("EditAreaLoader", "editAreaLoader", "editAreas"), array("EAL", "eAL", "eAs"), $this->datas); 191 | $this->datas.= "var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;"; 192 | 193 | // load sub scripts 194 | $sub_scripts=""; 195 | $sub_scripts_list= array(); 196 | preg_match_all('/"([^"]*)"/', $this->sub_script_list, $match); 197 | foreach($match[1] as $value){ 198 | $sub_scripts_list[]= preg_replace("/\\|\//i", "", $value).".js"; 199 | } 200 | 201 | if($this->load_all_plugins){ 202 | // load plugins scripts 203 | $plug_path= $this->path."plugins/"; 204 | if (($dir = @opendir($plug_path)) !== false) 205 | { 206 | while (($file = readdir($dir)) !== false) 207 | { 208 | if ($file !== "." && $file !== "..") 209 | { 210 | if(is_dir($plug_path.$file) && file_exists($plug_path.$file."/".$file.".js")) 211 | $sub_scripts_list[]= "plugins/".$file."/".$file.".js"; 212 | } 213 | } 214 | closedir($dir); 215 | } 216 | } 217 | 218 | foreach($sub_scripts_list as $value){ 219 | $sub_scripts.= $this->get_javascript_content($value); 220 | } 221 | // improved compression step 2/2 222 | $sub_scripts= preg_replace(array("/(\b)editAreaLoader(\b)/", "/(\b)editAreas(\b)/", "/(\b)editArea(\b)/", "/(\b)EditArea(\b)/"), array("eAL", "eAs", "eA", "EA"), $sub_scripts); 223 | // $sub_scripts= str_replace(array("editAreaLoader", "editAreas", "editArea", "EditArea"), array("eAL", "eAs", "eA", "EA"), $sub_scripts); 224 | $sub_scripts.= "var editArea= eA;EditArea=EA;"; 225 | 226 | 227 | // add the scripts 228 | // $this->datas.= sprintf("editAreaLoader.iframe_script= \"\";\n", $sub_scripts); 229 | 230 | 231 | // add the script and use a last compression 232 | if( $this->param['compress'] ) 233 | { 234 | $last_comp = array( 'Á' => 'this', 235 | 'Â' => 'textarea', 236 | 'Ã' => 'function', 237 | 'Ä' => 'prototype', 238 | 'Å' => 'settings', 239 | 'Æ' => 'length', 240 | 'Ç' => 'style', 241 | 'È' => 'parent', 242 | 'É' => 'last_selection', 243 | 'Ê' => 'value', 244 | 'Ë' => 'true', 245 | 'Ì' => 'false' 246 | /*, 247 | 'Î' => '"', 248 | 'Ï' => "\n", 249 | 'À' => "\r"*/); 250 | } 251 | else 252 | { 253 | $last_comp = array(); 254 | } 255 | 256 | $js_replace= ''; 257 | foreach( $last_comp as $key => $val ) 258 | $js_replace .= ".replace(/". $key ."/g,'". str_replace( array("\n", "\r"), array('\n','\r'), $val ) ."')"; 259 | 260 | $this->datas.= sprintf("editAreaLoader.iframe_script= \"\"%s;\n", 261 | str_replace( array_values($last_comp), array_keys($last_comp), $sub_scripts ), 262 | $js_replace); 263 | 264 | if($this->load_all_plugins) 265 | $this->datas.="editAreaLoader.all_plugins_loaded=true;\n"; 266 | 267 | 268 | // load the template 269 | $this->datas.= sprintf("editAreaLoader.template= \"%s\";\n", $this->get_html_content("template.html")); 270 | // load the css 271 | $this->datas.= sprintf("editAreaLoader.iframe_css= \"\";\n", $this->get_css_content("edit_area.css")); 272 | 273 | // $this->datas= "function editArea(){};editArea.prototype.loader= function(){alert('bouhbouh');} var a= new editArea();a.loader();"; 274 | 275 | } 276 | 277 | function send_datas() 278 | { 279 | if($this->param['debug']){ 280 | $header=sprintf("/* USE PHP COMPRESSION\n"); 281 | $header.=sprintf("javascript size: based files: %s => PHP COMPRESSION => %s ", $this->file_loaded_size, strlen($this->datas)); 282 | if($this->use_gzip){ 283 | $gzip_datas= gzencode($this->datas, 9, FORCE_GZIP); 284 | $header.=sprintf("=> GZIP COMPRESSION => %s", strlen($gzip_datas)); 285 | $ratio = round(100 - strlen($gzip_datas) / $this->file_loaded_size * 100.0); 286 | }else{ 287 | $ratio = round(100 - strlen($this->datas) / $this->file_loaded_size * 100.0); 288 | } 289 | $header.=sprintf(", reduced by %s%%\n", $ratio); 290 | $header.=sprintf("compression time: %s\n", $this->get_microtime()-$this->start_time); 291 | $header.=sprintf("%s\n", implode("\n", $this->infos)); 292 | $header.=sprintf("*/\n"); 293 | $this->datas= $header.$this->datas; 294 | } 295 | $mtime= time(); // ensure that the 2 disk files will have the same update time 296 | // generate gzip file and cahce it if using disk cache 297 | if($this->use_gzip){ 298 | $this->gzip_datas= gzencode($this->datas, 9, FORCE_GZIP); 299 | if($this->param['use_disk_cache']) 300 | $this->file_put_contents($this->gzip_cache_file, $this->gzip_datas, $mtime); 301 | } 302 | 303 | // generate full js file and cache it if using disk cache 304 | if($this->param['use_disk_cache']) 305 | $this->file_put_contents($this->full_cache_file, $this->datas, $mtime); 306 | 307 | // generate output 308 | if($this->use_gzip) 309 | echo $this->gzip_datas; 310 | else 311 | echo $this->datas; 312 | 313 | // die; 314 | } 315 | 316 | 317 | function get_content($end_uri) 318 | { 319 | $end_uri=preg_replace("/\.\./", "", $end_uri); // Remove any .. (security) 320 | $file= $this->path.$end_uri; 321 | if(file_exists($file)){ 322 | $this->infos[]=sprintf("'%s' loaded", $end_uri); 323 | /*$fd = fopen($file, 'rb'); 324 | $content = fread($fd, filesize($file)); 325 | fclose($fd); 326 | return $content;*/ 327 | return $this->file_get_contents($file); 328 | }else{ 329 | $this->infos[]=sprintf("'%s' not loaded", $end_uri); 330 | return ""; 331 | } 332 | } 333 | 334 | function get_javascript_content($end_uri) 335 | { 336 | $val=$this->get_content($end_uri); 337 | 338 | $this->compress_javascript($val); 339 | $this->prepare_string_for_quotes($val); 340 | return $val; 341 | } 342 | 343 | function compress_javascript(&$code) 344 | { 345 | if($this->param['compress']) 346 | { 347 | // remove all comments 348 | // (\"(?:[^\"\\]*(?:\\\\)*(?:\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\]*(?:\\\\)*(?:\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$)) 349 | $code= preg_replace("/(\"(?:[^\"\\\\]*(?:\\\\\\\\)*(?:\\\\\"?)?)*(?:\"|$))|(\'(?:[^\'\\\\]*(?:\\\\\\\\)*(?:\\\\\'?)?)*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code); 350 | // remove line return, empty line and tabulation 351 | $code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code); 352 | // add line break before "else" otherwise navigators can't manage to parse the file 353 | $code= preg_replace('/(\b(else)\b)/', "\n$1", $code); 354 | // remove unnecessary spaces 355 | $code= preg_replace('/( |\t|\r)*(;|\{|\}|=|==|\-|\+|,|\(|\)|\|\||&\&|\:)( |\t|\r)*/', "$2", $code); 356 | } 357 | } 358 | 359 | function get_css_content($end_uri){ 360 | $code=$this->get_content($end_uri); 361 | // remove comments 362 | $code= preg_replace("/(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "", $code); 363 | // remove spaces 364 | $code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', "", $code); 365 | // remove spaces 366 | $code= preg_replace('/( |\t|\r)?(\:|,|\{|\})( |\t|\r)+/', "$2", $code); 367 | 368 | $this->prepare_string_for_quotes($code); 369 | return $code; 370 | } 371 | 372 | function get_html_content($end_uri){ 373 | $code=$this->get_content($end_uri); 374 | //$code= preg_replace('/(\"(?:\\\"|[^\"])*(?:\"|$))|' . "(\'(?:\\\'|[^\'])*(?:\'|$))|(?:\/\/(?:.|\r|\t)*?(\n|$))|(?:\/\*(?:.|\n|\r|\t)*?(?:\*\/|$))/s", "$1$2$3", $code); 375 | $code= preg_replace('/(( |\t|\r)*\n( |\t)*)+/s', " ", $code); 376 | $this->prepare_string_for_quotes($code); 377 | return $code; 378 | } 379 | 380 | function prepare_string_for_quotes(&$str){ 381 | // prepare the code to be putted into quotes 382 | /*$pattern= array("/(\\\\)?\"/", '/\\\n/' , '/\\\r/' , "/(\r?\n)/"); 383 | $replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\\\n"$1+"');*/ 384 | $pattern= array("/(\\\\)?\"/", '/\\\n/' , '/\\\r/' , "/(\r?\n)/"); 385 | if($this->param['compress']) 386 | $replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , '\n'); 387 | else 388 | $replace= array('$1$1\\"', '\\\\\\n', '\\\\\\r' , "\\n\"\n+\""); 389 | $str= preg_replace($pattern, $replace, $str); 390 | } 391 | 392 | function replace_scripts($var, $param1, $param2) 393 | { 394 | $this->$var=stripslashes($param2); 395 | return $param1."[];"; 396 | } 397 | 398 | /* for php version that have not thoses functions */ 399 | function file_get_contents($file) 400 | { 401 | $fd = fopen($file, 'rb'); 402 | $content = fread($fd, filesize($file)); 403 | fclose($fd); 404 | $this->file_loaded_size+= strlen($content); 405 | return $content; 406 | } 407 | 408 | function file_put_contents($file, &$content, $mtime=-1) 409 | { 410 | if($mtime==-1) 411 | $mtime=time(); 412 | $fp = @fopen($file, "wb"); 413 | if ($fp) { 414 | fwrite($fp, $content); 415 | fclose($fp); 416 | touch($file, $mtime); 417 | return true; 418 | } 419 | return false; 420 | } 421 | 422 | function get_microtime() 423 | { 424 | list($usec, $sec) = explode(" ", microtime()); 425 | return ((float)$usec + (float)$sec); 426 | } 427 | } 428 | ?> 429 | --------------------------------------------------------------------------------