WhitespaceClean-resources/edit_area
whitespace pass over files for reference regex that was used s/[ \t]+(\r?\n)/\1/
This commit is contained in:
@@ -2,39 +2,39 @@
|
||||
* Charmap plugin
|
||||
* by Christophe Dolivet
|
||||
* v0.1 (2006/09/22)
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* This plugin allow to use a visual keyboard allowing to insert any UTF-8 characters in the text.
|
||||
*
|
||||
*
|
||||
* - plugin name to add to the plugin list: "charmap"
|
||||
* - plugin name to add to the toolbar list: "charmap"
|
||||
* - possible parameters to add to EditAreaLoader.init():
|
||||
* - plugin name to add to the toolbar list: "charmap"
|
||||
* - possible parameters to add to EditAreaLoader.init():
|
||||
* "charmap_default": (String) define the name of the default character range displayed on popup display
|
||||
* (default: "arrows")
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
var EditArea_charmap= {
|
||||
/**
|
||||
* Get called once this file is loaded (editArea still not initialized)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
init: function(){
|
||||
* @return nothing
|
||||
*/
|
||||
init: function(){
|
||||
this.default_language="Arrows";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the HTML code for a specific control string or false if this plugin doesn't have that control.
|
||||
* A control can be a button, select list or any other HTML item to present in the EditArea user interface.
|
||||
* Language variables such as {$lang_somekey} will also be replaced with contents from
|
||||
* the language packs.
|
||||
*
|
||||
* @param {string} ctrl_name: the name of the control to add
|
||||
*
|
||||
* @param {string} ctrl_name: the name of the control to add
|
||||
* @return HTML code for a specific control or false.
|
||||
* @type string or boolean
|
||||
*/
|
||||
*/
|
||||
,get_control_html: function(ctrl_name){
|
||||
switch(ctrl_name){
|
||||
case "charmap":
|
||||
@@ -45,32 +45,32 @@ var EditArea_charmap= {
|
||||
}
|
||||
/**
|
||||
* Get called once EditArea is fully loaded and initialised
|
||||
*
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
,onload: function(){
|
||||
*/
|
||||
,onload: function(){
|
||||
if(editArea.settings["charmap_default"] && editArea.settings["charmap_default"].length>0)
|
||||
this.default_language= editArea.settings["charmap_default"];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is called each time the user touch a keyboard key.
|
||||
*
|
||||
*
|
||||
* @param (event) e: the keydown event
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
* @type boolean
|
||||
*/
|
||||
,onkeydown: function(e){
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Executes a specific command, this function handles plugin commands.
|
||||
*
|
||||
* @param {string} cmd: the name of the command being executed
|
||||
* @param {unknown} param: the parameter of the command
|
||||
* @param {unknown} param: the parameter of the command
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
* @type boolean
|
||||
*/
|
||||
,execCommand: function(cmd, param){
|
||||
// Handle commands
|
||||
@@ -83,7 +83,7 @@ var EditArea_charmap= {
|
||||
// Pass to next handler in chain
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
// Adds the plugin class to the list of available EditArea plugins
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
body{
|
||||
background-color: #F0F0EE;
|
||||
background-color: #F0F0EE;
|
||||
font: 12px monospace, sans-serif;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ a.char:hover{
|
||||
padding: 2px 5px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
text-align:center;
|
||||
text-align:center;
|
||||
background-color: #CCCCCC;
|
||||
font-size: 2em;
|
||||
float: right;
|
||||
|
||||
@@ -2,9 +2,9 @@ var editArea;
|
||||
|
||||
|
||||
/**
|
||||
* UTF-8 list taken from http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec
|
||||
*/
|
||||
|
||||
* UTF-8 list taken from http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
var char_range_list={
|
||||
@@ -324,10 +324,10 @@ function map_load(){
|
||||
document.title= editArea.get_translation(document.title, "template");
|
||||
document.body.innerHTML= editArea.get_translation(document.body.innerHTML, "template");
|
||||
//document.title= editArea.get_translation(document.getElementBytitle, "template");
|
||||
|
||||
|
||||
var selected_lang=opener.EditArea_charmap.default_language.toLowerCase();
|
||||
var selected=0;
|
||||
|
||||
|
||||
var select= document.getElementById("select_range")
|
||||
for(var i in char_range_list){
|
||||
if(i.toLowerCase()==selected_lang)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* Plugin designed for test prupose. It add a button (that manage an alert) and a select (that allow to insert tags) in the toolbar.
|
||||
* This plugin also disable the "f" key in the editarea, and load a CSS and a JS file
|
||||
*/
|
||||
*/
|
||||
var EditArea_test= {
|
||||
/**
|
||||
* Get called once this file is loaded (editArea still not initialized)
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
init: function(){
|
||||
* @return nothing
|
||||
*/
|
||||
init: function(){
|
||||
// alert("test init: "+ this._someInternalFunction(2, 3));
|
||||
editArea.load_css(this.baseURL+"css/test.css");
|
||||
editArea.load_script(this.baseURL+"test2.js");
|
||||
@@ -18,11 +18,11 @@ var EditArea_test= {
|
||||
* A control can be a button, select list or any other HTML item to present in the EditArea user interface.
|
||||
* Language variables such as {$lang_somekey} will also be replaced with contents from
|
||||
* the language packs.
|
||||
*
|
||||
* @param {string} ctrl_name: the name of the control to add
|
||||
*
|
||||
* @param {string} ctrl_name: the name of the control to add
|
||||
* @return HTML code for a specific control or false.
|
||||
* @type string or boolean
|
||||
*/
|
||||
*/
|
||||
,get_control_html: function(ctrl_name){
|
||||
switch(ctrl_name){
|
||||
case "test_but":
|
||||
@@ -44,19 +44,19 @@ var EditArea_test= {
|
||||
}
|
||||
/**
|
||||
* Get called once EditArea is fully loaded and initialised
|
||||
*
|
||||
*
|
||||
* @return nothing
|
||||
*/
|
||||
,onload: function(){
|
||||
*/
|
||||
,onload: function(){
|
||||
alert("test load");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is called each time the user touch a keyboard key.
|
||||
*
|
||||
*
|
||||
* @param (event) e: the keydown event
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
* @type boolean
|
||||
*/
|
||||
,onkeydown: function(e){
|
||||
var str= String.fromCharCode(e.keyCode);
|
||||
@@ -66,14 +66,14 @@ var EditArea_test= {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Executes a specific command, this function handles plugin commands.
|
||||
*
|
||||
* @param {string} cmd: the name of the command being executed
|
||||
* @param {unknown} param: the parameter of the command
|
||||
* @param {unknown} param: the parameter of the command
|
||||
* @return true - pass to next handler in chain, false - stop chain execution
|
||||
* @type boolean
|
||||
* @type boolean
|
||||
*/
|
||||
,execCommand: function(cmd, param){
|
||||
// Handle commands
|
||||
@@ -82,7 +82,7 @@ var EditArea_test= {
|
||||
var val= document.getElementById("test_select").value;
|
||||
if(val!=-1)
|
||||
parent.editAreaLoader.insertTags(editArea.id, "<"+val+">", "</"+val+">");
|
||||
document.getElementById("test_select").options[0].selected=true;
|
||||
document.getElementById("test_select").options[0].selected=true;
|
||||
return false;
|
||||
case "test_cmd":
|
||||
alert("user clicked on test_cmd");
|
||||
@@ -91,7 +91,7 @@ var EditArea_test= {
|
||||
// Pass to next handler in chain
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is just an internal plugin method, prefix all internal methods with a _ character.
|
||||
* The prefix is needed so they doesn't collide with future EditArea callback functions.
|
||||
|
||||
Reference in New Issue
Block a user