Commit c2589de4b871c40dab8d78881a1066a99c13a4dc

Authored by Luigi Serra
1 parent 950d181d

added demo page

Showing 144 changed files with 13081 additions and 0 deletions

Too many changes.

To preserve performance only 100 of 144 files are displayed.

demo.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="en">
  3 +<head>
  4 + <link rel="import" href="bower_components/iron-component-page/iron-component-page.html">
  5 + <link rel="import" href="bower_components/paper-drawer-panel/paper-drawer-panel.html">
  6 + <link rel="import" href="bower_components/paper-menu/paper-menu.html">
  7 + <link rel="import" href="bower_components/paper-item/paper-item.html">
  8 + <link rel="import" href="bower_components/paper-dropdown-menu/paper-dropdown-menu.html">
  9 + <link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html">
  10 + <link rel="import" href="bower_components/paper-styles/color.html">
  11 + <link rel="import" href="bower_components/paper-input/paper-textarea.html">
  12 + <link rel="import" href="bower_components/iron-flex-layout/iron-flex-layout.html">
  13 + <link rel="import" href="bower_components/iron-ajax/iron-ajax.html">
  14 +
  15 + <link rel="import" href="controllets/items-slider-controllet/items-slider-controllet.html">
  16 + <link rel="import" href="controllets/draggable-element-controllet/draggable-element-controllet.html">
  17 + <link rel="import" href="controllets/treeview-controllet/treeview-controllet.html">
  18 + <link rel="import" href="controllets/text-element-controllet/text-element-controllet.html">
  19 +
  20 + <script type="text/javascript" src="datalets/shared_js/jquery-1.11.2.min.js"></script>
  21 + <script type="text/javascript" src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
  22 + <script src="controllets/shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script>
  23 + <script src="../DEEPCLIENT/js/deepClient.js"></script>
  24 + <script type="text/javascript" src="docs/js/editarea_0_8_2/edit_area/edit_area_full.js"></script>
  25 +
  26 + <link rel="stylesheet" href="controllets/shared_js/perfect-scrollbar/css/perfect-scrollbar.min.css">
  27 + <link rel="import" href="bower_components/paper-menu-button/paper-menu-button.html">
  28 + <meta charset="UTF-8">
  29 +
  30 +
  31 + <script type="text/javascript">
  32 + selected_component_url = "";
  33 +
  34 + $(document).ready(function () {
  35 + window.addEventListener("treeview-controllet_fileds-selected", DEEP._fieldsSelected, false);
  36 + window.addEventListener("items-slider-controllet_item-selected", DEEP._dataletSelected, false);
  37 + window.addEventListener("draggable-element-controllet_content-dragged", DEEP._fieldsMapped, false);
  38 + window.addEventListener("text-element-controllet_content-changed", DEEP._textElementChanged, false);
  39 +
  40 + editAreaLoader.init({
  41 + id : "sbiricuda" // textarea id
  42 + ,syntax: "html" // syntax to be uses for highgliting
  43 + ,start_highlight: true // to display with highlight mode on start-up
  44 + ,syntax: "html"
  45 + ,replace_tab_by_spaces: 4,
  46 + isEditable : false,
  47 + });
  48 + });
  49 + </script>
  50 +
  51 + <style>
  52 + .avatar
  53 + {
  54 + display: inline-block;
  55 + height: 0.5em;
  56 + width: 0.5em;
  57 + border-radius: 50%;
  58 + /*background: #3f51b5;*/
  59 + color: white;
  60 + line-height: 2em;
  61 + font-size: 1.87em;
  62 + text-align: center;
  63 + margin-right: 5px;
  64 + }
  65 +
  66 + #toolbar{
  67 + background: #2196F3 ;
  68 + }
  69 + #logo{
  70 + width: 56px;
  71 + height: 56px;
  72 + background-image: url("http://spod.routetopa.eu/ow_static/themes/rtpa_matter/images/logo.png");
  73 + background-size: auto 41px;
  74 + background-repeat: no-repeat;
  75 + background-position: center center;
  76 +
  77 + }
  78 + .area_container
  79 + {
  80 + overflow: hidden;
  81 + margin : 0.8em;
  82 + padding : 0.8em;
  83 + border-width: 1em;
  84 + border-radius: 0.125rem;
  85 + box-shadow: 0.125em 0.125em 0.1125em 0.125em rgba(0, 0, 0, 0.25);
  86 + }
  87 +
  88 + #visualization_slider_area
  89 + {
  90 + min-width: 566px;
  91 + min-height: 200px;
  92 + height: 175px;
  93 + }
  94 + .content-card {
  95 + position: relative;
  96 + float: left;
  97 + margin: .2em;
  98 + width: 14%;
  99 + min-height: 100px;
  100 + height: 40%;
  101 + background: #fff;
  102 + -moz-border-radius: 0.125rem;
  103 + -webkit-border-radius: 0.125rem;
  104 + border-radius: 0.125rem;
  105 + box-shadow: 0 0.625em 0.5125em 0 rgba(0, 0, 0, 0.25);
  106 + -webkit-box-shadow: 0 0.625em 0.5125em 0 rgba(0, 0, 0, 0.25);
  107 + -moz-box-shadow: 0 0.625em 0.5125em 0 rgba(0, 0, 0, 0.25);
  108 + padding: 1em;
  109 + }
  110 +
  111 + .content-selected{
  112 + position: relative;
  113 + float: left;
  114 + top : 5%;
  115 + margin : .2em;
  116 + width: 14%;
  117 + height: 40%;
  118 +
  119 + background: #fff;
  120 + border-style: solid;
  121 + border-width: 0.03em;
  122 + -moz-border-radius: 0.125rem;; /* Firefox */
  123 + -webkit-border-radius: 0.125rem;; /* Safari, Chrome */
  124 + border-radius: 0.125rem;
  125 + box-shadow: 0 1.825em 1.7125em 0 rgba(0, 0, 0, 0.50);
  126 + -webkit-box-shadow: 0 1.825em 1.7125em 0 rgba(0, 0, 0, 0.50);
  127 + -moz-box-shadow: 0 1.825em 1.7125em 0 rgba(0, 0, 0, 0.50);
  128 + padding: 1em;
  129 + }
  130 +
  131 + </style>
  132 +
  133 +</head>
  134 +<body unresolved>
  135 +
  136 +<template id="DEEP" is="dom-bind">
  137 +
  138 + <iron-ajax
  139 + auto
  140 + id="data_request"
  141 + url="http://ckan.routetopa.eu/api/action/datastore_search?resource_id=07843fc3-07e1-4c66-9be4-fed43ca4a26f"
  142 + verbose="true"
  143 + on-response="handleResponseData"
  144 + debounce-duration="300">
  145 + </iron-ajax>
  146 +
  147 + <iron-ajax
  148 + id="datales_list_request"
  149 + auto
  150 + url={{datasetsList}}
  151 + handle-as="json"
  152 + on-response="handleResponseDatalets"
  153 + debounce-duration="300">
  154 + </iron-ajax>
  155 +
  156 + <iron-ajax
  157 + id="selected_datalet_request"
  158 + url={{deepUrl}}
  159 + verbose="true"
  160 + on-response="handleSelectedDatalet"
  161 + debounce-duration="300">
  162 + </iron-ajax>
  163 +
  164 + <paper-toolbar id="toolbar">
  165 + <paper-menu-button>
  166 + <paper-icon-button icon="menu" class="dropdown-trigger"></paper-icon-button>
  167 + <paper-menu class="dropdown-content">
  168 + <paper-item><a href="http://routetopa.eu/" target="_blank">ROUTE-TO PA European Project</a></paper-item>
  169 + <paper-item><a href="docs/docs.html" target="_blank">DEEP Documentation</a></paper-item>
  170 + </paper-menu>
  171 + </paper-menu-button>
  172 + <span class="title">DatalEts-Ecosystem Provider - Datalet Creator</span>
  173 + <a href="http://routetopa.eu/" target="_blank"><paper-icon-button id="logo" ></paper-icon-button></a>
  174 + </paper-toolbar>
  175 + <div id="main_content">
  176 + <div class="vertical justified layout" style="margin-top: 40px;">
  177 +
  178 + <div class="horizontal layout">
  179 + <paper-textarea style="width: 80%;margin-top: 8px;" id="data_url" label="Dataset api data url" floatingLabel value="http://ckan.routetopa.eu/api/action/datastore_search?resource_id=07843fc3-07e1-4c66-9be4-fed43ca4a26f" on-change="_textElementChanged"></paper-textarea>
  180 + <paper-dropdown-menu style="width: 20%;" id="datasets-sources" label="Example datasets">
  181 + <paper-menu class="dropdown-content">
  182 + <template is="dom-repeat" items="[[Datasets.names]]" as="dataset" index-as="i">
  183 + <paper-item id="[[i]]" on-tap="_datasourceSelected">[[dataset]]</paper-item>
  184 + </template>
  185 + </paper-menu>
  186 + </paper-dropdown-menu>
  187 + </div>
  188 +
  189 + <div class="horizontal layout">
  190 +
  191 + <div style="position:relative;width: 50%;min-height: 40vh;max-height: 40vh;" id="fields_placeholder" class="area_container flexchild" style="min-width:300px">
  192 + <treeview-controllet id="fields_treeview"></treeview-controllet>
  193 + </div>
  194 +
  195 + <div style="position:relative;width: 50%;min-height: 40vh;max-height: 40vh;" id="table_fields_container" class="area_container flex2child">
  196 + <div id="table_component_place_holder"></div>
  197 + </div>
  198 +
  199 + </div>
  200 +
  201 + <div class="horizontal layout">
  202 +
  203 + <div style="position:relative;width: 50%;min-height: 80vh;max-height: 80vh;" id="datalet_params_main_placeholder" class="area_container flexchild" style="min-width:300px">
  204 + <div class="">
  205 + <div id="visualization_slider_area" class="area_container"></div>
  206 + <div id="fields_mapping_area" class="area_container horizontal layout">
  207 +
  208 + <div id="selected_fields_main_container" class="field-mapping-card" style="position:relative;width: 50%;min-height: 40vh;max-height: 40vh;">
  209 + <div class="title">
  210 + <div class="medium">Selected fields</div>
  211 + </div>
  212 + <div id="selected_fields_container" class="area_container"></div>
  213 + </div>
  214 +
  215 + <div id="idm_fields_main_container" class="field-mapping-card" style="position:relative;width: 50%;min-height: 40vh;max-height: 40vh;">
  216 + <div class="title">
  217 + <div class="medium">Datalet fields</div>
  218 + </div>
  219 + <div id="datalet_idm_fields_container" class="area_container"></div>
  220 + </div>
  221 + </div>
  222 + <div id="idm_layout_main_container" class="area_container" style="position:relative;min-height: 20vh;max-height: 20vh;">
  223 + <div class="title">
  224 + <div class="medium">Layout fields</div>
  225 + </div>
  226 + <div id="idm_layout_container" class="area_container"></div>
  227 + </div>
  228 + </div>
  229 +
  230 + </div>
  231 +
  232 + <div style="position:relative;width: 50%;min-height: 80vh;max-height: 80vh;" id="datalet_main_container" class="area_container flex2child">
  233 + </div>
  234 +
  235 + </div>
  236 +
  237 + <div class="horizontal layout">
  238 + <div id="code_area" style="position:relative;width: 100%;min-height: 20vh;max-height: 20vh;" class="area_container flex2child">
  239 + <textarea id="sbiricuda" style="position:relative;width: 100%;min-height: 20vh;max-height: 20vh;" style="" rows="4" cols="50">
  240 + Copy and paste this code to inject the datalet in you page.
  241 + </textarea>
  242 + </div>
  243 + </div>
  244 +
  245 + </div>
  246 +
  247 + </div>
  248 +</template>
  249 +<script>
  250 + DEEP.Datasets = {
  251 + names:[
  252 + 'Italy - Consuntivo entrate 2009',
  253 + 'Italy - Consuntivo entrate 2010',
  254 + 'Italy - Consuntivo entrate 2011',
  255 + 'Italy - Consuntivo entrate 2012',
  256 + 'Italy - Consuntivo entrate 2014',
  257 + 'Holland - Vestigingen register gemeente Groningen',
  258 + 'Holland - Woonruimte gemeente Groningen',
  259 + 'Ireland - SDCC Traffic Cameras',
  260 + 'Ireland - Derelict Site Register',
  261 + 'Ireland - Dublin City Council Commencement Notices',
  262 + 'Ireland - Dublin City Council Planning Applications',
  263 + 'Ireland - Dun Laoghaire-Rathdown County Council Planning Application 2008-2014',
  264 + 'Ireland - Fingal Council Planning Applications for last 7 years',
  265 + 'Ireland - Planning Register',
  266 + 'Ireland - Fingal Development Plan 2011-2017 Record of Protected Structures'
  267 + ],
  268 + urls: [
  269 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=07843fc3-07e1-4c66-9be4-fed43ca4a26f',
  270 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=48a4db73-d3d4-4639-bbc2-9c797d0e6cda',
  271 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=a14cc2fb-0c24-48d7-9370-834045797d89',
  272 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=fb32fcb6-5e44-4e52-b132-01c6540ddbee',
  273 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=0cb600fc-19ad-4aaf-9794-1e6ea851840a',
  274 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=ba554c1f-02a7-4d76-b449-fb9daa1f8bfd',
  275 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=af7b3916-4347-469a-8354-3c2d559bd92f',
  276 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=73e02092-85a1-434e-85fe-0c9a43aa9a52',
  277 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=fcbee83e-3d3d-4303-a568-24dd33d02adc',
  278 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=ee00de68-f2e4-482f-a003-3c0561351075',
  279 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=2f4a9d44-b52f-4c8b-a5db-d8f4a676d81e',
  280 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=c479f061-9638-489d-ac55-0c68765548ff',
  281 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=d29a477a-4734-43ef-8002-048c8640d441',
  282 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=2b23f32d-e27e-4eef-af1e-27e05103df7d',
  283 + 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=5ea813bc-fdf9-4edb-b3b1-0142b593d5c6'
  284 + ]
  285 + };
  286 +
  287 + DEEP.deepUrl = "http://192.168.214.128/DatalEts-Ecosystem-Provider/DEEP/";
  288 + DEEP.datasetsList = "http://192.168.214.128/DatalEts-Ecosystem-Provider/DEEP/datalets-list";
  289 +
  290 + DEEP.handleResponseData = function(e){
  291 + DEEP.$.fields_treeview.init(e.detail.response);
  292 + $("#fields_placeholder").perfectScrollbar();
  293 + $("#table_fields_container").perfectScrollbar();
  294 + };
  295 +
  296 + DEEP.handleResponseDatalets = function(e){
  297 + DEEP.datalets_list = new Array();
  298 + for(var i=0;i < e.detail.response.length;i++){
  299 + var datalet_info = { name : e.detail.response[i].name ,
  300 + image : e.detail.response[i].url + e.detail.response[i].name + ".png"
  301 + };
  302 +
  303 + DEEP.datalets_list.push(datalet_info);
  304 + }
  305 +
  306 + DEEP.$.visualization_slider_area.innerHTML = '<items-slider-controllet items=\'' + JSON.stringify(DEEP.datalets_list) + '\'' +
  307 + '\'></items-slider-controllet>';
  308 + };
  309 +
  310 + DEEP.handleSelectedDatalet = function(e){
  311 +
  312 + var response = e.detail.response;
  313 + DEEP.$.datalet_idm_fields_container.innerHTML = "";
  314 + DEEP.$.idm_layout_container.innerHTML = "";
  315 +
  316 + if(response.idm.inputs.input.constructor == Object) {
  317 + var input = response.idm.inputs.input;
  318 + if(input.selection == "*") {
  319 + var input_selected_fields = Polymer.dom(DEEP.$.selected_fields_container).querySelectorAll('draggable-element-controllet');
  320 + for (var j = 0; j < input_selected_fields.length; j++) {
  321 + DEEP.$.datalet_idm_fields_container.innerHTML += '<draggable-element-controllet is-target="true" heading="Field ' + (j + 1) + '" description="' + input.description + '" number="' + (j + 1) + '"></draggable-element-controllet><br>';
  322 + }
  323 + }
  324 + }else{
  325 + for(var i =0; i < response.idm.inputs.input.length; i++){
  326 + var input = response.idm.inputs.input[i];
  327 + DEEP.$.datalet_idm_fields_container.innerHTML += '<draggable-element-controllet is-target="true" id="' + input.name + '" heading="' + input.name + '" description="' + input.description + '" number="' + (i + 1) + '"></draggable-element-controllet><br>';
  328 + }
  329 + }
  330 +
  331 + if(response.idm.inputs.layouts.input.constructor == Object) {
  332 + var input = response.idm.inputs.layouts.input;
  333 + DEEP.$.idm_layout_container.innerHTML += '<text-element-controllet heading="' + input.name + '" description="' + input.description + '" number="1"></text-element-controllet>';
  334 + }else{
  335 + for(var i =0; i < response.idm.inputs.layouts.input.length; i++){
  336 + var input = response.idm.inputs.layouts.input[i];
  337 + DEEP.$.idm_layout_container.innerHTML += '<text-element-controllet heading="' + input.name + '" ' +
  338 + 'description="' + input.description + '" ' +
  339 + 'number="' + (i+1) + '">' +
  340 + '</text-element-controllet>';
  341 + }
  342 + }
  343 +
  344 + $("#selected_fields_main_container").perfectScrollbar();
  345 + $("#idm_fields_main_container").perfectScrollbar();
  346 + $("#idm_layout_main_container").perfectScrollbar();
  347 + $("#datalet_params_main_placeholder").perfectScrollbar();
  348 + };
  349 +
  350 + DEEP._urlChanged = function(event){
  351 + DEEP.$.data_request.url = event.target.value;
  352 + DEEP.$.data_request.generateRequest();
  353 + DEEP.$.table_component_place_holder.innerHTML = "";
  354 + };
  355 +
  356 + DEEP._datasourceSelected = function(event){
  357 + DEEP.$.data_url.value = DEEP.Datasets.urls[parseInt(event.target.id)];
  358 + DEEP.$.data_request.url = DEEP.Datasets.urls[parseInt(event.target.id)];
  359 + DEEP.$.data_request.generateRequest();
  360 + DEEP.$.table_component_place_holder.innerHTML = "";
  361 + };
  362 +
  363 + DEEP._fieldsSelected = function(e){
  364 +
  365 + DEEP.$.selected_fields_container.innerHTML = "";
  366 + for(var i=0;i<e.detail.fields.length;i++) {
  367 + DEEP.$.selected_fields_container.innerHTML += '<draggable-element-controllet identifier="' + e.detail.fields[i] +
  368 + '" label="' + e.detail.fields[i].split(",")[e.detail.fields[i].split(",").length -1] +
  369 + '"></draggable-element-controllet><br>';
  370 + }
  371 +
  372 + ComponentService.deep_url = DEEP.deepUrl;
  373 +
  374 + ComponentService.getComponent({
  375 + component : "datatable-datalet",
  376 + params :{
  377 + 'data-url' : DEEP.$.data_url.value
  378 + },
  379 + fields : e.detail.fields,
  380 + placeHolder : DEEP.$.table_component_place_holder
  381 + });
  382 +
  383 + };
  384 +
  385 + DEEP._dataletSelected = function(e){
  386 + DEEP.selected_datalet = e.detail.datalet;
  387 + DEEP.$.selected_datalet_request.url = DEEP.deepUrl + e.detail.datalet;
  388 + DEEP.$.selected_datalet_request.generateRequest();
  389 + };
  390 +
  391 + DEEP._fieldsMapped = function(e){
  392 + DEEP.generateDataletPreview();
  393 + };
  394 +
  395 + DEEP.timer = 0;
  396 + DEEP._textElementChanged = function(e){
  397 + clearTimeout (DEEP.timer);
  398 + DEEP.timer = setTimeout(DEEP.generateDataletPreview, 1500);
  399 + };
  400 +
  401 + DEEP.getXMLHttpRequest = function()
  402 + {
  403 + if (window.XMLHttpRequest) {
  404 + return new XMLHttpRequest();
  405 + }
  406 + else {
  407 + try {
  408 + return new ActiveXObject("MSXML2.XMLHTTP.3.0");
  409 + }
  410 + catch(ex) {
  411 + return null;
  412 + }
  413 + }
  414 + };
  415 +
  416 + DEEP.generateDataletPreview = function(){
  417 +
  418 + var input_mapped_fields = Polymer.dom(DEEP.$.datalet_idm_fields_container).querySelectorAll('draggable-element-controllet[is-target=true]');
  419 + DEEP.selected_fields = Array();
  420 +
  421 + for (var i = 0; i < input_mapped_fields.length; i++) {
  422 + if (input_mapped_fields[i].value != "") {
  423 + DEEP.selected_fields.push(input_mapped_fields[i].value);
  424 + }
  425 + }
  426 +
  427 + var input_layouts_fields = Polymer.dom(DEEP.$.idm_layout_container).querySelectorAll('text-element-controllet');
  428 + DEEP.params_fields = {'data-url' : DEEP.$.data_url.value};
  429 +
  430 + for (var i = 0; i < input_layouts_fields.length; i++) {
  431 + if (input_layouts_fields[i].value != "") {
  432 + DEEP.params_fields[input_layouts_fields[i].heading] = input_layouts_fields[i].value;
  433 + }
  434 + }
  435 +
  436 + ComponentService.deep_url = DEEP.deepUrl;
  437 + ComponentService.getComponent({
  438 + component : DEEP.selected_datalet,
  439 + params : DEEP.params_fields,
  440 + fields : DEEP.selected_fields,
  441 + placeHolder : DEEP.$.datalet_main_container
  442 + });
  443 +
  444 + var request = DEEP.getXMLHttpRequest();
  445 +
  446 + request.onreadystatechange = function(){
  447 + if(request.readyState == 4){
  448 + try {
  449 + var resp = JSON.parse(request.response);
  450 + var link = '<link rel="import" href="' + resp.bridge_link + resp.component_link +'">\n';
  451 +
  452 + //Build datalet injecting html code
  453 + var datalet_code = link + '<' + DEEP.selected_datalet;
  454 + var keys = Object.keys(DEEP.params_fields);
  455 + for(var i = 0; i < keys.length; i++){
  456 + datalet_code += ' ' + keys[i] + '=\'' + DEEP.params_fields[keys[i]] +'\'';
  457 + }
  458 + datalet_code += " fields='" + JSON.stringify(DEEP.selected_fields) + "'></" + DEEP.selected_datalet + ">";
  459 +
  460 + DEEP.$.code_area.innerHTML = '<textarea id="sbiricuda" style="position:relative;width: 100%;min-height: 20vh;max-height: 20vh;" style="" rows="4" cols="50" autofocus="false">' +
  461 + '<!-- ADD THE POLYFILL TO YOUR PAGE - https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.14/webcomponents.min.js -->\n' + datalet_code +
  462 + '</textarea>';
  463 +
  464 + editAreaLoader.init({
  465 + id : "sbiricuda" // textarea id
  466 + ,syntax: "html" // syntax to be uses for highgliting
  467 + ,start_highlight: true // to display with highlight mode on start-up
  468 + ,syntax: "html"
  469 + ,replace_tab_by_spaces: 4,
  470 + isEditable : false,
  471 + });
  472 +
  473 + } catch (e){
  474 + var resp = {
  475 + status: 'error',
  476 + data: 'Unknown error occurred: [' + request.response + ']'
  477 + };
  478 + }
  479 + }};
  480 +
  481 + request.open('GET', DEEP.deepUrl + DEEP.selected_datalet);
  482 + request.send();
  483 +
  484 + };
  485 +
  486 +</script>
  487 +
  488 +</body>
  489 +</html>
0 490 \ No newline at end of file
... ...
docs/js/editarea_0_8_2/change_log.txt 0 → 100644
  1 +**** v 0.8.2 ****
  2 +- Change back to remove the speed optimization for highlight process introduced in 0.8.1 that has too much bugs
  3 +- Syntax name are no more stored in language files but in syntax files. Thoses display names will be used only if the compressor tools is used, otherwise syntax code is displayed
  4 +- Activate word-wrap feature for opera > 9.6
  5 +- Bug fix: Selection wasn't corretcly remembered between file tabs
  6 +- Bug fix: [2886499] Page up and page Down action are no more executed if Alt touch is pressed
  7 +- Bug fix: [2887118] UTF-8 encoded URLs return wrong base URL
  8 +- Bug fix: [2851936] Unresolved reference to isIE in elements_functions.js
  9 +- Bug fix: [2886836] get_IE_selection bug when closed...
  10 +- bug fix: JavaScript error when switching to fullscreen (https://sourceforge.net/projects/editarea/forums/forum/556921/topic/3388824)
  11 +- Bug fix (but not applicable due to change back) : [2854519, 2854642, 2792217, 2834579 ] Desynchronisation occcured with <, > and & characters
  12 +
  13 +**** v 0.8.1.1 ****
  14 +- Fix bug of frequent syntax desynchronisation when the first character of the textarea was highlighted
  15 +- In unload now check that parent.editareaLoader still exists before calling it
  16 +- Now consider that gecko and webkit based browser are valid browsers (but I won't test them all)
  17 +
  18 +**** v 0.8.1 ****
  19 +- Improved speed of text highlighting process for huge file. Now we try to only insert or delete the changed caracters inside DOM text node instead of refreshing the whole area. (3 time faster in firefox)
  20 +- Greatly improved speed of line-height management in word-wrap context
  21 +- Add java syntax (thanks to Dawson Goodell)
  22 +- Use faster regexp for matching quoted strings
  23 +- Bug fix: if a highlighted quote or comment string contains cariage return, editing text on one of the lines was causin a highlight desynchronisation
  24 +- Bug fix: text war blur on Safari 3.2 (thanks to spellcoder)
  25 +- Bug fix: there had several mistake with non-monospace font (thanks to spellcoder)
  26 +- Bug fix: if show_line_colors was disabled and word wrap enable, highlighted text wasn't refreshed if a new line appears
  27 +- Bug fix: in multi file edition, closing the last tab was throwing an error in Firefox and let the content of the textarea displayed
  28 +- Browser bug detection: when using non-monospace font Firefox will sometime have strange behavior on text-width (the highlighted text-width in the background may change fron textarea one and simply can change after beeing updated); look likes a browser rendering bug
  29 +
  30 +**** v 0.8 ****
  31 +- Word-wrap is now supported (except for opera...). The new init() option is 'word_wrap' to set to 'true' (default is false). A new button appears in the default toolbar (button_code: 'word_wrap' )
  32 +- We can now clearly see the selected text
  33 +- Add Internet explorer 8 support (but sadly I must use IE7 emulate mode in iframe due to a bug with tabulation width not beeing resized in IE's textarea)
  34 +- Add Safari 4 support
  35 +- Add Chrome 2 support
  36 +- Better support of Opera 9.6
  37 +- Add Simplified Chinese translation "zh" (thanks to Abentian)
  38 +- Add Bulgarian translation "bg" (thanks to Valentin Hristov)
  39 +- Rename internal function $() by _$()
  40 +- Delete EditArea.add_event() method (duplicate af editAreaLoader.add_event() method)
  41 +- Do some code cleanup-up
  42 +- Bug fix: highlight optimisation process was not working under IE (don't known how long it remain broken but must be since a long time)
  43 +- Bug fix: EditArea.update_size sometimes uses undefined variable (fix this possibility and cleanup events)
  44 +- Bug fix: Template.html was not valid XHTML
  45 +- Bug fix: The checked attribute of the toogle button was not defined in xhtml syntax
  46 +- Bug fix: If the editArea was loaded on a page related to a domain which was itself an iframe comming from another domain a JS error was thrown on load
  47 +- Bug fix: When EditArea is used to replace a textarea which has style="visibility:hidden;", switching off EditArea would throw an error under IE
  48 +
  49 +**** v 0.7.3 ****
  50 +- Add Finnish transaltion (thanks to Janne Mäntyharju)
  51 +- Add 'cursor_position' init() option for defining where the cursor should be when the editor is show on the first time ('auto' or 'begin'). This was like 'auto' before now this is like 'begin' by default
  52 +- better add_style method (faster than old one) thanks to Spellcoder
  53 +- Bug fix: fix bug with mootools 1.2
  54 +- Bug fix: if page had no stylesheets when editarea load, it would generate an error
  55 +
  56 +**** v 0.7.2.3 ****
  57 +- it's now released under both LGPL, Apache, BSD license (you can use the one you prefer)
  58 +- add support for bonEcho browser
  59 +
  60 +**** v 0.7.2.2 ****
  61 +- Fix bug regression introduced in 0.7.2 that make IE7 not working
  62 +- add Esperento translation (thanks to Olivier)
  63 +- add Coldfusion syntax (thanks to Max Leynov)
  64 +
  65 +**** v 0.7.2.1 ****
  66 +- fix bug for firefox rendering of highlighted lines that doesn't begin with a tab
  67 +- support for browser with grandParadisio agent instead of firefox
  68 +
  69 +**** v 0.7.2 ****
  70 +- add Chrome support
  71 +- add show_line_colors init() option for enabling syntax color display and update on the currently edited line (disable the blue bar) (default to false)
  72 +- Add Perl syntax definition file (thanks to Christoph Pinkel)
  73 +- Bug fix: there allways was an horizontal scrollbar even if the content fit in the area.
  74 +
  75 +**** v 0.7.1.3 ****
  76 +- Fix a bug introduced in Firefox 3.0.1 => the browser is no more able to render properly "pre" element with left padding...
  77 +- Add Robots.txt (thanks to Pavle Ggardijan) and T-SQL syntax definition files (thanks to Miladin Joksic)
  78 +
  79 +**** v 0.7.1.2 ****
  80 +- Fix a bug on the full screen mode (regression added on 0.7.1.1)
  81 +
  82 +**** v 0.7.1.1 ****
  83 +- Firefox 3 RC1 compatibility
  84 +- Code size reduction: 120Ko => 107Ko for edit_area_full.js
  85 +
  86 +**** v 0.7.1 ****
  87 +- released under both LGPL and Apache license (you can use the one you prefer)
  88 +- it's now possible to get a readonly mode:
  89 + * new EditAreaLoader.init()'s option: "is_editable": true/false
  90 + * Possibility to switch edition mode by using the execCommand function: editAreaLoader.execCommand('editor_id', 'set_editable', !editAreaLoader.execCommand('editor_id', 'is_editable'));
  91 +- Added Ruby syntax (thanks to Patrice De Saint Steban)
  92 +- Fix a bug where the textarea lose the focus under firefox for Mac
  93 +- Minor other bug fixes
  94 +
  95 +**** v 0.7.0.2 ****
  96 +- Fixed a bug with translation files containing non-latin caracters. Translations files must be in UTF-8.
  97 +- Added Czech, Macedionian and Russian translations
  98 +
  99 +
  100 +**** v 0.7.0.1 ****
  101 +- in multiple file mode, it's now possible to cancel the 'EA_file_close_callback' function. if the callback return false, the edited file won't be closed
  102 +- bug fix: if no syntax was defined in the main init() function in multifile mode, the first time the text was not highlighted
  103 +
  104 +
  105 +**** v 0.7 ****
  106 +- it's now possible to edit multiple files into one instance of EditArea. This (sponsored by Jupiter) feature comes with:
  107 + * new EditAreaLoader.init()'s option: "is_multi_files": true
  108 + * new editAreaLoader's functions: editAreaLoader.getCurrentFile(editArea_id), editAreaLoader.getFile(editArea_id, file_id), editAreaLoader.getAllFiles(editArea_id), editAreaLoader.openFile(editArea_id, file_infos), editAreaLoader.closeFile(editArea_id, file_id), editAreaLoader.setFileEditedMode(editArea_id, file_id, edited_mode)
  109 + * new callabacks: EA_file_switch_on_callback, EA_file_switch_off_callback, EA_file_close_callback
  110 +- look likes Safari 3 is working with EditArea
  111 +- add spanish translation (thanks Garito)
  112 +- add slovak translation (thanks Gabriel Schwardy)
  113 +- add SQL syntax definition file (thanks to Philippe Lewicki)
  114 +- the syntax selection plugin has been integrated to editarea core and load only needed files (the plugins was loading all the possible syntax files...). Toolbar button name: "syntax_selection", comma separated available syntax list: "syntax_selection_allow"
  115 +- add a 'compression' option in edit_area_compressor.php that allow to set where the code should be compressed or just packed (simple packed mode usefull for debugging)
  116 +- the yellow area that indicate the current edited line is now blue
  117 +- bug fix: parenthesis matching was not working correctly if there where an "<" between parenthesis
  118 +
  119 +**** v 0.6.7 ****
  120 +- add a new plugin that allow the user to change the syntax definition in use. It adds a select in the toolbar. - plugin name to add to the plugin list: "syntax_selection". - plugin name to add to the toolbar list: "syntax_selection". - possible parameter to add to EditAreaLoader.init():
  121 +"syntax_selection_allow": (String) define a list separated by "," of possible language syntax to use (eg: "php,js,python,html")
  122 +- add Croatian translation (HR) (thanks to Ivan Vucica and Davor Cihlar)
  123 +- add BASIC, Brainf*ck, C, C++ and Pascal syntax definition files (thanks to Ivan Vucica and Davor Cihlar)
  124 +- add Iceweasel as a known working navigator (its a clone of Firefox)
  125 +- improved the php syntax by highlighting the variables ($...)
  126 +- reactivate gzip compression for IE7 (was desactivate for IE as it sometimes failed). (Let me know if you see that the load fails under IE7)
  127 +- pressing "enter" while being in the search box now perform a search.
  128 +- add Camino as a supported browser
  129 +- bug fix: when clicking between the bottom toolbar and the textarea (when there is only few lines of text), the textarea didn't get the focus
  130 +- bug fix: under IE the delete_instance() method was throwing an error
  131 +- bug fix: if the textarea to convert in an EditArea was in a frame (or iframe) getting back from fullscreen to normal display was not restoring the correct settings to the frame containing the textarea.
  132 +- bug fix (at least I hope): in IE if the textarea to convert in an EditArea was in a frame, resizing the frame was not correctly resizing the editor if it was in fullscreen.
  133 +- bug fix: in Opera the selectionned line was not rendered correctly if containing \t caracters (bug introduced in one of the latest version...)
  134 +- bug fix: "altgr+f" was openning the searchbox and avoid to write "[" and "]" in croatian keyboards.
  135 +- bug fix: in Firefox "ctrl+tab" was inserting a tabulation while switching active tab (window)
  136 +
  137 +Note: v 0.6.5 and v 0.6.6 have been private release (change log is regrouped in v 0.6.7)
  138 +
  139 +**** v 0.6.4 ****
  140 +- add replace_tab_by_spaces init() option which allow to replace all tabulation caracters typped in the text by a given number of spaces
  141 +- add min_width and min_height init() option for the minimum size in pixel for the editor
  142 +- add dutch translation files (NL) (thanks to Bart Bosma)
  143 +- pressing Shift+Tab when no text is selected now delete the tabulation before the cursor (if a tabulation is present directly behing the cursor)
  144 +- improve Python syntax (thanks to Andre Roberge)
  145 +- bug fix: the fullpage plugin was not working correctly when the Editor was placed inside several divs that have positioning of there own
  146 +- bug fix: one regexp used in edit_area_compressor.php was not compatible with latest PCRE version
  147 +
  148 +- fix the my_load and my_save functions of the 'exemple_full.html' page
  149 +
  150 +**** v 0.6.3.1 ****
  151 +- regression: restore monospace as default font
  152 +- add little improvements to the PHP compressor: allow to win 7 Ko on edit_area_full.js
  153 +- add the version number in the about popup
  154 +- bug fix: fix a regexp that was not compliant with newer version of PCRE
  155 +- bug fix: fix some bug with the fullscreen mode (still not perfect in Opera)
  156 +- bug fix: the close button of the help popup was not correctly translated
  157 +- bug fix: when deleting an instance of editArea toggle_off was called even if the editArea was not displayed
  158 +
  159 +
  160 +**** v 0.6.3 ****
  161 +- allow to use non monospace font using the font_family init option. Firefox get smaller tabulation with non monospace fonts. IE doesn't change the tabulation width and Opera doesn't take this option into account... new default font-familly: 'verdana,monospace'
  162 +- add fullscreen option in the toolbar and as an init() option.
  163 +- if the based textarea has a width (or height) in '%', EditArea will get the same '%' width (or height), allowing EditArea to be resized in the same time than the window.
  164 +- add many callback possibility: submit_callback, EA_load_callback, EA_unload_callback, EA_init_callback, EA_toggle_on_callback, EA_toggle_off_callback, EA_delete_callback (see documentation for more information)
  165 +- bug fix: when toggling from textarea to editarea, IE was almost of the time not keeping the selection
  166 +- bug fix: the brackets where still highlighted in red when being deleted
  167 +- bug fix: brackets where not placed correctly when the line contains html entitites (&amp; &quot; etc....)
  168 +
  169 +
  170 +**** v 0.6.2 ****
  171 +WARNING => POSSIBLE BREAK COMPATIBILITY:
  172 +- the load_callback now receive the 'id' of the textarea and no more a reference to the textarea. Developpers should use editAreaLoder methods rather than modfying directly the textarea.
  173 +- the save_callback now receive the 'id' of the textarea as first argument, and it's content in the second argument.
  174 +
  175 +- EditArea is now compatible with javascript libraries like "prototype" (1.5) and "mootools" (release 83)
  176 +- add two function to EditAreaLoader: hide(id) and show(id), that will allow to completly hide/restore both EditArea and normal textarea (usefull when EditArea is included in tabs).
  177 +- it's no more possible to move the search window out of the frame.
  178 +- gecko_spellcheck option is now set to false by default.
  179 +- add a onchange_callback option (cf doc)
  180 +- bug fix: in IE when syntax highlight was on, clicking on the textarea outside the range of the text, the click wasn't taking into account.
  181 +- bug fix: references to the orginal textarea could be lost while using EditArea.
  182 +- bug fix: using insertTags, getSelectionRange when editArea was not focused, IE failed
  183 +- bug fix: main script could fail to load additionnal files in certain specific cases
  184 +
  185 +**** v 0.6.1 ****
  186 +- compatiblity with Firefox 2 checked (was already compatible before).
  187 +- compatiblity with IE7 checked (was already compatible before).
  188 +- added possibility to call the editAreaLoader.init() function at any moment (no more limited to window load). Allow to replace an EditArea instance by a new one with other options.
  189 +- added new gecko_spellcheck option, this enables you to disable/enable the FF 2.0 spellchecker.
  190 +- added editAreaLoader.delete_instance(id) to allow to delete an EditArea instance
  191 +- Fix a bug where "Ctrl+G" wasn't openning anymore the go to line prompt box.
  192 +
  193 +
  194 +**** v 0.6.0.1 ****
  195 +- add italian translation (thanks to Luciano Vernaschi)
  196 +- add polish translation (thanks to Piotr Furman)
  197 +- improve deutsh translation (thanks to Felix Riesterer)
  198 +- add a little style improvement for buttons in search popup. they can't be splited in two line anymore
  199 +- change color for tags in html and xml syntax due to visibility problems
  200 +
  201 +
  202 +**** v 0.6 ****
  203 +- add plugins possibilies
  204 +- add editAreaLoader.insertTags function to allow easy tags insertion.
  205 +- improve undo & redo functionnality
  206 +- improve php compression: "edit_area_full.js" is 9 Ko smaller
  207 +- improve syntax highlight regexp for quotted string. \\" or \\' (or \\\\", etc...) will now effectively close quotted string
  208 +- add scrollbars to the popups when the popup's height is smaller than the editor's height
  209 +- add japanese translation file (thanks to ISHITOYA Kentaro)
  210 +- add possibility to add line-break in toolbar ("*")
  211 +- disable gzip compression for IE (see: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312496)
  212 +- bug fix: when submitting form while editarea toggled off, the post value was equals to the old content of editarea and not the visible textarea
  213 +- bug fix: under IE the editor was scrolling when pressing enter
  214 +- bug fix: when insterting text on first line there was an highlight desynchronization
  215 +
  216 +
  217 +
  218 +**** v 0.5.3 ****
  219 +WARNING => POSSIBLE BREAK COMPATIBILITY:
  220 +- correct a spelling error: "toogle" become "toggle" in the whole code. This can perturb the initialization with the "allow_toggle" init parameters
  221 +
  222 +- add a case sensitive option in syntax definition files
  223 +- improve html syntax definition file
  224 +- add xml syntax definition file
  225 +- add vb syntax definition file (thanks to Martin Gottlieb)
  226 +- add some function that will allow dynamic EditArea content management, taking into account if the editor is displayed or toggled off (editAreaLodaer.getValue(), editAreaLoader.setValue(), editAreaLoader.getSelectedText(), editAreaLoader.setSelectedText(), editAreaLoader.getSelectionRange and editAreaLoader.setSelectionRange()). See "javascript functions" documentation for more informations
  227 +- add a generic function (editaAreaLoader.execCommand) to allow to access EditArea's functions and datas
  228 +- add portuguese translation file (thanks to Leonardo Sapucaia)
  229 +- add compatibility to IE7 RC1
  230 +
  231 +
  232 +**** v 0.5.2 ****
  233 +- Opera improvement: text indentation is now working, and "go to line" is now working as in other browsers
  234 +- Bug fix: It was still possible to select text in search popup
  235 +- Bug fix: the "go to line" popup wasn't displaying anymore
  236 +- There was still some hard codded word in the search field => added them to translation files
  237 +- Bug fix: when multiple languages were used in the same page, there could have translation exchange between the different editors
  238 +
  239 +
  240 +**** v 0.5.1 ****
  241 +- Bug fix: the highlighted bracket was displayed on line 1 when it should be in line 2
  242 +- Bug fix: the highlighted bracket were bad displayed in IE
  243 +- Bug fix: their was some error in the optimisation process of the highlight mode
  244 +- Bug fix: their was a bug when moving the search popup on IE
  245 +
  246 +**** v 0.5 ****
  247 +- Now released under LGPL
  248 +- Rewrite nearly from scratch
  249 +- Added Danish translation file (thanks to Peter Klein)
  250 +- Add python syntax
  251 +
  252 +
  253 +WARNING => BREAK COMPATIBILITY:
  254 +- the whole loading process (javascript include and init function call) is changed (but it's similar to the old version)
  255 +- the languages translation files are not stored in the same variable
  256 +
  257 +
  258 +IMPROVEMENTS:
  259 +- The whole code is more stable
  260 +- Allow several instance on the same page
  261 +- Faster to load
  262 +- The highlight process is more stable and there is nearly no more to use the "re sync" button
  263 +- Add support of Opera 9 (even if its still not perfect)
  264 +- Add the possibility to load a new compressed script of only 20Ko for the whole core script even if PHP is not installed
  265 +- The textarea can be toggled to an EditArea on window load or later
  266 +- The EditArea is loaded in a iframe => there is no more interaction with user css
  267 +- Support the reset action of a form
  268 +- Add support for "page up" & "page down" button
  269 +- There is now a waiting screen when toggling on the highlight syntax (but it can't be an animated one, even gif are not animated due to CPU load)
  270 +- All supported browsers can now change font-size
  271 +
  272 +BUG FIXES:
  273 +- Sometimes while using the "toggle editor" button to turn of the editor, the standard textarea was expanded to the full size of the textarea content.
  274 +- When resizing the area the selection was lost
  275 +- Allow translation for some forgotten hard-coded word (the "move" button for search popup, and "font size", and keys word in help panel).
  276 +- It was possible to "drag" the buttons from the Search/Replace popup into the content of the textarea.
  277 +- On first display (when the files are not in cache) or with xhtml doctype there is a display bug (the content of the textarea exceed of 4px)
  278 +- when the cursor was at the beginning of the 1st line of the textarea, the caracter position was set to 0 instead of 1
  279 +
  280 +
  281 +
  282 +***v 0.4****
  283 +- Increases syntax highlight proccess speed by 5 => allow a better live editing mode with syntax highlight.
  284 +- Now syntax highlight has a real language syntax. Text is parsing with rules depending of the language definition file. (limitation: there is only one language on the same time > doesn't allow to parse html and php on the same page).
  285 +- Syntax highlight can be easily extended with new code languages (there is currently: php, css, js, html).
  286 +- Add german language file (thanks to Olaf Brambrink).
  287 +- Fix some little bugs.
  288 +
  289 +
  290 +
  291 +
  292 +***v0.33***
  293 +- First release.
... ...
docs/js/editarea_0_8_2/docs/about.html 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  4 +<head>
  5 + <title>EditArea documentation</title>
  6 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7 + <link href="doc_style.css" rel="stylesheet" type="text/css" />
  8 +</head>
  9 +<body>
  10 + <div class='header'>
  11 + <h1>About</h1>
  12 + </div>
  13 + <div class='content'>
  14 + <h2>General information</h2>
  15 + <p>EditArea is a free javascript editor for source code. It allow to write
  16 + well formated source code. That's no way a WYSIWYG editor.
  17 + </p>
  18 + <p>
  19 + EditArea is developed by Christophe Dolivet
  20 + and is currently released
  21 + under the "LGPL", "Apache" and "BSD" licenses (use the one you want), read the licenses agreement for details.
  22 + </p>
  23 + <h2>Features</h2>
  24 + <ul>
  25 + <li>Easy to integrate, only one script include and one function call</li>
  26 + <li>Tabulation support (allow to write well formated source code)</li>
  27 + <li>Customizable real-time syntax highlighting (currently: PHP, CSS, Javascript, Python, HTML, XML, VB, C, CPP, SQL, Pascal, Basic, Brainf*ck, and probably more...)</li>
  28 + <li>Word-wrap support</li>
  29 + <li>Search and replace (with regexp)</li>
  30 + <li>Auto-indenting new lines</li>
  31 + <li>Line numerotation</li>
  32 + <li>Multilanguage support (currently: Croatian, Czech, Danish, Dutch, English, Esperanto, French, German, Italian, Japanese, Macedonian, Polish, Portuguese, Russian, Slovak, Spanish, and probably more...)</li>
  33 + <li>Possible PHP gzip compression (compress the core files to one file of ~25Ko)</li>
  34 + <li>Allow multiple instances</li>
  35 + <li>Full screen mode</li>
  36 + <li>Possible plugin integration</li>
  37 + <li>Possible save and load callback functions</li>
  38 + <li>Possible dynamic content management</li>
  39 + <li>Can work in the same environment than "prototype" and "mootools"'s like libraries.</li>
  40 + </ul>
  41 +
  42 + </div>
  43 + <div class='footer'>
  44 + <div class="indexlink"><a href="index.html">Index</a></div>
  45 + <div class='copyright'>EditArea - &copy; Christophe Dolivet 2007-2010</div>
  46 + <br style="clear: both" />
  47 + </div>
  48 +</body>
  49 +</html>
... ...
docs/js/editarea_0_8_2/docs/compatibility.html 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  4 +<head>
  5 + <title>EditArea documentation</title>
  6 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7 + <link href="doc_style.css" rel="stylesheet" type="text/css" />
  8 +</head>
  9 +<body>
  10 + <div class='header'>
  11 + <h1>Compatiblity Chart</h1>
  12 + </div>
  13 + <div class='content'>
  14 + <h2>Browser support</h2>
  15 + <p>EditArea uses advanced JavaScript and tries to be as smart as possible when it comes to
  16 + different browsers. But as every browser (and every version of thoses browser) manage
  17 + css and javascript implementation with some little change, it will probably be bad
  18 + displayed on other browser.
  19 + The table was reset to only show the browsers I take care of.
  20 + </p>
  21 +
  22 + <p> Since I have no mac and currently have no computer under linux, I can't testing multi-plateform browsers.
  23 + Let me know if you constat that such browsers are working.
  24 + </p>
  25 + <p>
  26 + <table border="1" cellspacing="0" cellpadding="4">
  27 + <tr>
  28 + <td>&nbsp;</td>
  29 + <td>Windows XP</td>
  30 + <td>Linux</td>
  31 + <td>MacOS X</td>
  32 + </tr>
  33 + <tr>
  34 + <td>MSIE 6 & 7 & 8</td>
  35 + <td>OK</td>
  36 + <td>&nbsp;</td>
  37 + <td>&nbsp;</td>
  38 + </tr>
  39 + <tr>
  40 + <td>Firefox 1.5 & 2 & 3 & 3.5</td>
  41 + <td>OK</td>
  42 + <td>OK</td>
  43 + <td>OK</td>
  44 + </tr>
  45 + <tr>
  46 + <td>Safari 3.0 & 3.1 & 4</td>
  47 + <td>OK</td>
  48 + <td>&nbsp;</td>
  49 + <td>OK</td>
  50 + </tr>
  51 + <tr>
  52 + <td>Chrome 1 & 2 & 3</td>
  53 + <td>OK</td>
  54 + <td>???</td>
  55 + <td>???</td>
  56 + </tr>
  57 + <tr>
  58 + <td>Opera 9 & 9.6 & 10.1</td>
  59 + <td>OK</td>
  60 + <td>OK</td>
  61 + <td>OK</td>
  62 + </tr>
  63 + <tr>
  64 + <td>Camino 1.2</td>
  65 + <td>&nbsp;</td>
  66 + <td>&nbsp;</td>
  67 + <td>OK</td>
  68 + </tr>
  69 + </table>
  70 + </p>
  71 + <p>
  72 + (1) - Partialy working<br />
  73 + (2) - Buggy browser version
  74 + </p>
  75 + <br />
  76 + <strong>Notices:</strong>
  77 + <ul>
  78 + <li>The Opera 9 full compatibility is nearly impossible due to some javascript implementation bugs in Opera.</li>
  79 + <li>Iceweasel is considered to be the same as Firefox.</li>
  80 + <li>As Mozilla is replaced by Firefox, I don't include it in my testcase.</li>
  81 + <li>As Netscape 8 is not a world release I also don't include it in my testcase.</li>
  82 + </ul>
  83 + </div>
  84 + <div class='footer'>
  85 + <div class="indexlink"><a href="index.html">Index</a></div>
  86 + <div class='copyright'>EditArea - &copy; Christophe Dolivet 2007-2010</div>
  87 + <br style="clear: both" />
  88 + </div>
  89 +</body>
  90 +</html>
... ...
docs/js/editarea_0_8_2/docs/configuration.html 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  4 +<head>
  5 + <title>EditArea documentation</title>
  6 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7 + <link href="doc_style.css" rel="stylesheet" type="text/css" />
  8 +</head>
  9 +<body>
  10 + <div class='header'>
  11 + <h1>Configuration reference</h1>
  12 + </div>
  13 + <div class='content'>
  14 + <p>This document is the index/reference page for all available core configuration
  15 + options in EditArea.</p>
  16 + <div class="separator"></div>
  17 +
  18 + <h2>Configuration options</h2>
  19 + <p>All configuration options below is to be placed within the init JavaScript call.<br />
  20 + <ul class='optionlist'>
  21 + <li><strong>Needed option</strong>
  22 + <ul>
  23 + <li><strong>id</strong>: should contain the id of the textarea that should be converted into an editor
  24 + <br /><span class='underline'>Type</span>: String
  25 + <br /><span class='underline'>Default</span>: null</li>
  26 + </ul>
  27 + <br />
  28 + </li>
  29 + <li><strong>General</strong>
  30 + <ul>
  31 + <li><strong>language</strong>: should contain a code of the language pack to be used for translation. If EditArea doesn't have a language pack for your language you could always write your own and contribute this back to this project by uploading it as a Patch at <a href='http://sourceforge.net/projects/editarea/'>SourceForge</a>.
  32 + <br /><span class='underline'>Type</span>: String
  33 + <br /><span class='underline'>Default</span>: "en"
  34 + </li>
  35 + <li><strong>syntax</strong>: should contain a code of the syntax definition file that must be used for the highlight mode.
  36 + <br /><span class='underline'>Type</span>: String
  37 + <br /><span class='underline'>Default</span>: ""
  38 + </li>
  39 + <li><strong>start_highlight</strong>: set if the editor should start with highlighted syntax displayed.
  40 + <br /><span class='underline'>Type</span>: Boolean
  41 + <br /><span class='underline'>Default</span>: false
  42 + </li>
  43 + <li><strong>is_multi_files</strong>: determine if the editor load the content of the textarea (false) or if it wait for an openFile() call for allowing file editing.
  44 + <br /><span class='underline'>Type</span>: Boolean
  45 + <br /><span class='underline'>Default</span>: false
  46 + </li>
  47 + <li><strong>min_width</strong>: define the minimum width of the editor
  48 + <br /><span class='underline'>Type</span>: Integer
  49 + <br /><span class='underline'>Default</span>: 400
  50 + </li>
  51 + <li><strong>min_height</strong>: define the minimum height of the editor
  52 + <br /><span class='underline'>Type</span>: Integer
  53 + <br /><span class='underline'>Default</span>: 100
  54 + </li>
  55 + <li><strong>allow_resize</strong>: define one with axis the editor can be resized by the user.
  56 + <br /><span class='underline'>Type</span>: String ("no" (no resize allowed), "both" (x and y axis), "x", "y")
  57 + <br /><span class='underline'>Default</span>: "both"
  58 + </li>
  59 + <li><strong>allow_toggle</strong>: define if a toggle button must be added under the editor in order to allow to toggle between the editor and the orginal textarea.
  60 + <br /><span class='underline'>Type</span>: Boolean
  61 + <br /><span class='underline'>Default</span>: true
  62 + </li>
  63 + <li><strong>plugins</strong>: a comma separated list of plugins to load.
  64 + <br /><span class='underline'>Type</span>: String
  65 + <br /><span class='underline'>Default</span>: ""
  66 + </li>
  67 + <li><strong>browsers</strong>: define if the editor must be loaded only when the user navigotr is known to be a working one, or if it will be loaded for all navigators.
  68 + <br /><span class='underline'>Type</span>: String ("all" or "known")
  69 + <br /><span class='underline'>Default</span>: "known"
  70 + </li>
  71 + <li><strong>display</strong>: specify when the textarea will be converted into an editor. If set to &quot;later&quot;, the toogle button will be displayed to allow later conversion.
  72 + <br /><span class='underline'>Type</span>: String ("onload" or "later")
  73 + <br /><span class='underline'>Default</span>: "onload"
  74 + </li>
  75 + <li><strong>toolbar</strong>: define the toolbar that will be displayed, each element being separated by a ",".
  76 + <br /><span class='underline'>Type</span>: String (combinaison of: "|", "*", "search", "go_to_line", "undo", "redo", "change_smooth_selection", "reset_highlight", "highlight", "word_wrap", "help", "save", "load", "new_document", "syntax_selection")
  77 + <br />"|" or "separator" make appears a separator in the toolbar.
  78 + <br />"*" or "return" make appears a line-break in the toolbar
  79 + <br /><span class='underline'>Default</span>: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, word_wrap, |, help"
  80 + </li>
  81 + <li><strong>begin_toolbar</strong>: toolbar button list to add before the toolbar defined by the "toolbar" option.
  82 + <br /><span class='underline'>Type</span>: String (cf. "toolbar" option)
  83 + <br /><span class='underline'>Default</span>: ""
  84 + </li>
  85 + <li><strong>end_toolbar</strong>: toolbar button list to add after the toolbar defined by the "toolbar" option.
  86 + <br /><span class='underline'>Type</span>: String (cf. "toolbar" option)
  87 + <br /><span class='underline'>Default</span>: ""
  88 + </li>
  89 + <li><strong>font_size</strong>: define the font-size used to display the text in the editor.
  90 + <br /><span class='underline'>Type</span>: Integer
  91 + <br /><span class='underline'>Default</span>: 10
  92 + </li>
  93 + <li><strong>font_family</strong>: define the font-familly used to display the text in the editor. (eg: "monospace" or "verdana,monospace"). Opera will always use "monospace".
  94 + <br /><span class='underline'>Type</span>: String
  95 + <br /><span class='underline'>Default</span>: "monospace"
  96 + </li>
  97 + <li><strong>cursor_position</strong>: define if the cursor should be placed where it was in the textarea before replacement (auto) or at the beginning of the file (begin).
  98 + <br /><span class='underline'>Type</span>: String ("begin" or "auto")
  99 + <br /><span class='underline'>Default</span>: "begin"
  100 + </li>
  101 + <li><strong>gecko_spellcheck</strong>: allow to disable/enable the Firefox 2 spellchecker
  102 + <br /><span class='underline'>Type</span>: Boolean
  103 + <br /><span class='underline'>Default</span>: false
  104 + </li>
  105 + <li><strong>max_undo</strong>: number of undo action allowed
  106 + <br /><span class='underline'>Type</span>: Integer
  107 + <br /><span class='underline'>Default</span>: 20
  108 + </li>
  109 + <li><strong>fullscreen</strong>: determine if EditArea start in fullscreen mode or not
  110 + <br /><span class='underline'>Type</span>: Boolean
  111 + <br /><span class='underline'>Default</span>: false
  112 + </li>
  113 + <li><strong>is_editable</strong>: determine if EditArea display only the highlighted syntax (no edition possiblities, no toolbars).
  114 + It's possible to switch the editable mode whenever you want (code example for a toggle edit mode: <em>editAreaLoader.execCommand('editor_id', 'set_editable', !editAreaLoader.execCommand('editor_id', 'is_editable'));</em>).
  115 + <br /><span class='underline'>Type</span>: Boolean
  116 + <br /><span class='underline'>Default</span>: true
  117 + </li>
  118 + <li><strong>word_wrap</strong>: determine if the text will be automatically wrapped to the next line when it reach the end of a line. This is linked ot the word_wrap icon available in the toolbar.
  119 +
  120 + <br /><span class='underline'>Type</span>: Boolean
  121 + <br /><span class='underline'>Default</span>: false
  122 + </li>
  123 + <li><strong>replace_tab_by_spaces</strong>: define the number of spaces that will replace tabulations (\t) in text. If tabulation should stay tabulation, set this option to false.
  124 + <br /><span class='underline'>Type</span>: Integer (or false)
  125 + <br /><span class='underline'>Default</span>: false
  126 + </li>
  127 + <li><strong>debug</strong>: used to display some debug information into a newly created textarea. Can be usefull to display trace info in it if you want to modify the code.
  128 + <br /><span class='underline'>Type</span>: Boolean
  129 + <br /><span class='underline'>Default</span>: false
  130 + </li>
  131 + </ul>
  132 + <br />
  133 + </li>
  134 + <li><strong>Callback</strong>
  135 + <ul>
  136 + <li><strong>load_callback</strong>: the function name that will be called when the user will press the "load" button in the toolbar. This function will reveice one parameter that will be the id of the textarea. You can update the content of the textarea by using "editAreaLoader.setValue(the_id, new_value);".
  137 + <br /><span class='underline'>Type</span>: String
  138 + <br /><span class='underline'>Default</span>: ""
  139 + </li>
  140 + <li><strong>save_callback</strong>: the function name that will be called when the user will press the "save" button in the toolbar. This function will reveice two parameters, the first being the id of the textarea and the second containing the content of the textarea.
  141 + <br /><span class='underline'>Type</span>: String
  142 + <br /><span class='underline'>Default</span>: ""
  143 + </li>
  144 + <li><strong>change_callback</strong>: the function name that will be called when the onchange event of the textarea of EditArea will be triggered. This function will reveice one parameter that will be the id of the textarea. Will be triggered only is EditArea is displayed.
  145 + <br /><span class='underline'>Type</span>: String
  146 + <br /><span class='underline'>Default</span>: ""
  147 + </li>
  148 + <li><strong>submit_callback</strong>: the function name that will be called when the form containing the EditArea will be submitted. This function will reveice one parameter that will be the id of the textarea. Will be triggered regardless the state of EditArea (displayed or not).
  149 + <br /><span class='underline'>Type</span>: String
  150 + <br /><span class='underline'>Default</span>: ""
  151 + </li>
  152 + <li><strong>EA_init_callback</strong>: the function name that will be called just after the editAreaLoader.init() function, once EditAreaLoader will be initalized but still not displayed. This function will receive one parameter that will be the id of the textarea.
  153 + <br /><span class='underline'>Type</span>: String
  154 + <br /><span class='underline'>Default</span>: ""
  155 + </li>
  156 + <li><strong>EA_delete_callback</strong>: the function name that will be called when EditArea will be destroyed regardless the fact that it has been displayed or not. This function will reveice one parameter that will be the id of the textarea.
  157 + <br /><span class='underline'>Type</span>: String
  158 + <br /><span class='underline'>Default</span>: ""
  159 + </li>
  160 + <li><strong>EA_toggle_on_callback</strong>: the function name that will be called when EditArea will be toogled on for. This function will reveice one parameter that will be the id of the textarea.
  161 + <br /><span class='underline'>Type</span>: String
  162 + <br /><span class='underline'>Default</span>: ""
  163 + </li>
  164 + <li><strong>EA_toggle_off_callback</strong>: the function name that will be called when EditArea will be toggled off. This function will reveice one parameter that will be the id of the textarea.
  165 + <br /><span class='underline'>Type</span>: String
  166 + <br /><span class='underline'>Default</span>: ""
  167 + </li>
  168 + <li><strong>EA_load_callback</strong>: the function name that will be called when EditArea will be displayed for the first time. This function will reveice one parameter that will be the id of the textarea.
  169 + <br /><span class='underline'>Type</span>: String
  170 + <br /><span class='underline'>Default</span>: ""
  171 + </li>
  172 + <li><strong>EA_unload_callback</strong>: the function name that will be called when EditArea will be destroyed (if it have been displayed at least one time). This function will reveice one parameter that will be the id of the textarea.
  173 + <br /><span class='underline'>Type</span>: String
  174 + <br /><span class='underline'>Default</span>: ""
  175 + </li>
  176 + <li><strong>EA_file_switch_on_callback</strong>: the function name that will be called when the tabulation of the file will be selected. This function will reveice one parameter that will be an associative array containing all file's infos.
  177 + <br /><span class='underline'>Type</span>: String
  178 + <br /><span class='underline'>Default</span>: ""
  179 + </li>
  180 + <li><strong>EA_file_switch_off_callback</strong>: the function name that will be called when the tabulation of the file will be blur (the file was selected, and another file receive focus). This function will reveice one parameter that will be an associative array containing all file infos.
  181 + <br /><span class='underline'>Type</span>: String
  182 + <br /><span class='underline'>Default</span>: ""
  183 + </li>
  184 + <li><strong>EA_file_close_callback</strong>: the function name that will be called when the tabulation of a file will be closed. This function will reveice one parameter that will be an associative array containing all file infos. If the callback function return false, the file won't be closed.
  185 + <br /><span class='underline'>Type</span>: String
  186 + <br /><span class='underline'>Default</span>: ""
  187 + </li>
  188 + </ul>
  189 + <br />
  190 + </li>
  191 + </ul>
  192 + <div class="separator"></div>
  193 +
  194 + <h2>Initialization of EditArea</h2>
  195 + <p>In order to initialize EditArea the following code must be placed within HEAD element
  196 + of a document. The following example is configurated to convert the TEXTAREA element
  197 + which has &quot;textarea_1&quot; as id into editor when the page loads. The &quot;id&quot;
  198 + option is the only obligatory option.
  199 +<pre>
  200 +&lt;html&gt;
  201 +&lt;head&gt;
  202 +<strong>&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;/editarea/edit_area/edit_area_full.js&quot;&gt;&lt;/script&gt;
  203 +&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot;&gt;
  204 +editAreaLoader.init({
  205 + id : &quot;textarea_1&quot; // textarea id
  206 + ,syntax: "css" // syntax to be uses for highgliting
  207 + ,start_highlight: true // to display with highlight mode on start-up
  208 +});
  209 +&lt;/script&gt;</strong>
  210 +&lt;/head&gt;
  211 +</pre>
  212 + </p>
  213 + <p>See the <a href='include.html'>include</a> document to learn more about the way to use the best script include.
  214 + </p>
  215 + <p>If you want to convert several textarea on your webpage, just call several time the init function with a different id parameter.</p>
  216 +
  217 + </div>
  218 + <div class='footer'>
  219 + <div class="indexlink"><a href="index.html">Index</a></div>
  220 + <div class='copyright'>EditArea - &copy; Christophe Dolivet 2007-2010</div>
  221 + <br style="clear: both" />
  222 + </div>
  223 +</body>
  224 +</html>
... ...
docs/js/editarea_0_8_2/docs/credits.html 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  4 +<head>
  5 + <title>EditArea documentation</title>
  6 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7 + <link href="doc_style.css" rel="stylesheet" type="text/css" />
  8 +</head>
  9 +<body>
  10 + <div class='header'>
  11 + <h1>Credits</h1>
  12 + </div>
  13 + <div class='content'>
  14 + <h2>Special thanks</h2>
  15 + <p>
  16 + I would like to make a special thanks to <a href='http://tinymce.moxiecode.com'>TinyMCE</a>
  17 + developpers. I have taken some of their WYSIWYG editor functions
  18 + (managing the toolbar buttons),
  19 + and it give me inspiration for some point (gzip compression, translation, documentation)
  20 + of my project.
  21 + </p>
  22 + <h2>Contributors</h2>
  23 + <p> These are the people that have contributed in some way to the EditArea project.
  24 + If you feel we are missing someone please inform me right away and I will correct this
  25 + in future versions of EditArea.
  26 + </p>
  27 + <ul>
  28 + <li>Global help
  29 + <ul>
  30 + <li>Gildas Noël</li>
  31 + <li>Spellcoder</li>
  32 + </ul>
  33 + </li>
  34 + <li>Languages translation
  35 + <ul>
  36 + <li>Olaf Brambrink &amp; Felix Riesterer &amp; Christoph Pinkel (Deutsh)</li>
  37 + <li>Peter Klein (Danish)</li>
  38 + <li>Leonardo Sapucaia (Portuguese)</li>
  39 + <li>Ishitoya Kentaro (Japanese)</li>
  40 + <li>Piotr Furman (Polish)</li>
  41 + <li>Luciano Vernaschi (Italian)</li>
  42 + <li>Ivan Vucica and Davor Cihlar (Croatian)</li>
  43 + <li>Garito (Spanish)</li>
  44 + <li>Gabriel Schwardy (Slovak)</li>
  45 + <li>Olivier (Esperento)</li>
  46 + <li>Janne Mäntyharju (Finnish)</li>
  47 + <li>Abentian (Simplified chinese)</li>
  48 + <li>Valentin Hristov (Bulgarian)</li>
  49 + </ul>
  50 + </li>
  51 + <li>Syntax definitions
  52 + <ul>
  53 + <li>Martin Gottlieb (VB)</li>
  54 + <li>Ivan Vucica and Davor Cihlar (Basic, C, CPP, Pascal and Brainfuck)</li>
  55 + <li>Philippe Lewicki (SQL)</li>
  56 + <li>Pavle Ggardijan (Robots.txt)</li>
  57 + <li>Miladin Joksic (T-SQL)</li>
  58 + <li>Christoph Pinkel (Perl)</li>
  59 + <li>Max Leynov (Coldfusion)</li>
  60 + <li>Dawson Goodel (Java)</li>
  61 + </ul>
  62 + </li>
  63 + <li>Donation
  64 + <ul>
  65 + <li>Jupiter</li>
  66 + </ul>
  67 + </li>
  68 + </ul>
  69 + </div>
  70 + <div class='footer'>
  71 + <div class="indexlink"><a href="index.html">Index</a></div>
  72 + <div class='copyright'>EditArea - &copy; Christophe Dolivet 2007-2010</div>
  73 + <br style="clear: both" />
  74 + </div>
  75 +</body>
  76 +</html>
... ...
docs/js/editarea_0_8_2/docs/customization_language.html 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  4 +<head>
  5 + <title>EditArea documentation</title>
  6 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7 + <link href="doc_style.css" rel="stylesheet" type="text/css" />
  8 +</head>
  9 +<body>
  10 + <div class='header'>
  11 + <h1>Customization - Creating a language translation</h1>
  12 + </div>
  13 + <div class='content'>
  14 + <h2>Making language file</h2>
  15 +
  16 + <p>Language packs are simply JavaScript name/value arrays placed in the &quot;.js&quot;
  17 + files in the &quot;lang&quot; directory. Notice there are two kinds of language packs.</p>
  18 + <ul>
  19 + <li><p>The first one is the general one located at &quot;edit_area/langs/&quot; and used by the EditArea core.
  20 + The example below shows how the search and replace texts are lang packed.</p>
  21 +<pre>editAreaLoader.lang["en"]={
  22 +search: "search",
  23 +replace: "replace"
  24 +};</pre>
  25 + </li>
  26 + <li><p>The second ones are plugins specific language packs. These are contained in
  27 + &quot;edit_area/plugins/&lt;plugin_name&gt;/langs/&quot;. Here is the example of the test plugin.</p>
  28 +<pre>editArea.add_lang("en",{
  29 +test_select: "select tag",
  30 +test_but: "test button"
  31 +});</pre>
  32 + <p>For creating a new plugin, remember to always use the &quot;&lt;plugin_name&gt;&quot;
  33 + prefix for these value names so that they don't override other variables in the templates.
  34 + </p>
  35 + </li>
  36 + </ul>
  37 + <p>
  38 + Remember, the last translation line should not have a , character at the end.
  39 + </p>
  40 +
  41 + <h3>Files to edit</h3>
  42 +
  43 + <p>
  44 + When translating EditArea, these are the files that currently needs to be translated:
  45 + </p>
  46 + <p>
  47 + edit_area/langs/en.js<br />
  48 + edit_area/plugins/&lt;plugin_name&gt;/langs/en.js<br />
  49 + </p>
  50 +
  51 + <h3>Contributing your language pack</h3>
  52 + <p>
  53 + Go to the <a href="http://sourceforge.net/tracker/?atid=829999&group_id=164008&func=browse">sourceforge patch page</a>
  54 + and upload a zip containing all the language files in the correct directory structure.<br /><br />
  55 +
  56 + Please translate all the plugins, even if you aren't using them.<br />
  57 + </p>
  58 + </div>
  59 + <div class='footer'>
  60 + <div class="indexlink"><a href="index.html">Index</a></div>
  61 + <div class='copyright'>EditArea - &copy; Christophe Dolivet 2007-2010</div>
  62 + <br style="clear: both" />
  63 + </div>
  64 +</body>
  65 +</html>
... ...
docs/js/editarea_0_8_2/docs/customization_plugin.html 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  4 +<head>
  5 + <title>EditArea documentation</title>
  6 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7 + <link href="doc_style.css" rel="stylesheet" type="text/css" />
  8 +</head>
  9 +<body>
  10 + <div class='header'>
  11 + <h1>Customization - Creating a plugin</h1>
  12 + </div>
  13 + <div class='content'>
  14 + <h2>Creating your own plugins</h2>
  15 + <p>
  16 + Creating you own plugins for EditArea is fairly easy if you know the basics of HTML, CSS and Javascript.
  17 + The most easy way is to copy the &quot;test&quot; directory and work from there. The &quot;test&quot;
  18 + directory is a tutorial plugin that shows how to create a plugin. After you copy the template you need to
  19 + change the red sections marked below to the name of your plugin this is needed so that plugins don't
  20 + overlap in other words it gives the plugin a unique name. Notice that when you write a new plugin,
  21 + you have to end each javascript instructions by ";", even if it's optionnal in javascript.
  22 + </p>
  23 +
  24 + <p>If you want you may add plugin specific options/settings but remember to namespace them in the
  25 + following format &quot;&lt;your plugin&gt;_&lt;option&gt;&quot; for example &quot;yourplugin_someoption&quot;.</p>
  26 +
  27 + <p>Specific callback functions that you don't need or doesn't do anything can be removed.</p>
  28 +
  29 + <p>If you want you can try the test plugin by adding the following parameters to the EditAreaLoader.init command.</p>
  30 + <pre>end_toolbar: "*,test_but, |,test_select",
  31 +plugins: "test",</pre>
  32 +
  33 + <div class="separator"></div>
  34 + <h3>Plugin directory structure</h3>
  35 + <p>
  36 + <table class="btable">
  37 + <thead>
  38 + <th>File/Directory</td>
  39 + <th>Description</td>
  40 + </thead>
  41 + <tbody>
  42 + <tr><td>css</td><td>Plugin specific CSS files</td></tr>
  43 + <tr><td>images</td><td>Plugin specific images</td></tr>
  44 + <tr><td>langs</td><td>Plugin specific language files</td></tr>
  45 + <tr><td>&lt;your_plugin&gt;.js</td><td>Main plugin file</td></tr>
  46 +
  47 + </table>
  48 + </p>
  49 + <div class="separator"></div>
  50 + <h3>Plugin example source</h3>
  51 + <p>
  52 + The example below shows a simple empty plugin and all possible callbacks.
  53 + </p>
  54 + <p>
  55 +
  56 + <div class="example">
  57 + <pre>/**
  58 + * Plugin designed for test prupose. It add a button (that manage an alert) and a select (that allow to insert tags) in the toolbar.
  59 + * This plugin also disable the "f" key in the editarea, and load a CSS and a JS file
  60 + */
  61 +var EditArea_<span class='marked'>test</span>= {
  62 + /**
  63 + * Get called once this file is loaded (editArea still not initialized)
  64 + *
  65 + * @return nothing
  66 + */
  67 + init: function(){
  68 + // alert("test init: "+ this._someInternalFunction(2, 3));
  69 + editArea.load_css(this.baseURL+"css/test.css");
  70 + editArea.load_script(this.baseURL+"test2.js");
  71 + }
  72 + /**
  73 + * Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
  74 + * A control can be a button, select list or any other HTML item to present in the EditArea user interface.
  75 + * Language variables such as {$lang_somekey} will also be replaced with contents from
  76 + * the language packs.
  77 + *
  78 + * @param {string} ctrl_name: the name of the control to add
  79 + * @return HTML code for a specific control or false.
  80 + * @type string or boolean
  81 + */
  82 + ,get_control_html: function(ctrl_name){
  83 + switch(ctrl_name){
  84 + case "<span class='marked'>test_but</span>":
  85 + // Control id, button img, isFileSpecific, command
  86 + return parent.editAreaLoader.get_button_html('<span class='marked'>test_but</span>', '<span class='marked'>test.gif</span>', '<span class='marked'>test_cmd</span>', false, this.baseURL);
  87 + case "<span class='marked'>test_select</span>":
  88 + html= "&lt;select id='<span class='marked'>test_select</span>' onchange='javascript:editArea.execCommand(\"<span class='marked'>test_select_change</span>\")'&gt;"
  89 + +" &lt;option value='-1'&gt;<span class='marked'>{$test_select}</span>&lt;/option&gt;"
  90 + +" &lt;option value='h1'&gt;h1&lt;/option&gt;"
  91 + +" &lt;option value='h2'&gt;h2&lt;/option&gt;"
  92 + +" &lt;option value='h3'&gt;h3&lt;/option&gt;"
  93 + +" &lt;option value='h4'&gt;h4&lt;/option&gt;"
  94 + +" &lt;option value='h5'&gt;h5&lt;/option&gt;"
  95 + +" &lt;option value='h6'&gt;h6&lt;/option&gt;"
  96 + +" &lt;/select&gt;";
  97 + return html;
  98 + }
  99 + return false;
  100 + }
  101 + /**
  102 + * Get called once EditArea is fully loaded and initialised
  103 + *
  104 + * @return nothing
  105 + */
  106 + ,onload: function(){
  107 + alert("test load");
  108 + }
  109 +
  110 + /**
  111 + * Is called each time the user touch a keyboard key.
  112 + *
  113 + * @param (event) e: the keydown event
  114 + * @return true - pass to next handler in chain, false - stop chain execution
  115 + * @type boolean
  116 + */
  117 + ,onkeydown: function(e){
  118 + var str= String.fromCharCode(e.keyCode);
  119 + // desactivate the "f" character
  120 + if(str.toLowerCase()=="f"){
  121 + return true;
  122 + }
  123 + return false;
  124 + }
  125 +
  126 + /**
  127 + * Executes a specific command, this function handles plugin commands.
  128 + *
  129 + * @param {string} cmd: the name of the command being executed
  130 + * @param {unknown} param: the parameter of the command
  131 + * @return true - pass to next handler in chain, false - stop chain execution
  132 + * @type boolean
  133 + */
  134 + ,execCommand: function(cmd, param){
  135 + // Handle commands
  136 + switch(cmd){
  137 + case "<span class='marked'>test_select_change</span>":
  138 + var val= document.getElementById("test_select").value;
  139 + if(val!=-1)
  140 + parent.editAreaLoader.insertTags(editArea.id, "&lt;"+val+"&gt;", "&lt;/"+val+"&gt;");
  141 + document.getElementById("test_select").options[0].selected=true;
  142 + return false;
  143 + case "<span class='marked'>test_cmd</span>":
  144 + alert("user clicked on test_cmd");
  145 + return false;
  146 + }
  147 + // Pass to next handler in chain
  148 + return true;
  149 + }
  150 +
  151 + /**
  152 + * This is just an internal plugin method, prefix all internal methods with a _ character.
  153 + * The prefix is needed so they doesn't collide with future EditArea callback functions.
  154 + *
  155 + * @param {string} a Some arg1.
  156 + * @param {string} b Some arg2.
  157 + * @return Some return.
  158 + * @type unknown
  159 + */
  160 + ,_someInternalFunction : function(a, b) {
  161 + return a+b;
  162 + }
  163 +};
  164 +
  165 +// Adds the plugin class to the list of available EditArea plugins
  166 +editArea.add_plugin("<span class='marked'>test</span>", EditArea_<span class='marked'>test</span>);</pre>
  167 +<br />
  168 + </div>
  169 + <div class='footer'>
  170 + <div class="indexlink"><a href="index.html">Index</a></div>
  171 + <div class='copyright'>EditArea - &copy; Christophe Dolivet 2007-2010</div>
  172 + <br style="clear: both" />
  173 + </div>
  174 +</body>
  175 +</html>
... ...
docs/js/editarea_0_8_2/docs/customization_syntax.html 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  4 +<head>
  5 + <title>EditArea documentation</title>
  6 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7 + <link href="doc_style.css" rel="stylesheet" type="text/css" />
  8 +</head>
  9 +<body>
  10 + <div class='header'>
  11 + <h1>Customization - Creating a syntax definition file</h1>
  12 + </div>
  13 + <div class='content'>
  14 + <h3>Creating your own syntax definition file</h3>
  15 + <p>Creating you own syntax definition file for EditArea is fairly easy. You just have to know the language syntax,
  16 + it's kewords, and then fill a javascript array with thoses values.</p>
  17 + <p>If your want to create a new syntax file for a given language, choose a language abbreviation for it
  18 + (&lt;language_abbr&gt;) in lowercase. Then create the file &quot;edit_area/reg_syntax/&lt;language_abbr&gt;.js&quot;.</p>
  19 + <p>Here is a &quot;css&quot; example:</p>
  20 +<pre>editAreaLoader.load_syntax["css"] = { <strong>// here &lt;language_abbr&gt; is &quot;css&quot; so the file is &quot;css.js&quot;</strong>
  21 + 'DISPLAY_NAME' : 'Css' <strong>// String: used to define a better syntax name to display. Used only when using script using compressed version of the script</strong>
  22 + ,'COMMENT_SINGLE' : ['@'] <strong>// Array: possible single line comments</strong>
  23 + ,'COMMENT_MULTI' : {'/*' : '*/'} <strong>// associated Array: possible multiple line comments</strong>
  24 + <strong>// ("open_mark1" : "close mark1", "open_mark2" : "close_mark2"}</strong>
  25 + ,'QUOTEMARKS' : ['"', "'"] <strong>// Array: the different possible quotemarks that delimitate strings</strong>
  26 + ,'KEYWORD_CASE_SENSITIVE' : false <strong>// Boolean: define if the language is case-sensitive</strong>
  27 + ,'KEYWORDS' : { <strong>// Array: an array of array containing the different keywords class</strong>
  28 + 'attributes' : [ <strong>// the name 'attribute' can be changed with no problem. I</strong>
  29 + <strong>// it's only used to define the matching style class</strong>
  30 + 'aqua', 'azimuth', 'background-attachment', 'background-color' <strong>// etc...</strong>
  31 + ]
  32 + ,'values' : [
  33 + 'absolute', 'block', 'bold', 'bolder', 'both' <strong>// etc...</strong>
  34 + ]
  35 + ,'specials' : [
  36 + 'important'
  37 + ]
  38 + }
  39 + ,'OPERATORS' :[ <strong>// Array: the operators to highlight (eg, can also contain: +, -, * or / in other languages).</strong>
  40 + ':', ';', '!', '.', '#'
  41 + ]
  42 + ,'DELIMITERS' :[ <strong>// Array: the block code delimiters to highlight</strong>
  43 + '{', '}'
  44 + ]
  45 + ,'STYLES' : { <strong>// Array: an array of array, containing all style to apply for categories defined before.</strong>
  46 + <strong>// Better to define color style only. </strong>
  47 + 'COMMENTS': 'color: #AAAAAA;'
  48 + ,'QUOTESMARKS': 'color: #6381F8;'
  49 + ,'KEYWORDS' : { <strong>// contain the associated style foreach keywords categories</strong>
  50 + 'attributes' : 'color: #48BDDF;'
  51 + ,'values' : 'color: #2B60FF;'
  52 + ,'specials' : 'color: #FF0000;'
  53 + }
  54 + ,'OPERATORS' : 'color: #FF00FF;'
  55 + ,'DELIMITERS' : 'color: #60CA00;'
  56 +
  57 + }
  58 +};</pre>
  59 + <p>After reading this example you should be able to create your own syntax file.</p>
  60 + <div class='separator'></div>
  61 + <h3>Advanced syntax definition</h3>
  62 +
  63 +<pre>editAreaLoader.load_syntax["xml"] = {
  64 + 'COMMENT_SINGLE' : {}
  65 + ,'COMMENT_MULTI' : {'&lt;!--' : '--&gt;'}
  66 + ,'QUOTEMARKS' : {1: "'", 2: '"'}
  67 + ,'KEYWORD_CASE_SENSITIVE' : false
  68 + ,'KEYWORDS' : {
  69 + }
  70 + ,'OPERATORS' :[
  71 + ]
  72 + ,'DELIMITERS' :[
  73 + ]
  74 + ,'REGEXPS' : { <strong>// advance syntax highlight through regexp</strong>
  75 + 'xml' : { <strong>// the name 'doctype' can be changed with no problem.</strong>
  76 + 'search' : '()(&lt;\\?[^&gt;]*?\\?&gt;)()' <strong>// the regexp</strong>
  77 + ,'class' : 'xml' <strong>// the css class</strong>
  78 + ,'modifiers' : 'g' <strong>// the modifier (&quot;g&quot; and/or &quot;i&quot;)</strong>
  79 + ,'execute' : 'before' <strong>// &quot;before&quot; or &quot;after&quot;. Determine if the regexp must </strong>
  80 + <strong>// be done before or after the main highlight process</strong>
  81 + }
  82 + ,'cdatas' : {
  83 + 'search' : '()(&lt;!\\[CDATA\\[.*?\\]\\]&gt;)()'
  84 + ,'class' : 'cdata'
  85 + ,'modifiers' : 'g'
  86 + ,'execute' : 'before'
  87 + }
  88 + ,'tags' : {
  89 + 'search' : '(&lt;)(/?[a-z][^ \r\n\t&gt;]*)([^&gt;]*&gt;)'
  90 + ,'class' : 'tags'
  91 + ,'modifiers' : 'gi'
  92 + ,'execute' : 'before'
  93 + }
  94 + ,'attributes' : {
  95 + 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
  96 + ,'class' : 'attributes'
  97 + ,'modifiers' : 'g'
  98 + ,'execute' : 'before'
  99 + }
  100 + }
  101 + ,'STYLES' : {
  102 + 'COMMENTS': 'color: #AAAAAA;'
  103 + ,'QUOTESMARKS': 'color: #6381F8;'
  104 + ,'KEYWORDS' : {
  105 + }
  106 + ,'OPERATORS' : 'color: #E775F0;'
  107 + ,'DELIMITERS' : ''
  108 + ,'REGEXPS' : {
  109 + 'attributes': 'color: #B1AC41;'
  110 + ,'tags': 'color: #800080;'
  111 + ,'xml': 'color: #8DCFB5;'
  112 + ,'cdata': 'color: #50B020;'
  113 + }
  114 + }
  115 +};</pre>
  116 + <p>Well, as you can see in this example, the syntax highlight for xml is not based on keywords but on regexp.
  117 + The text that will be highlighted, is the one between the second parentheses. The search parameter should always
  118 + be like this:
  119 + </p>
  120 + <pre>(&lt;before_highlight&gt;)(&lt;code_to_highlight&gt;)(&lt;after_highlight&gt;)</pre>
  121 + <p>For the pattern modifier, &quot;g&quot; signify that all occurences will be highlighted, &quot;i&quot; signify
  122 + that the regexp will be case-insensitive.</p>
  123 +
  124 + <div class='separator'></div>
  125 +
  126 + <h3>Contributing your syntax definition file</h3>
  127 + <p>
  128 + Go to the <a href="http://sourceforge.net/tracker/?atid=829999&group_id=164008&func=browse">sourceforge patch page</a>
  129 + and upload the syntax file.
  130 + </p>
  131 +
  132 +
  133 + </div>
  134 + <div class='footer'>
  135 + <div class="indexlink"><a href="index.html">Index</a></div>
  136 + <div class='copyright'>EditArea - &copy; Christophe Dolivet 2007-2010</div>
  137 + <br style="clear: both" />
  138 + </div>
  139 +</body>
  140 +</html>
... ...
docs/js/editarea_0_8_2/docs/doc_style.css 0 → 100644
  1 +body {
  2 + background-color: #FFFFFF;
  3 + font-family: Verdana, Arial, helvetica, sans-serif;
  4 + font-size: 12px;
  5 +}
  6 +
  7 +h1{
  8 + font-size: 18px;
  9 + font-weight: bold;
  10 + padding: 0;
  11 + margin: 4px;
  12 +}
  13 +
  14 +h2 {
  15 + font-size: 14px;
  16 + font-weight: bold;
  17 + padding: 0;
  18 + margin: 0;
  19 + margin-top: 4px;
  20 + margin-bottom: 4px;
  21 +}
  22 +
  23 +h3 {
  24 + font-size: 11px;
  25 + font-weight: bold;
  26 + padding: 0;
  27 + margin: 0;
  28 + margin-bottom: 3px;
  29 +}
  30 +
  31 +h4, h5, h6{
  32 + margin: 0;
  33 + padding: 0;
  34 +}
  35 +
  36 +pre, code{
  37 + margin: 0;
  38 + padding: 0 5px;
  39 + background-color: #E6EBF1;
  40 +}
  41 +
  42 +
  43 +a:hover{
  44 + color: #666666;