Add htmlarea http://www.htmlarea.com/ tool to appdb
116
htmlarea/plugins/CSS/css.js
Normal file
@@ -0,0 +1,116 @@
|
||||
// Simple CSS (className) plugin for the editor
|
||||
// Sponsored by http://www.miro.com.au
|
||||
// Implementation by Mihai Bazon, http://dynarch.com/mishoo.
|
||||
//
|
||||
// (c) dynarch.com 2003-2005.
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
//
|
||||
// $Id$
|
||||
|
||||
function CSS(editor, params) {
|
||||
this.editor = editor;
|
||||
var cfg = editor.config;
|
||||
var toolbar = cfg.toolbar;
|
||||
var self = this;
|
||||
var i18n = CSS.I18N;
|
||||
var plugin_config = params[0];
|
||||
var combos = plugin_config.combos;
|
||||
|
||||
var first = true;
|
||||
for (var i = combos.length; --i >= 0;) {
|
||||
var combo = combos[i];
|
||||
var id = "CSS-class" + i;
|
||||
var css_class = {
|
||||
id : id,
|
||||
options : combo.options,
|
||||
action : function(editor) { self.onSelect(editor, this, combo.context, combo.updatecontextclass); },
|
||||
refresh : function(editor) { self.updateValue(editor, this); },
|
||||
context : combo.context
|
||||
};
|
||||
cfg.registerDropdown(css_class);
|
||||
|
||||
// prepend to the toolbar
|
||||
toolbar[1].splice(0, 0, first ? "separator" : "space");
|
||||
toolbar[1].splice(0, 0, id);
|
||||
if (combo.label)
|
||||
toolbar[1].splice(0, 0, "T[" + combo.label + "]");
|
||||
first = false;
|
||||
}
|
||||
};
|
||||
|
||||
CSS._pluginInfo = {
|
||||
name : "CSS",
|
||||
version : "1.0",
|
||||
developer : "Mihai Bazon",
|
||||
developer_url : "http://dynarch.com/mishoo/",
|
||||
c_owner : "Mihai Bazon",
|
||||
sponsor : "Miro International",
|
||||
sponsor_url : "http://www.miro.com.au",
|
||||
license : "htmlArea"
|
||||
};
|
||||
|
||||
CSS.prototype.onSelect = function(editor, obj, context, updatecontextclass) {
|
||||
var tbobj = editor._toolbarObjects[obj.id];
|
||||
var index = tbobj.element.selectedIndex;
|
||||
var className = tbobj.element.value;
|
||||
|
||||
// retrieve parent element of the selection
|
||||
var parent = editor.getParentElement();
|
||||
var surround = true;
|
||||
|
||||
var is_span = (parent && parent.tagName.toLowerCase() == "span");
|
||||
var update_parent = (context && updatecontextclass && parent && parent.tagName.toLowerCase() == context);
|
||||
|
||||
if (update_parent) {
|
||||
parent.className = className;
|
||||
editor.updateToolbar();
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_span && index == 0 && !/\S/.test(parent.style.cssText)) {
|
||||
while (parent.firstChild) {
|
||||
parent.parentNode.insertBefore(parent.firstChild, parent);
|
||||
}
|
||||
parent.parentNode.removeChild(parent);
|
||||
editor.updateToolbar();
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_span) {
|
||||
// maybe we could simply change the class of the parent node?
|
||||
if (parent.childNodes.length == 1) {
|
||||
parent.className = className;
|
||||
surround = false;
|
||||
// in this case we should handle the toolbar updation
|
||||
// ourselves.
|
||||
editor.updateToolbar();
|
||||
}
|
||||
}
|
||||
|
||||
// Other possibilities could be checked but require a lot of code. We
|
||||
// can't afford to do that now.
|
||||
if (surround) {
|
||||
// shit happens ;-) most of the time. this method works, but
|
||||
// it's dangerous when selection spans multiple block-level
|
||||
// elements.
|
||||
editor.surroundHTML("<span class='" + className + "'>", "</span>");
|
||||
}
|
||||
};
|
||||
|
||||
CSS.prototype.updateValue = function(editor, obj) {
|
||||
var select = editor._toolbarObjects[obj.id].element;
|
||||
var parent = editor.getParentElement();
|
||||
if (typeof parent.className != "undefined" && /\S/.test(parent.className)) {
|
||||
var options = select.options;
|
||||
var value = parent.className;
|
||||
for (var i = options.length; --i >= 0;) {
|
||||
var option = options[i];
|
||||
if (value == option.value) {
|
||||
select.selectedIndex = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
select.selectedIndex = 0;
|
||||
};
|
||||
2
htmlarea/plugins/CSS/lang/en.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// none yet; this file is a stub.
|
||||
CSS.I18N = {};
|
||||
70
htmlarea/plugins/CharacterMap/character-map.js
Normal file
@@ -0,0 +1,70 @@
|
||||
// Character Map plugin for HTMLArea
|
||||
// Sponsored by http://www.systemconcept.de
|
||||
// Implementation by Holger Hees based on HTMLArea XTD 1.5 (http://mosforge.net/projects/htmlarea3xtd/)
|
||||
// Original Author - Bernhard Pfeifer novocaine@gmx.net
|
||||
//
|
||||
// (c) systemconcept.de 2004
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
function CharacterMap(editor) {
|
||||
this.editor = editor;
|
||||
|
||||
var cfg = editor.config;
|
||||
var toolbar = cfg.toolbar;
|
||||
var self = this;
|
||||
var i18n = CharacterMap.I18N;
|
||||
|
||||
cfg.registerButton({
|
||||
id : "insertcharacter",
|
||||
tooltip : i18n["CharacterMapTooltip"],
|
||||
image : editor.imgURL("ed_charmap.gif", "CharacterMap"),
|
||||
textMode : false,
|
||||
action : function(editor) {
|
||||
self.buttonPress(editor);
|
||||
}
|
||||
})
|
||||
|
||||
var a, i, j, found = false;
|
||||
for (i = 0; !found && i < toolbar.length; ++i) {
|
||||
a = toolbar[i];
|
||||
for (j = 0; j < a.length; ++j) {
|
||||
if (a[j] == "inserthorizontalrule") {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
a.splice(j, 0, "insertcharacter");
|
||||
else{
|
||||
toolbar[1].splice(0, 0, "separator");
|
||||
toolbar[1].splice(0, 0, "insertcharacter");
|
||||
}
|
||||
};
|
||||
|
||||
CharacterMap._pluginInfo = {
|
||||
name : "CharacterMap",
|
||||
version : "1.0",
|
||||
developer : "Holger Hees & Bernhard Pfeifer",
|
||||
developer_url : "http://www.systemconcept.de/",
|
||||
c_owner : "Holger Hees & Bernhard Pfeifer",
|
||||
sponsor : "System Concept GmbH & Bernhard Pfeifer",
|
||||
sponsor_url : "http://www.systemconcept.de/",
|
||||
license : "htmlArea"
|
||||
};
|
||||
|
||||
CharacterMap.prototype.buttonPress = function(editor) {
|
||||
editor._popupDialog( "plugin://CharacterMap/select_character", function( entity )
|
||||
{
|
||||
if ( !entity )
|
||||
{
|
||||
//user must have pressed Cancel
|
||||
return false;
|
||||
}
|
||||
|
||||
editor.insertHTML( entity );
|
||||
|
||||
}, null);
|
||||
}
|
||||
|
||||
BIN
htmlarea/plugins/CharacterMap/img/ed_charmap.gif
Normal file
|
After Width: | Height: | Size: 143 B |
16
htmlarea/plugins/CharacterMap/lang/de.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "de", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Sponsored by http://www.systemconcept.de
|
||||
// Author: Holger Hees, <hhees@systemconcept.de>
|
||||
//
|
||||
// (c) systemconcept.de 2004
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
CharacterMap.I18N = {
|
||||
"CharacterMapTooltip" : "Sonderzeichen einf<6E>gen",
|
||||
"Insert special character" : "Sonderzeichen einf<6E>gen",
|
||||
"HTML value:" : "HTML Wert:",
|
||||
"Cancel" : "Abbrechen"
|
||||
};
|
||||
16
htmlarea/plugins/CharacterMap/lang/en.js
Normal file
@@ -0,0 +1,16 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Sponsored by http://www.systemconcept.de
|
||||
// Author: Holger Hees, <hhees@systemconcept.de>
|
||||
//
|
||||
// (c) systemconcept.de 2004
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
CharacterMap.I18N = {
|
||||
"CharacterMapTooltip" : "Insert special character",
|
||||
"Insert special character" : "Insert special character",
|
||||
"HTML value:" : "HTML value:",
|
||||
"Cancel" : "Cancel"
|
||||
};
|
||||
251
htmlarea/plugins/CharacterMap/popups/select_character.html
Normal file
@@ -0,0 +1,251 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>Insert special character</title>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
@import url(../../../htmlarea.css);
|
||||
|
||||
td.character {
|
||||
|
||||
font-family: Verdana,Arial,Helvetica,sans-serif;
|
||||
|
||||
font-size: 14px;
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
text-align: center;
|
||||
|
||||
background: #FFF;
|
||||
|
||||
padding: 4px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
td.character-hilite {
|
||||
|
||||
background: Highlight;
|
||||
|
||||
color: HighlightText;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
html, body {
|
||||
|
||||
background: ButtonFace;
|
||||
|
||||
color: ButtonText;
|
||||
|
||||
font: 11px Tahoma,Verdana,sans-serif;
|
||||
|
||||
margin: 0px;
|
||||
|
||||
padding: 0px;
|
||||
|
||||
}
|
||||
|
||||
body { padding: 5px; }
|
||||
|
||||
table {
|
||||
|
||||
font: 11px Tahoma,Verdana,sans-serif;
|
||||
|
||||
}
|
||||
|
||||
select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
|
||||
|
||||
button { width: 70px; }
|
||||
|
||||
table .label { text-align: right; width: 8em; }
|
||||
|
||||
|
||||
|
||||
.title { background: none; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
|
||||
|
||||
border-bottom: 1px solid black; letter-spacing: 2px;
|
||||
|
||||
}
|
||||
|
||||
#buttons {
|
||||
|
||||
margin-top: 1em; border-top: 1px solid #999;
|
||||
|
||||
padding: 2px; text-align: right;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="../../../popups/popup.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// HTMLSource based on HTMLArea XTD 1.5 (http://mosforge.net/projects/htmlarea3xtd/) modified by Holger Hees
|
||||
|
||||
// Original Author - Bernhard Pfeifer novocaine@gmx.net
|
||||
|
||||
|
||||
|
||||
CharacterMap = window.opener.CharacterMap; // load the CharacterMap plugin and lang file ;-)
|
||||
|
||||
window.resizeTo(480, 300);
|
||||
|
||||
// center on parent
|
||||
|
||||
var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2;
|
||||
|
||||
var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2;
|
||||
|
||||
window.moveTo(x, y);
|
||||
|
||||
|
||||
|
||||
function _CloseOnEsc()
|
||||
|
||||
{
|
||||
|
||||
if ( event.keyCode == 27 )
|
||||
|
||||
{
|
||||
|
||||
window.close();
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Init() // run on page load
|
||||
|
||||
{
|
||||
|
||||
__dlg_translate(CharacterMap.I18N);
|
||||
|
||||
__dlg_init();
|
||||
|
||||
document.body.onkeypress = _CloseOnEsc;
|
||||
|
||||
|
||||
|
||||
var character = ''; // set default input to empty
|
||||
|
||||
View( null, character );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var oldView = null;
|
||||
|
||||
function View( td, character ) // preview character
|
||||
|
||||
{
|
||||
|
||||
if (oldView)
|
||||
|
||||
oldView.className = oldView.className.replace(/\s+character-hilite/, '');
|
||||
|
||||
document.getElementById( 'characterPreview' ).value = character;
|
||||
|
||||
document.getElementById( 'showCharacter' ).value = character;
|
||||
|
||||
if (td)
|
||||
|
||||
(oldView = td).className += " character-hilite";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Set( string ) // return character
|
||||
|
||||
{
|
||||
|
||||
var character = string;
|
||||
|
||||
|
||||
|
||||
__dlg_close( character );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onCancel() // cancel selection
|
||||
|
||||
{
|
||||
|
||||
__dlg_close( null );
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body style="background: Buttonface; margin: 0px; padding: 0px" onload="Init();self.focus();">
|
||||
|
||||
<form method="get" style="margin:2px; padding:2px" onSubmit="Set(document.getElementById('showCharacter').value); return false;">
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="4" width="100%">
|
||||
|
||||
<tr>
|
||||
|
||||
<td style="background: Buttonface" valign="center"><div style="padding: 1px; white-space: nowrap; font-family: tahoma,arial,sans-serif; font-size: 11px; font-weight: normal;">HTML value:<div id="characterPreview"></div></div></td>
|
||||
|
||||
<td style="background: Buttonface" valign="center"><input type="text" name="showcharacter" id="showCharacter" value="" size="15" style="background: #fff; font-size: 11px;" /></td>
|
||||
|
||||
<td style="background: Buttonface" width="100%"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="0" width="100%" style="cursor: pointer; background: #ADAD9C; border: 1px inset;">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&Yuml;')" onClick="Set('Ÿ')">Ÿ</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&scaron;')" onClick="Set('š')">š</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&#064;')" onClick="Set('@')">@</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&quot;')" onClick="Set('"')">"</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&iexcl;')" onClick="Set('¡')">¡</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&cent;')" onClick="Set('¢')">¢</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&pound;')" onClick="Set('£')">£</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&curren;')" onClick="Set('¤')">¤</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&yen;')" onClick="Set('¥')">¥</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&brvbar;')" onClick="Set('¦')">¦</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&sect;')" onClick="Set('§')">§</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&uml;')" onClick="Set('¨')">¨</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&copy;')" onClick="Set('©')">©</td>
|
||||
|
||||
<td class="character" onMouseOver="View(this,'&ordf;')" onClick="Set('ª')">ª</td>
|
||||
451
htmlarea/plugins/ContextMenu/context-menu.js
Normal file
@@ -0,0 +1,451 @@
|
||||
// Context Menu Plugin for HTMLArea-3.0
|
||||
// Sponsored by www.americanbible.org
|
||||
// Implementation by Mihai Bazon, http://dynarch.com/mishoo/
|
||||
//
|
||||
// (c) dynarch.com 2003-2005.
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
//
|
||||
// $Id$
|
||||
|
||||
HTMLArea.loadStyle("menu.css", "ContextMenu");
|
||||
|
||||
function ContextMenu(editor) {
|
||||
this.editor = editor;
|
||||
};
|
||||
|
||||
ContextMenu._pluginInfo = {
|
||||
name : "ContextMenu",
|
||||
version : "1.0",
|
||||
developer : "Mihai Bazon",
|
||||
developer_url : "http://dynarch.com/mishoo/",
|
||||
c_owner : "dynarch.com",
|
||||
sponsor : "American Bible Society",
|
||||
sponsor_url : "http://www.americanbible.org",
|
||||
license : "htmlArea"
|
||||
};
|
||||
|
||||
ContextMenu.prototype.onGenerate = function() {
|
||||
var self = this;
|
||||
var doc = this.editordoc = this.editor._iframe.contentWindow.document;
|
||||
HTMLArea._addEvents(doc, ["contextmenu"],
|
||||
function (event) {
|
||||
return self.popupMenu(HTMLArea.is_ie ? self.editor._iframe.contentWindow.event : event);
|
||||
});
|
||||
this.currentMenu = null;
|
||||
};
|
||||
|
||||
ContextMenu.prototype.getContextMenu = function(target) {
|
||||
var self = this;
|
||||
var editor = this.editor;
|
||||
var config = editor.config;
|
||||
var menu = [];
|
||||
var tbo = this.editor.plugins.TableOperations;
|
||||
if (tbo) tbo = tbo.instance;
|
||||
var i18n = ContextMenu.I18N;
|
||||
|
||||
var selection = editor.hasSelectedText();
|
||||
if (selection)
|
||||
menu.push([ i18n["Cut"], function() { editor.execCommand("cut"); }, null, config.btnList["cut"][1] ],
|
||||
[ i18n["Copy"], function() { editor.execCommand("copy"); }, null, config.btnList["copy"][1] ]);
|
||||
menu.push([ i18n["Paste"], function() { editor.execCommand("paste"); }, null, config.btnList["paste"][1] ]);
|
||||
|
||||
var currentTarget = target;
|
||||
var elmenus = [];
|
||||
var tmp;
|
||||
|
||||
var link = null;
|
||||
var table = null;
|
||||
var tr = null;
|
||||
var td = null;
|
||||
var img = null;
|
||||
|
||||
function tableOperation(opcode) {
|
||||
tbo.buttonPress(editor, opcode);
|
||||
};
|
||||
|
||||
function insertPara(currentTarget, after) {
|
||||
var el = currentTarget;
|
||||
var par = el.parentNode;
|
||||
var p = editor._doc.createElement("p");
|
||||
p.appendChild(editor._doc.createElement("br"));
|
||||
par.insertBefore(p, after ? el.nextSibling : el);
|
||||
var sel = editor._getSelection();
|
||||
var range = editor._createRange(sel);
|
||||
if (!HTMLArea.is_ie) {
|
||||
sel.removeAllRanges();
|
||||
range.selectNodeContents(p);
|
||||
range.collapse(true);
|
||||
sel.addRange(range);
|
||||
} else {
|
||||
range.moveToElementText(p);
|
||||
range.collapse(true);
|
||||
range.select();
|
||||
}
|
||||
};
|
||||
|
||||
for (; target; target = target.parentNode) {
|
||||
var tag = target.tagName;
|
||||
if (!tag)
|
||||
continue;
|
||||
tag = tag.toLowerCase();
|
||||
switch (tag) {
|
||||
case "img":
|
||||
img = target;
|
||||
elmenus.push(null,
|
||||
[ i18n["Image Properties"],
|
||||
function() {
|
||||
editor._insertImage(img);
|
||||
},
|
||||
i18n["Show the image properties dialog"],
|
||||
config.btnList["insertimage"][1] ]
|
||||
);
|
||||
break;
|
||||
case "a":
|
||||
link = target;
|
||||
elmenus.push(null,
|
||||
[ i18n["Modify Link"],
|
||||
function() { editor.execCommand("createlink", true); },
|
||||
i18n["Current URL is"] + ': ' + link.href,
|
||||
config.btnList["createlink"][1] ],
|
||||
|
||||
[ i18n["Check Link"],
|
||||
function() { window.open(link.href); },
|
||||
i18n["Opens this link in a new window"] ],
|
||||
|
||||
[ i18n["Remove Link"],
|
||||
function() {
|
||||
if (confirm(i18n["Please confirm that you want to unlink this element."] + "\n" +
|
||||
i18n["Link points to:"] + " " + link.href)) {
|
||||
while (link.firstChild)
|
||||
link.parentNode.insertBefore(link.firstChild, link);
|
||||
link.parentNode.removeChild(link);
|
||||
}
|
||||
},
|
||||
i18n["Unlink the current element"] ]
|
||||
);
|
||||
break;
|
||||
case "td":
|
||||
td = target;
|
||||
if (!tbo) break;
|
||||
elmenus.push(null,
|
||||
[ i18n["Cell Properties"],
|
||||
function() { tableOperation("TO-cell-prop"); },
|
||||
i18n["Show the Table Cell Properties dialog"],
|
||||
config.btnList["TO-cell-prop"][1] ],
|
||||
[ i18n["Delete Cell"],
|
||||
function() { tableOperation("TO-cell-delete"); }, null,
|
||||
config.btnList["TO-cell-delete"][1] ]
|
||||
);
|
||||
break;
|
||||
case "tr":
|
||||
tr = target;
|
||||
if (!tbo) break;
|
||||
elmenus.push(null,
|
||||
[ i18n["Row Properties"],
|
||||
function() { tableOperation("TO-row-prop"); },
|
||||
i18n["Show the Table Row Properties dialog"],
|
||||
config.btnList["TO-row-prop"][1] ],
|
||||
|
||||
[ i18n["Insert Row Before"],
|
||||
function() { tableOperation("TO-row-insert-above"); },
|
||||
i18n["Insert a new row before the current one"],
|
||||
config.btnList["TO-row-insert-above"][1] ],
|
||||
|
||||
[ i18n["Insert Row After"],
|
||||
function() { tableOperation("TO-row-insert-under"); },
|
||||
i18n["Insert a new row after the current one"],
|
||||
config.btnList["TO-row-insert-under"][1] ],
|
||||
|
||||
[ i18n["Delete Row"],
|
||||
function() { tableOperation("TO-row-delete"); },
|
||||
i18n["Delete the current row"],
|
||||
config.btnList["TO-row-delete"][1] ]
|
||||
);
|
||||
break;
|
||||
case "table":
|
||||
table = target;
|
||||
if (!tbo) break;
|
||||
elmenus.push(null,
|
||||
[ i18n["Table Properties"],
|
||||
function() { tableOperation("TO-table-prop"); },
|
||||
i18n["Show the Table Properties dialog"],
|
||||
config.btnList["TO-table-prop"][1] ],
|
||||
|
||||
[ i18n["Insert Column Before"],
|
||||
function() { tableOperation("TO-col-insert-before"); },
|
||||
i18n["Insert a new column before the current one"],
|
||||
config.btnList["TO-col-insert-before"][1] ],
|
||||
|
||||
[ i18n["Insert Column After"],
|
||||
function() { tableOperation("TO-col-insert-after"); },
|
||||
i18n["Insert a new column after the current one"],
|
||||
config.btnList["TO-col-insert-after"][1] ],
|
||||
|
||||
[ i18n["Delete Column"],
|
||||
function() { tableOperation("TO-col-delete"); },
|
||||
i18n["Delete the current column"],
|
||||
config.btnList["TO-col-delete"][1] ]
|
||||
);
|
||||
break;
|
||||
case "body":
|
||||
elmenus.push(null,
|
||||
[ i18n["Justify Left"],
|
||||
function() { editor.execCommand("justifyleft"); }, null,
|
||||
config.btnList["justifyleft"][1] ],
|
||||
[ i18n["Justify Center"],
|
||||
function() { editor.execCommand("justifycenter"); }, null,
|
||||
config.btnList["justifycenter"][1] ],
|
||||
[ i18n["Justify Right"],
|
||||
function() { editor.execCommand("justifyright"); }, null,
|
||||
config.btnList["justifyright"][1] ],
|
||||
[ i18n["Justify Full"],
|
||||
function() { editor.execCommand("justifyfull"); }, null,
|
||||
config.btnList["justifyfull"][1] ]
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (selection && !link)
|
||||
menu.push(null, [ i18n["Make link"],
|
||||
function() { editor.execCommand("createlink", true); },
|
||||
i18n["Create a link"],
|
||||
config.btnList["createlink"][1] ]);
|
||||
|
||||
for (var i = 0; i < elmenus.length; ++i)
|
||||
menu.push(elmenus[i]);
|
||||
|
||||
if (!/html|body/i.test(currentTarget.tagName)) {
|
||||
table ? (tmp = table, table = null) : (tmp = currentTarget);
|
||||
menu.push(null,
|
||||
[ i18n["Remove the"] + " <" + tmp.tagName + "> " + i18n["Element"],
|
||||
function() {
|
||||
if (confirm(i18n["Please confirm that you want to remove this element:"] + " " +
|
||||
tmp.tagName)) {
|
||||
var el = tmp;
|
||||
var p = el.parentNode;
|
||||
p.removeChild(el);
|
||||
if (HTMLArea.is_gecko) {
|
||||
if (p.tagName.toLowerCase() == "td" && !p.hasChildNodes())
|
||||
p.appendChild(editor._doc.createElement("br"));
|
||||
editor.forceRedraw();
|
||||
editor.focusEditor();
|
||||
editor.updateToolbar();
|
||||
if (table) {
|
||||
var save_collapse = table.style.borderCollapse;
|
||||
table.style.borderCollapse = "collapse";
|
||||
table.style.borderCollapse = "separate";
|
||||
table.style.borderCollapse = save_collapse;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
i18n["Remove this node from the document"] ],
|
||||
[ i18n["Insert paragraph before"],
|
||||
function() { insertPara(tmp, false); },
|
||||
i18n["Insert a paragraph before the current node"] ],
|
||||
[ i18n["Insert paragraph after"],
|
||||
function() { insertPara(tmp, true); },
|
||||
i18n["Insert a paragraph after the current node"] ]
|
||||
);
|
||||
}
|
||||
return menu;
|
||||
};
|
||||
|
||||
ContextMenu.prototype.popupMenu = function(ev) {
|
||||
var self = this;
|
||||
var i18n = ContextMenu.I18N;
|
||||
if (this.currentMenu)
|
||||
this.currentMenu.parentNode.removeChild(this.currentMenu);
|
||||
function getPos(el) {
|
||||
var r = { x: el.offsetLeft, y: el.offsetTop };
|
||||
if (el.offsetParent) {
|
||||
var tmp = getPos(el.offsetParent);
|
||||
r.x += tmp.x;
|
||||
r.y += tmp.y;
|
||||
}
|
||||
return r;
|
||||
};
|
||||
function documentClick(ev) {
|
||||
ev || (ev = window.event);
|
||||
if (!self.currentMenu) {
|
||||
alert(i18n["How did you get here? (Please report!)"]);
|
||||
return false;
|
||||
}
|
||||
var el = HTMLArea.is_ie ? ev.srcElement : ev.target;
|
||||
for (; el != null && el != self.currentMenu; el = el.parentNode);
|
||||
if (el == null)
|
||||
self.closeMenu();
|
||||
//HTMLArea._stopEvent(ev);
|
||||
//return false;
|
||||
};
|
||||
var keys = [];
|
||||
function keyPress(ev) {
|
||||
ev || (ev = window.event);
|
||||
HTMLArea._stopEvent(ev);
|
||||
if (ev.keyCode == 27) {
|
||||
self.closeMenu();
|
||||
return false;
|
||||
}
|
||||
var key = String.fromCharCode(HTMLArea.is_ie ? ev.keyCode : ev.charCode).toLowerCase();
|
||||
for (var i = keys.length; --i >= 0;) {
|
||||
var k = keys[i];
|
||||
if (k[0].toLowerCase() == key)
|
||||
k[1].__msh.activate();
|
||||
}
|
||||
};
|
||||
self.closeMenu = function() {
|
||||
self.currentMenu.parentNode.removeChild(self.currentMenu);
|
||||
self.currentMenu = null;
|
||||
HTMLArea._removeEvent(document, "mousedown", documentClick);
|
||||
HTMLArea._removeEvent(self.editordoc, "mousedown", documentClick);
|
||||
if (keys.length > 0)
|
||||
HTMLArea._removeEvent(self.editordoc, "keypress", keyPress);
|
||||
if (HTMLArea.is_ie)
|
||||
self.iePopup.hide();
|
||||
};
|
||||
var target = HTMLArea.is_ie ? ev.srcElement : ev.target;
|
||||
var ifpos = getPos(self.editor._iframe);
|
||||
var x = ev.clientX + ifpos.x;
|
||||
var y = ev.clientY + ifpos.y;
|
||||
|
||||
var div;
|
||||
var doc;
|
||||
if (!HTMLArea.is_ie) {
|
||||
doc = document;
|
||||
} else {
|
||||
// IE stinks
|
||||
var popup = this.iePopup = window.createPopup();
|
||||
doc = popup.document;
|
||||
doc.open();
|
||||
doc.write("<html><head><style type='text/css'>@import url(" + _editor_url + "plugins/ContextMenu/menu.css); html, body { padding: 0px; margin: 0px; overflow: hidden; border: 0px; }</style></head><body unselectable='yes'></body></html>");
|
||||
doc.close();
|
||||
}
|
||||
div = doc.createElement("div");
|
||||
if (HTMLArea.is_ie)
|
||||
div.unselectable = "on";
|
||||
div.oncontextmenu = function() { return false; };
|
||||
div.className = "htmlarea-context-menu";
|
||||
if (!HTMLArea.is_ie)
|
||||
div.style.left = div.style.top = "0px";
|
||||
doc.body.appendChild(div);
|
||||
|
||||
var table = doc.createElement("table");
|
||||
div.appendChild(table);
|
||||
table.cellSpacing = 0;
|
||||
table.cellPadding = 0;
|
||||
var parent = doc.createElement("tbody");
|
||||
table.appendChild(parent);
|
||||
|
||||
var options = this.getContextMenu(target);
|
||||
for (var i = 0; i < options.length; ++i) {
|
||||
var option = options[i];
|
||||
var item = doc.createElement("tr");
|
||||
parent.appendChild(item);
|
||||
if (HTMLArea.is_ie)
|
||||
item.unselectable = "on";
|
||||
else item.onmousedown = function(ev) {
|
||||
HTMLArea._stopEvent(ev);
|
||||
return false;
|
||||
};
|
||||
if (!option) {
|
||||
item.className = "separator";
|
||||
var td = doc.createElement("td");
|
||||
td.className = "icon";
|
||||
var IE_IS_A_FUCKING_SHIT = '>';
|
||||
if (HTMLArea.is_ie) {
|
||||
td.unselectable = "on";
|
||||
IE_IS_A_FUCKING_SHIT = " unselectable='on' style='height=1px'> ";
|
||||
}
|
||||
td.innerHTML = "<div" + IE_IS_A_FUCKING_SHIT + "</div>";
|
||||
var td1 = td.cloneNode(true);
|
||||
td1.className = "label";
|
||||
item.appendChild(td);
|
||||
item.appendChild(td1);
|
||||
} else {
|
||||
var label = option[0];
|
||||
item.className = "item";
|
||||
item.__msh = {
|
||||
item: item,
|
||||
label: label,
|
||||
action: option[1],
|
||||
tooltip: option[2] || null,
|
||||
icon: option[3] || null,
|
||||
activate: function() {
|
||||
self.closeMenu();
|
||||
self.editor.focusEditor();
|
||||
this.action();
|
||||
}
|
||||
};
|
||||
label = label.replace(/_([a-zA-Z0-9])/, "<u>$1</u>");
|
||||
if (label != option[0])
|
||||
keys.push([ RegExp.$1, item ]);
|
||||
label = label.replace(/__/, "_");
|
||||
var td1 = doc.createElement("td");
|
||||
if (HTMLArea.is_ie)
|
||||
td1.unselectable = "on";
|
||||
item.appendChild(td1);
|
||||
td1.className = "icon";
|
||||
if (item.__msh.icon)
|
||||
td1.innerHTML = "<img align='middle' src='" + item.__msh.icon + "' />";
|
||||
var td2 = doc.createElement("td");
|
||||
if (HTMLArea.is_ie)
|
||||
td2.unselectable = "on";
|
||||
item.appendChild(td2);
|
||||
td2.className = "label";
|
||||
td2.innerHTML = label;
|
||||
item.onmouseover = function() {
|
||||
this.className += " hover";
|
||||
self.editor._statusBarTree.innerHTML = this.__msh.tooltip || ' ';
|
||||
};
|
||||
item.onmouseout = function() { this.className = "item"; };
|
||||
item.oncontextmenu = function(ev) {
|
||||
this.__msh.activate();
|
||||
if (!HTMLArea.is_ie)
|
||||
HTMLArea._stopEvent(ev);
|
||||
return false;
|
||||
};
|
||||
item.onmouseup = function(ev) {
|
||||
var timeStamp = (new Date()).getTime();
|
||||
if (timeStamp - self.timeStamp > 500)
|
||||
this.__msh.activate();
|
||||
if (!HTMLArea.is_ie)
|
||||
HTMLArea._stopEvent(ev);
|
||||
return false;
|
||||
};
|
||||
//if (typeof option[2] == "string")
|
||||
//item.title = option[2];
|
||||
}
|
||||
}
|
||||
|
||||
if (!HTMLArea.is_ie) {
|
||||
var dx = x + div.offsetWidth - window.innerWidth + 4;
|
||||
var dy = y + div.offsetHeight - window.innerHeight + 4;
|
||||
if (dx > 0) x -= dx;
|
||||
if (dy > 0) y -= dy;
|
||||
div.style.left = x + "px";
|
||||
div.style.top = y + "px";
|
||||
} else {
|
||||
// determine the size (did I mention that IE stinks?)
|
||||
var foobar = document.createElement("div");
|
||||
foobar.className = "htmlarea-context-menu";
|
||||
foobar.innerHTML = div.innerHTML;
|
||||
document.body.appendChild(foobar);
|
||||
var w = foobar.offsetWidth;
|
||||
var h = foobar.offsetHeight;
|
||||
document.body.removeChild(foobar);
|
||||
this.iePopup.show(ev.screenX, ev.screenY, w, h);
|
||||
}
|
||||
|
||||
this.currentMenu = div;
|
||||
this.timeStamp = (new Date()).getTime();
|
||||
|
||||
HTMLArea._addEvent(document, "mousedown", documentClick);
|
||||
HTMLArea._addEvent(this.editordoc, "mousedown", documentClick);
|
||||
if (keys.length > 0)
|
||||
HTMLArea._addEvent(this.editordoc, "keypress", keyPress);
|
||||
|
||||
HTMLArea._stopEvent(ev);
|
||||
return false;
|
||||
};
|
||||
59
htmlarea/plugins/ContextMenu/lang/de.js
Normal file
@@ -0,0 +1,59 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "de", ENCODING: UTF-8 | ISO-8859-1
|
||||
|
||||
// translated: <]{MJ}[> i@student.ethz.ch
|
||||
|
||||
|
||||
ContextMenu.I18N = {
|
||||
// Items that appear in menu. Please note that an underscore (_)
|
||||
// character in the translation (right column) will cause the following
|
||||
// letter to become underlined and be shortcut for that menu option.
|
||||
|
||||
"Cut" : "Ausschneiden",
|
||||
"Copy" : "Kopieren",
|
||||
"Paste" : "Einfügen",
|
||||
"Image Properties" : "_Bild Einstellungen...",
|
||||
"Modify Link" : "_Link ändern...",
|
||||
"Check Link" : "Link testen...",
|
||||
"Remove Link" : "Link entfernen...",
|
||||
"Cell Properties" : "Z_ellen Einstellungen...",
|
||||
"Row Properties" : "Ze_ilen Einstellungen...",
|
||||
"Insert Row Before" : "Zeile einfügen v_or Position",
|
||||
"Insert Row After" : "Zeile einfügen n_ach Position",
|
||||
"Delete Row" : "Zeile löschen",
|
||||
"Table Properties" : "_Tabellen Einstellungen...",
|
||||
"Insert Column Before" : "Spalte einfügen vo_r Position",
|
||||
"Insert Column After" : "Spalte einfügen na_ch Position",
|
||||
"Delete Column" : "Spalte löschen",
|
||||
"Justify Left" : "Links ausrichten",
|
||||
"Justify Center" : "Zentriert",
|
||||
"Justify Right" : "Rechts ausrichten",
|
||||
"Justify Full" : "Blocksatz",
|
||||
"Make link" : "Lin_k erstellen...",
|
||||
"Remove the" : "",
|
||||
"Element" : "Element entfernen...",
|
||||
|
||||
// Other labels (tooltips and alert/confirm box messages)
|
||||
|
||||
"Please confirm that you want to remove this element:" : "Wollen sie dieses Element wirklich entfernen ?",
|
||||
"Remove this node from the document" : "Dieses Element aus dem Dokument entfernen",
|
||||
"How did you get here? (Please report!)" : "How did you get here? (Please report!)",
|
||||
"Show the image properties dialog" : "Fenster für die Bild-Einstellungen anzeigen",
|
||||
"Modify URL" : "URL ändern",
|
||||
"Current URL is" : "Aktuelle URL ist",
|
||||
"Opens this link in a new window" : "Diesen Link in neuem Fenster öffnen",
|
||||
"Please confirm that you want to unlink this element." : "Wollen sie diesen Link wirklich entfernen ?",
|
||||
"Link points to:" : "Link zeigt auf:",
|
||||
"Unlink the current element" : "Link auf Element entfernen",
|
||||
"Show the Table Cell Properties dialog" : "Zellen-Einstellungen anzeigen",
|
||||
"Show the Table Row Properties dialog" : "Zeilen-Einstellungen anzeigen",
|
||||
"Insert a new row before the current one" : "Zeile einfügen vor der aktuellen Position",
|
||||
"Insert a new row after the current one" : "Zeile einfügen nach der aktuellen Position",
|
||||
"Delete the current row" : "Zeile löschen",
|
||||
"Show the Table Properties dialog" : "Show the Table Properties dialog",
|
||||
"Insert a new column before the current one" : "Spalte einfügen vor der aktuellen Position",
|
||||
"Insert a new column after the current one" : "Spalte einfügen nach der aktuellen Position",
|
||||
"Delete the current column" : "Spalte löschen",
|
||||
"Create a link" : "Link erstellen"
|
||||
};
|
||||
57
htmlarea/plugins/ContextMenu/lang/el.js
Normal file
@@ -0,0 +1,57 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "el", ENCODING: UTF-8 | ISO-8859-7
|
||||
// Author: Dimitris Glezos, dimitris@glezos.com
|
||||
|
||||
ContextMenu.I18N = {
|
||||
// Items that appear in menu. Please note that an underscore (_)
|
||||
// character in the translation (right column) will cause the following
|
||||
// letter to become underlined and be shortcut for that menu option.
|
||||
|
||||
"Cut" : "Αποκοπή",
|
||||
"Copy" : "Αντιγραφή",
|
||||
"Paste" : "Επικόλληση",
|
||||
"Image Properties" : "Ιδιότητες Εικόνας...",
|
||||
"Modify Link" : "Τροποποίηση συνδέσμου...",
|
||||
"Check Link" : "Έλεγχος συνδέσμων...",
|
||||
"Remove Link" : "Διαγραφή συνδέσμου...",
|
||||
"Cell Properties" : "Ιδιότητες κελιού...",
|
||||
"Row Properties" : "Ιδιότητες γραμμής...",
|
||||
"Insert Row Before" : "Εισαγωγή γραμμής πριν",
|
||||
"Insert Row After" : "Εισαγωγή γραμμής μετά",
|
||||
"Delete Row" : "Διαγραφή γραμμής",
|
||||
"Table Properties" : "Ιδιότητες πίνακα...",
|
||||
"Insert Column Before" : "Εισαγωγή στήλης πριν",
|
||||
"Insert Column After" : "Εισαγωγή στήλης μετά",
|
||||
"Delete Column" : "Διαγραφή στήλης",
|
||||
"Justify Left" : "Στοίχηση Αριστερά",
|
||||
"Justify Center" : "Στοίχηση Κέντρο",
|
||||
"Justify Right" : "Στοίχηση Δεξιά",
|
||||
"Justify Full" : "Πλήρης Στοίχηση",
|
||||
"Make link" : "Δημιουργία συνδέσμου...",
|
||||
"Remove the" : "Αφαίρεση",
|
||||
"Element" : "στοιχείου...",
|
||||
|
||||
// Other labels (tooltips and alert/confirm box messages)
|
||||
|
||||
"Please confirm that you want to remove this element:" : "Είστε βέβαιος πως θέλετε να αφαιρέσετε το στοιχείο ",
|
||||
"Remove this node from the document" : "Αφαίρεση αυτού του κόμβου από το έγγραφο",
|
||||
"How did you get here? (Please report!)" : "Πώς ήρθατε μέχρι εδώ; (Παρακαλούμε αναφέρετε το!)",
|
||||
"Show the image properties dialog" : "Εμφάνιση διαλόγου με τις Ιδιότητες εικόνας",
|
||||
"Modify URL" : "Τροποποίηση URL",
|
||||
"Current URL is" : "Το τρέχων URL είναι",
|
||||
"Opens this link in a new window" : "Ανοίγει αυτό τον σύνδεσμο σε ένα νέο παράθυρο",
|
||||
"Please confirm that you want to unlink this element." : "Είστε βέβαιος πως θέλετε να αφαιρέσετε τον σύνδεσμο από αυτό το στοιχείο:",
|
||||
"Link points to:" : "Ο σύνδεμος οδηγεί εδώ:",
|
||||
"Unlink the current element" : "Αφαίρεση συνδέσμου από το παρών στοιχείο",
|
||||
"Show the Table Cell Properties dialog" : "Εμφάνιση διαλόγου με τις Ιδιότητες κελιού Πίνακα",
|
||||
"Show the Table Row Properties dialog" : "Εμφάνιση διαλόγου με τις Ιδιότητες γραμμής Πίνακα",
|
||||
"Insert a new row before the current one" : "Εισαγωγή μιας νέας γραμμής πριν την επιλεγμένη",
|
||||
"Insert a new row after the current one" : "Εισαγωγή μιας νέας γραμμής μετά την επιλεγμένη",
|
||||
"Delete the current row" : "Διαγραφή επιλεγμένης γραμμής",
|
||||
"Show the Table Properties dialog" : "Εμφάνιση διαλόγου με τις Ιδιότητες Πίνακα",
|
||||
"Insert a new column before the current one" : "Εισαγωγή νέας στήλης πριν την επιλεγμένη",
|
||||
"Insert a new column after the current one" : "Εισαγωγή νέας στήλης μετά την επιλεγμένη",
|
||||
"Delete the current column" : "Διαγραφή επιλεγμένης στήλης",
|
||||
"Create a link" : "Δημιουργία συνδέσμου"
|
||||
};
|
||||
71
htmlarea/plugins/ContextMenu/lang/en.js
Normal file
@@ -0,0 +1,71 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
ContextMenu.I18N = {
|
||||
// Items that appear in menu. Please note that an underscore (_)
|
||||
// character in the translation (right column) will cause the following
|
||||
// letter to become underlined and be shortcut for that menu option.
|
||||
|
||||
"Cut" : "Cut",
|
||||
"Copy" : "Copy",
|
||||
"Paste" : "Paste",
|
||||
"Image Properties" : "_Image Properties...",
|
||||
"Modify Link" : "_Modify Link...",
|
||||
"Check Link" : "Chec_k Link...",
|
||||
"Remove Link" : "_Remove Link...",
|
||||
"Cell Properties" : "C_ell Properties...",
|
||||
"Row Properties" : "Ro_w Properties...",
|
||||
"Insert Row Before" : "I_nsert Row Before",
|
||||
"Insert Row After" : "In_sert Row After",
|
||||
"Delete Row" : "_Delete Row",
|
||||
"Delete Cell" : "Delete Cell",
|
||||
"Table Properties" : "_Table Properties...",
|
||||
"Insert Column Before" : "Insert _Column Before",
|
||||
"Insert Column After" : "Insert C_olumn After",
|
||||
"Delete Column" : "De_lete Column",
|
||||
"Justify Left" : "Justify Left",
|
||||
"Justify Center" : "Justify Center",
|
||||
"Justify Right" : "Justify Right",
|
||||
"Justify Full" : "Justify Full",
|
||||
"Make link" : "Make lin_k...",
|
||||
"Remove the" : "Remove the",
|
||||
"Element" : "Element...",
|
||||
"Insert paragraph before" : "Insert paragraph before",
|
||||
"Insert paragraph after" : "Insert paragraph after",
|
||||
|
||||
// Other labels (tooltips and alert/confirm box messages)
|
||||
|
||||
"Please confirm that you want to remove this element:" : "Please confirm that you want to remove this element:",
|
||||
"Remove this node from the document" : "Remove this node from the document",
|
||||
"How did you get here? (Please report!)" : "How did you get here? (Please report!)",
|
||||
"Show the image properties dialog" : "Show the image properties dialog",
|
||||
"Modify URL" : "Modify URL",
|
||||
"Current URL is" : "Current URL is",
|
||||
"Opens this link in a new window" : "Opens this link in a new window",
|
||||
"Please confirm that you want to unlink this element." : "Please confirm that you want to unlink this element.",
|
||||
"Link points to:" : "Link points to:",
|
||||
"Unlink the current element" : "Unlink the current element",
|
||||
"Show the Table Cell Properties dialog" : "Show the Table Cell Properties dialog",
|
||||
"Show the Table Row Properties dialog" : "Show the Table Row Properties dialog",
|
||||
"Insert a new row before the current one" : "Insert a new row before the current one",
|
||||
"Insert a new row after the current one" : "Insert a new row after the current one",
|
||||
"Delete the current row" : "Delete the current row",
|
||||
"Show the Table Properties dialog" : "Show the Table Properties dialog",
|
||||
"Insert a new column before the current one" : "Insert a new column before the current one",
|
||||
"Insert a new column after the current one" : "Insert a new column after the current one",
|
||||
"Delete the current column" : "Delete the current column",
|
||||
"Create a link" : "Create a link",
|
||||
"Insert a paragraph before the current node" : "Insert a paragraph before the current node",
|
||||
"Insert a paragraph after the current node" : "Insert a paragraph after the current node"
|
||||
};
|
||||
66
htmlarea/plugins/ContextMenu/lang/fr.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "fr", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Cédric Guillemette, http://www.ebdata.com
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
ContextMenu.I18N = {
|
||||
// Items that appear in menu. Please note that an underscore (_)
|
||||
// character in the translation (right column) will cause the following
|
||||
// letter to become underlined and be shortcut for that menu option.
|
||||
|
||||
"Cut" : "Couper",
|
||||
"Copy" : "Copier",
|
||||
"Paste" : "Coller",
|
||||
"Image Properties" : "_Propriétés de l'image...",
|
||||
"Modify Link" : "_Modifier le lien...",
|
||||
"Check Link" : "_Vérifier le lien...",
|
||||
"Remove Link" : "_Supprimer le lien...",
|
||||
"Cell Properties" : "P_ropriétés de la cellule...",
|
||||
"Row Properties" : "Pr_opriétés de la rangée...",
|
||||
"Insert Row Before" : "Insérer une rangée a_vant",
|
||||
"Insert Row After" : "Insér_er une rangée après",
|
||||
"Delete Row" : "Suppr_imer une rangée",
|
||||
"Table Properties" : "Proprié_tés de la table...",
|
||||
"Insert Column Before" : "I_nsérer une colonne avant",
|
||||
"Insert Column After" : "Insérer une colonne _après",
|
||||
"Delete Column" : "_Supprimer la colonne",
|
||||
"Justify Left" : "Justifier _gauche",
|
||||
"Justify Center" : "Justifier _centre",
|
||||
"Justify Right" : "Justifier _droit",
|
||||
"Justify Full" : "Justifier p_lein",
|
||||
"Make link" : "Convertir en lien...",
|
||||
"Remove the" : "Supprimer",
|
||||
"Element" : "Élément...",
|
||||
|
||||
// Other labels (tooltips and alert/confirm box messages)
|
||||
|
||||
"Please confirm that you want to remove this element:" : "Confirmer la suppression de cet élément:",
|
||||
"Remove this node from the document" : "Supprimer ce noeud du document",
|
||||
"How did you get here? (Please report!)" : "Comment êtes-vous arrivé ici? (Please report!)",
|
||||
"Show the image properties dialog" : "Afficher le dialogue des propriétés d'image",
|
||||
"Modify URL" : "Modifier le URL",
|
||||
"Current URL is" : "Le URL courant est",
|
||||
"Opens this link in a new window" : "Ouvrir ce lien dans une nouvelle fenêtre",
|
||||
"Please confirm that you want to unlink this element." : "Voulez-vous vraiment enlever le lien présent sur cet élément.",
|
||||
"Link points to:" : "Lier les points jusqu'à:",
|
||||
"Unlink the current element" : "Enlever le lien sur cet élément",
|
||||
"Show the Table Cell Properties dialog" : "Afficher le dialogue des propriétés des cellules",
|
||||
"Show the Table Row Properties dialog" : "Afficher le dialogue des propriétés des rangées",
|
||||
"Insert a new row before the current one" : "Insérer une nouvelle rangée avant celle-ci",
|
||||
"Insert a new row after the current one" : "Insérer une nouvelle rangée après celle-ci",
|
||||
"Delete the current row" : "Supprimer la rangée courante",
|
||||
"Show the Table Properties dialog" : "Afficher le dialogue des propriétés de table",
|
||||
"Insert a new column before the current one" : "Insérer une nouvelle rangée avant celle-ci",
|
||||
"Insert a new column after the current one" : "Insérer une nouvelle colonne après celle-ci",
|
||||
"Delete the current column" : "Supprimer cette colonne",
|
||||
"Create a link" : "Créer un lien"
|
||||
};
|
||||
66
htmlarea/plugins/ContextMenu/lang/he.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// I18N constants
|
||||
|
||||
|
||||
|
||||
// LANG: "he", ENCODING: UTF-8
|
||||
|
||||
// Author: Liron Newman, http://www.eesh.net, <plastish at ultinet dot org>
|
||||
|
||||
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
|
||||
//
|
||||
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
|
||||
// (at least a valid email address)
|
||||
|
||||
//
|
||||
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
|
||||
// (if this is not possible, please include a comment
|
||||
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
|
||||
|
||||
ContextMenu.I18N = {
|
||||
|
||||
// Items that appear in menu. Please note that an underscore (_)
|
||||
|
||||
// character in the translation (right column) will cause the following
|
||||
|
||||
// letter to become underlined and be shortcut for that menu option.
|
||||
|
||||
|
||||
|
||||
"Cut" : "גזור",
|
||||
|
||||
"Copy" : "העתק",
|
||||
|
||||
"Paste" : "הדבק",
|
||||
|
||||
"Image Properties" : "_מאפייני תמונה...",
|
||||
|
||||
"Modify Link" : "_שנה קישור...",
|
||||
|
||||
"Check Link" : "בדו_ק קישור...",
|
||||
|
||||
"Remove Link" : "_הסר קישור...",
|
||||
|
||||
"Cell Properties" : "מאפייני ת_א...",
|
||||
|
||||
"Row Properties" : "מאפייני _טור...",
|
||||
|
||||
"Insert Row Before" : "ה_כנס שורה לפני",
|
||||
|
||||
"Insert Row After" : "הכנ_ס שורה אחרי",
|
||||
|
||||
"Delete Row" : "_מחק שורה",
|
||||
|
||||
"Table Properties" : "מאפייני ט_בלה...",
|
||||
|
||||
"Insert Column Before" : "הכנס _טור לפני",
|
||||
|
||||
66
htmlarea/plugins/ContextMenu/lang/nl.js
Normal file
@@ -0,0 +1,66 @@
|
||||
// I18N constants
|
||||
|
||||
|
||||
|
||||
// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
|
||||
|
||||
// Author: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl
|
||||
|
||||
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
|
||||
//
|
||||
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
|
||||
// (at least a valid email address)
|
||||
|
||||
//
|
||||
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
|
||||
// (if this is not possible, please include a comment
|
||||
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
|
||||
|
||||
ContextMenu.I18N = {
|
||||
|
||||
// Items that appear in menu. Please note that an underscore (_)
|
||||
|
||||
// character in the translation (right column) will cause the following
|
||||
|
||||
// letter to become underlined and be shortcut for that menu option.
|
||||
|
||||
|
||||
|
||||
"Cut" : "Knippen",
|
||||
|
||||
"Copy" : "Kopi<70>ren",
|
||||
|
||||
"Paste" : "Plakken",
|
||||
|
||||
"Image Properties" : "Eigenschappen afbeelding...",
|
||||
|
||||
"Modify Link" : "Hyperlin_k aanpassen...",
|
||||
|
||||
"Check Link" : "Controleer hyperlin_k...",
|
||||
|
||||
"Remove Link" : "Ve_rwijder hyperlink...",
|
||||
|
||||
"Cell Properties" : "C_eleigenschappen...",
|
||||
|
||||
"Row Properties" : "Rijeigenscha_ppen...",
|
||||
|
||||
"Insert Row Before" : "Rij invoegen boven",
|
||||
|
||||
"Insert Row After" : "Rij invoegen onder",
|
||||
|
||||
"Delete Row" : "Rij _verwijderen",
|
||||
|
||||
"Table Properties" : "_Tabeleigenschappen...",
|
||||
|
||||
"Insert Column Before" : "Kolom invoegen voor",
|
||||
|
||||
65
htmlarea/plugins/ContextMenu/menu.css
Normal file
@@ -0,0 +1,65 @@
|
||||
/* styles for the ContextMenu /HTMLArea */
|
||||
/* The ContextMenu plugin is (c) dynarch.com 2003. */
|
||||
/* Distributed under the same terms as HTMLArea itself */
|
||||
|
||||
div.htmlarea-context-menu {
|
||||
position: absolute;
|
||||
border: 1px solid #aca899;
|
||||
padding: 2px;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
cursor: default;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu table {
|
||||
font: 11px tahoma,verdana,sans-serif;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.item td.icon img {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.item td.icon {
|
||||
padding: 0px 3px;
|
||||
height: 18px;
|
||||
background-color: #cdf;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.item td.label {
|
||||
padding: 1px 10px 1px 3px;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.separator td {
|
||||
padding: 2px 0px;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.separator td div {
|
||||
border-top: 1px solid #aca899;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.separator td.icon {
|
||||
background-color: #cdf;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.separator td.icon div {
|
||||
/* margin-left: 3px; */
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.separator td.label div {
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.item.hover {
|
||||
background-color: #316ac5;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
div.htmlarea-context-menu tr.item.hover td.icon {
|
||||
background-color: #619af5;
|
||||
}
|
||||
235
htmlarea/plugins/DynamicCSS/dynamiccss.js
Normal file
@@ -0,0 +1,235 @@
|
||||
// Dynamic CSS (className) plugin for HTMLArea
|
||||
// Sponsored by http://www.systemconcept.de
|
||||
// Implementation by Holger Hees
|
||||
//
|
||||
// (c) systemconcept.de 2004
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
function DynamicCSS(editor, args) {
|
||||
this.editor = editor;
|
||||
|
||||
var cfg = editor.config;
|
||||
var toolbar = cfg.toolbar;
|
||||
var self = this;
|
||||
var i18n = DynamicCSS.I18N;
|
||||
|
||||
/*var cssArray=null;
|
||||
var cssLength=0;
|
||||
var lastTag=null;
|
||||
var lastClass=null;*/
|
||||
|
||||
var css_class = {
|
||||
id : "DynamicCSS-class",
|
||||
tooltip : i18n["DynamicCSSStyleTooltip"],
|
||||
options : {"":""},
|
||||
action : function(editor) { self.onSelect(editor, this); },
|
||||
refresh : function(editor) { self.updateValue(editor, this); }
|
||||
};
|
||||
cfg.registerDropdown(css_class);
|
||||
|
||||
toolbar[0].splice(0, 0, "separator");
|
||||
toolbar[0].splice(0, 0, "DynamicCSS-class");
|
||||
toolbar[0].splice(0, 0, "T[Style]");
|
||||
};
|
||||
|
||||
DynamicCSS.parseStyleSheet=function(editor){
|
||||
var i18n = DynamicCSS.I18N;
|
||||
iframe = editor._iframe.contentWindow.document;
|
||||
|
||||
cssArray=DynamicCSS.cssArray;
|
||||
if(!cssArray) cssArray=new Array();
|
||||
|
||||
for(i=0;i<iframe.styleSheets.length;i++){
|
||||
// Mozilla
|
||||
if(HTMLArea.is_gecko){
|
||||
try{
|
||||
cssArray=DynamicCSS.applyCSSRule(i18n,iframe.styleSheets[i].cssRules,cssArray);
|
||||
}
|
||||
catch(e){
|
||||
//alert(e);
|
||||
}
|
||||
}
|
||||
// IE
|
||||
else {
|
||||
try{
|
||||
if(iframe.styleSheets[i].rules){
|
||||
cssArray=DynamicCSS.applyCSSRule(i18n,iframe.styleSheets[i].rules,cssArray);
|
||||
}
|
||||
// @import StyleSheets (IE)
|
||||
if(iframe.styleSheets[i].imports){
|
||||
for(j=0;j<iframe.styleSheets[i].imports.length;j++){
|
||||
cssArray=DynamicCSS.applyCSSRule(i18n,iframe.styleSheets[i].imports[j].rules,cssArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
//alert(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
DynamicCSS.cssArray=cssArray;
|
||||
}
|
||||
|
||||
DynamicCSS.applyCSSRule=function(i18n,cssRules,cssArray){
|
||||
for(rule in cssRules){
|
||||
// StyleRule
|
||||
if(cssRules[rule].selectorText){
|
||||
if(cssRules[rule].selectorText.search(/:+/)==-1){
|
||||
|
||||
// split equal Styles (Mozilla-specific) e.q. head, body {border:0px}
|
||||
// for ie not relevant. returns allways one element
|
||||
cssElements = cssRules[rule].selectorText.split(",");
|
||||
for(k=0;k<cssElements.length;k++){
|
||||
cssElement = cssElements[k].split(".");
|
||||
|
||||
tagName=cssElement[0].toLowerCase().trim();
|
||||
className=cssElement[1];
|
||||
|
||||
if(!tagName) tagName='all';
|
||||
if(!cssArray[tagName]) cssArray[tagName]=new Array();
|
||||
|
||||
if(className){
|
||||
if(tagName=='all') cssName=className;
|
||||
else cssName='<'+className+'>';
|
||||
}
|
||||
else{
|
||||
className='none';
|
||||
if(tagName=='all') cssName=i18n["Default"];
|
||||
else cssName='<'+i18n["Default"]+'>';
|
||||
}
|
||||
cssArray[tagName][className]=cssName;
|
||||
DynamicCSS.cssLength++;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ImportRule (Mozilla)
|
||||
else if(cssRules[rule].styleSheet){
|
||||
cssArray=DynamicCSS.applyCSSRule(i18n,cssRules[rule].styleSheet.cssRules,cssArray);
|
||||
}
|
||||
}
|
||||
return cssArray;
|
||||
}
|
||||
|
||||
DynamicCSS._pluginInfo = {
|
||||
name : "DynamicCSS",
|
||||
version : "1.5.2",
|
||||
developer : "Holger Hees",
|
||||
developer_url : "http://www.systemconcept.de/",
|
||||
c_owner : "Holger Hees",
|
||||
sponsor : "System Concept GmbH",
|
||||
sponsor_url : "http://www.systemconcept.de/",
|
||||
license : "htmlArea"
|
||||
};
|
||||
|
||||
DynamicCSS.prototype.onSelect = function(editor, obj) {
|
||||
var tbobj = editor._toolbarObjects[obj.id];
|
||||
var index = tbobj.element.selectedIndex;
|
||||
var className = tbobj.element.value;
|
||||
|
||||
var parent = editor.getParentElement();
|
||||
|
||||
if(className!='none'){
|
||||
parent.className=className;
|
||||
DynamicCSS.lastClass=className;
|
||||
}
|
||||
else{
|
||||
if(HTMLArea.is_gecko) parent.removeAttribute('class');
|
||||
else parent.removeAttribute('className');
|
||||
}
|
||||
editor.updateToolbar();
|
||||
};
|
||||
|
||||
/*DynamicCSS.prototype.onMode = function(mode) {
|
||||
if(mode=='wysiwyg'){
|
||||
// reparse possible changed css files
|
||||
DynamicCSS.cssArray=null;
|
||||
this.updateValue(this.editor,this.editor.config.customSelects["DynamicCSS-class"]);
|
||||
}
|
||||
}*/
|
||||
|
||||
DynamicCSS.prototype.reparseTimer = function(editor, obj, instance) {
|
||||
// new attempt of rescan stylesheets in 1,2,4 and 8 second (e.g. for external css-files with longer initialisation)
|
||||
if(DynamicCSS.parseCount<9){
|
||||
setTimeout(function () {
|
||||
DynamicCSS.cssLength=0;
|
||||
DynamicCSS.parseStyleSheet(editor);
|
||||
if(DynamicCSS.cssOldLength!=DynamicCSS.cssLength){
|
||||
DynamicCSS.cssOldLength=DynamicCSS.cssLength;
|
||||
DynamicCSS.lastClass=null;
|
||||
instance.updateValue(editor, obj);
|
||||
}
|
||||
instance.reparseTimer(editor, obj, instance);
|
||||
},DynamicCSS.parseCount*1000);
|
||||
DynamicCSS.parseCount=DynamicCSS.parseCount*2;
|
||||
}
|
||||
}
|
||||
|
||||
DynamicCSS.prototype.updateValue = function(editor, obj) {
|
||||
cssArray=DynamicCSS.cssArray;
|
||||
// initial style init
|
||||
if(!cssArray){
|
||||
DynamicCSS.cssLength=0;
|
||||
DynamicCSS.parseStyleSheet(editor);
|
||||
cssArray=DynamicCSS.cssArray;
|
||||
DynamicCSS.cssOldLength=DynamicCSS.cssLength;
|
||||
DynamicCSS.parseCount=1;
|
||||
this.reparseTimer(editor,obj,this);
|
||||
}
|
||||
|
||||
var parent = editor.getParentElement();
|
||||
var tagName = parent.tagName.toLowerCase();
|
||||
var className = parent.className;
|
||||
|
||||
if(DynamicCSS.lastTag!=tagName || DynamicCSS.lastClass!=className){
|
||||
DynamicCSS.lastTag=tagName;
|
||||
DynamicCSS.lastClass=className;
|
||||
|
||||
var i18n = DynamicCSS.I18N;
|
||||
var select = editor._toolbarObjects[obj.id].element;
|
||||
|
||||
while(select.length>0){
|
||||
select.options[select.length-1] = null;
|
||||
}
|
||||
|
||||
select.options[0]=new Option(i18n["Default"],'none');
|
||||
if(cssArray){
|
||||
// style class only allowed if parent tag is not body or editor is in fullpage mode
|
||||
if(tagName!='body' || editor.config.fullPage){
|
||||
if(cssArray[tagName]){
|
||||
for(cssClass in cssArray[tagName]){
|
||||
if(cssClass=='none') select.options[0]=new Option(cssArray[tagName][cssClass],cssClass);
|
||||
else select.options[select.length]=new Option(cssArray[tagName][cssClass],cssClass);
|
||||
}
|
||||
}
|
||||
|
||||
if(cssArray['all']){
|
||||
for(cssClass in cssArray['all']){
|
||||
select.options[select.length]=new Option(cssArray['all'][cssClass],cssClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(cssArray[tagName] && cssArray[tagName]['none']) select.options[0]=new Option(cssArray[tagName]['none'],'none');
|
||||
}
|
||||
|
||||
select.selectedIndex = 0;
|
||||
|
||||
if (typeof className != "undefined" && /\S/.test(className)) {
|
||||
var options = select.options;
|
||||
for (var i = options.length; --i >= 0;) {
|
||||
var option = options[i];
|
||||
if (className == option.value) {
|
||||
select.selectedIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(select.selectedIndex == 0){
|
||||
select.options[select.length]=new Option(i18n["Undefined"],className);
|
||||
select.selectedIndex=select.length-1;
|
||||
}
|
||||
}
|
||||
|
||||
if(select.length>1) select.disabled=false;
|
||||
else select.disabled=true;
|
||||
}
|
||||
};
|
||||
15
htmlarea/plugins/DynamicCSS/lang/de.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "de", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Sponsored by http://www.systemconcept.de
|
||||
// Author: Holger Hees, <hhees@systemconcept.de>
|
||||
//
|
||||
// (c) systemconcept.de 2004
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
DynamicCSS.I18N = {
|
||||
"Default" : "Standard",
|
||||
"Undefined" : "Nicht definiert",
|
||||
"DynamicCSSStyleTooltip" : "W<>hlen Sie einen StyleSheet aus"
|
||||
};
|
||||
15
htmlarea/plugins/DynamicCSS/lang/en.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "de", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Sponsored by http://www.systemconcept.de
|
||||
// Author: Holger Hees, <hhees@systemconcept.de>
|
||||
//
|
||||
// (c) systemconcept.de 2004
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
DynamicCSS.I18N = {
|
||||
"Default" : "Default",
|
||||
"Undefined" : "Undefined",
|
||||
"DynamicCSSStyleTooltip" : "Choose style"
|
||||
};
|
||||
15
htmlarea/plugins/DynamicCSS/lang/fr.js
Normal file
@@ -0,0 +1,15 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "fr", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Sponsored by http://www.ebdata.com
|
||||
// Author: Cédric Guillemette, <cguillemette@ebdata.com>
|
||||
//
|
||||
// (c) www.ebdata.com 2004
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
DynamicCSS.I18N = {
|
||||
"Default" : "Défaut",
|
||||
"Undefined" : "Non défini",
|
||||
"DynamicCSSStyleTooltip" : "Choisir feuille de style"
|
||||
};
|
||||
172
htmlarea/plugins/FullPage/full-page.js
Normal file
@@ -0,0 +1,172 @@
|
||||
// FullPage Plugin for HTMLArea-3.0
|
||||
// Implementation by Mihai Bazon. Sponsored by http://thycotic.com
|
||||
//
|
||||
// (c) dynarch.com 2003-2005.
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
//
|
||||
// $Id$
|
||||
|
||||
function FullPage(editor) {
|
||||
this.editor = editor;
|
||||
|
||||
var cfg = editor.config;
|
||||
cfg.fullPage = true;
|
||||
var tt = FullPage.I18N;
|
||||
var self = this;
|
||||
|
||||
cfg.registerButton("FP-docprop", tt["Document properties"], editor.imgURL("docprop.gif", "FullPage"), false,
|
||||
function(editor, id) {
|
||||
self.buttonPress(editor, id);
|
||||
});
|
||||
|
||||
// add a new line in the toolbar
|
||||
cfg.toolbar[0].splice(0, 0, "separator");
|
||||
cfg.toolbar[0].splice(0, 0, "FP-docprop");
|
||||
};
|
||||
|
||||
FullPage._pluginInfo = {
|
||||
name : "FullPage",
|
||||
version : "1.0",
|
||||
developer : "Mihai Bazon",
|
||||
developer_url : "http://dynarch.com/mishoo/",
|
||||
c_owner : "Mihai Bazon",
|
||||
sponsor : "Thycotic Software Ltd.",
|
||||
sponsor_url : "http://thycotic.com",
|
||||
license : "htmlArea"
|
||||
};
|
||||
|
||||
FullPage.prototype.buttonPress = function(editor, id) {
|
||||
var self = this;
|
||||
switch (id) {
|
||||
case "FP-docprop":
|
||||
var doc = editor._doc;
|
||||
var links = doc.getElementsByTagName("link");
|
||||
var style1 = '';
|
||||
var style2 = '';
|
||||
var charset = '';
|
||||
for (var i = links.length; --i >= 0;) {
|
||||
var link = links[i];
|
||||
if (/stylesheet/i.test(link.rel)) {
|
||||
if (/alternate/i.test(link.rel))
|
||||
style2 = link.href;
|
||||
else
|
||||
style1 = link.href;
|
||||
}
|
||||
}
|
||||
var metas = doc.getElementsByTagName("meta");
|
||||
for (var i = metas.length; --i >= 0;) {
|
||||
var meta = metas[i];
|
||||
if (/content-type/i.test(meta.httpEquiv)) {
|
||||
r = /^text\/html; *charset=(.*)$/i.exec(meta.content);
|
||||
charset = r[1];
|
||||
}
|
||||
}
|
||||
var title = doc.getElementsByTagName("title")[0];
|
||||
title = title ? title.innerHTML : '';
|
||||
var init = {
|
||||
f_doctype : editor.doctype,
|
||||
f_title : title,
|
||||
f_body_bgcolor : HTMLArea._colorToRgb(doc.body.style.backgroundColor),
|
||||
f_body_fgcolor : HTMLArea._colorToRgb(doc.body.style.color),
|
||||
f_base_style : style1,
|
||||
f_alt_style : style2,
|
||||
f_charset : charset,
|
||||
editor : editor
|
||||
};
|
||||
editor._popupDialog("plugin://FullPage/docprop", function(params) {
|
||||
self.setDocProp(params);
|
||||
}, init);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
FullPage.prototype.setDocProp = function(params) {
|
||||
var txt = "";
|
||||
var doc = this.editor._doc;
|
||||
var head = doc.getElementsByTagName("head")[0];
|
||||
var links = doc.getElementsByTagName("link");
|
||||
var metas = doc.getElementsByTagName("meta");
|
||||
var style1 = null;
|
||||
var style2 = null;
|
||||
var charset = null;
|
||||
var charset_meta = null;
|
||||
for (var i = links.length; --i >= 0;) {
|
||||
var link = links[i];
|
||||
if (/stylesheet/i.test(link.rel)) {
|
||||
if (/alternate/i.test(link.rel))
|
||||
style2 = link;
|
||||
else
|
||||
style1 = link;
|
||||
}
|
||||
}
|
||||
for (var i = metas.length; --i >= 0;) {
|
||||
var meta = metas[i];
|
||||
if (/content-type/i.test(meta.httpEquiv)) {
|
||||
r = /^text\/html; *charset=(.*)$/i.exec(meta.content);
|
||||
charset = r[1];
|
||||
charset_meta = meta;
|
||||
}
|
||||
}
|
||||
function createLink(alt) {
|
||||
var link = doc.createElement("link");
|
||||
link.rel = alt ? "alternate stylesheet" : "stylesheet";
|
||||
head.appendChild(link);
|
||||
return link;
|
||||
};
|
||||
function createMeta(name, content) {
|
||||
var meta = doc.createElement("meta");
|
||||
meta.httpEquiv = name;
|
||||
meta.content = content;
|
||||
head.appendChild(meta);
|
||||
return meta;
|
||||
};
|
||||
|
||||
if (!style1 && params.f_base_style)
|
||||
style1 = createLink(false);
|
||||
if (params.f_base_style)
|
||||
style1.href = params.f_base_style;
|
||||
else if (style1)
|
||||
head.removeChild(style1);
|
||||
|
||||
if (!style2 && params.f_alt_style)
|
||||
style2 = createLink(true);
|
||||
if (params.f_alt_style)
|
||||
style2.href = params.f_alt_style;
|
||||
else if (style2)
|
||||
head.removeChild(style2);
|
||||
|
||||
if (charset_meta) {
|
||||
head.removeChild(charset_meta);
|
||||
charset_meta = null;
|
||||
}
|
||||
if (!charset_meta && params.f_charset)
|
||||
charset_meta = createMeta("Content-Type", "text/html; charset="+params.f_charset);
|
||||
|
||||
for (var i in params) {
|
||||
var val = params[i];
|
||||
switch (i) {
|
||||
case "f_title":
|
||||
var title = doc.getElementsByTagName("title")[0];
|
||||
if (!title) {
|
||||
title = doc.createElement("title");
|
||||
head.appendChild(title);
|
||||
} else while (node = title.lastChild)
|
||||
title.removeChild(node);
|
||||
if (!HTMLArea.is_ie)
|
||||
title.appendChild(doc.createTextNode(val));
|
||||
else
|
||||
doc.title = val;
|
||||
break;
|
||||
case "f_doctype":
|
||||
this.editor.setDoctype(val);
|
||||
break;
|
||||
case "f_body_bgcolor":
|
||||
doc.body.style.backgroundColor = val;
|
||||
break;
|
||||
case "f_body_fgcolor":
|
||||
doc.body.style.color = val;
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
htmlarea/plugins/FullPage/img/docprop.gif
Normal file
|
After Width: | Height: | Size: 302 B |
25
htmlarea/plugins/FullPage/lang/de.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// I18N for the FullPage plugin
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Holger Hees, http://www.systemconcept.de
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
FullPage.I18N = {
|
||||
"Alternate style-sheet:": "Alternativer Stylesheet:",
|
||||
"Background color:": "Hintergrundfarbe:",
|
||||
"Cancel": "Abbrechen",
|
||||
"DOCTYPE:": "DOCTYPE:",
|
||||
"Document properties": "Dokumenteigenschaften",
|
||||
"Document title:": "Dokumenttitel:",
|
||||
"OK": "OK",
|
||||
"Primary style-sheet:": "Stylesheet:",
|
||||
"Text color:": "Textfarbe:"
|
||||
};
|
||||
25
htmlarea/plugins/FullPage/lang/en.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// I18N for the FullPage plugin
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
FullPage.I18N = {
|
||||
"Alternate style-sheet:": "Alternate style-sheet:",
|
||||
"Background color:": "Background color:",
|
||||
"Cancel": "Cancel",
|
||||
"DOCTYPE:": "DOCTYPE:",
|
||||
"Document properties": "Document properties",
|
||||
"Document title:": "Document title:",
|
||||
"OK": "OK",
|
||||
"Primary style-sheet:": "Primary style-sheet:",
|
||||
"Text color:": "Text color:"
|
||||
};
|
||||
25
htmlarea/plugins/FullPage/lang/fr.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// I18N for the FullPage plugin
|
||||
|
||||
// LANG: "fr", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Cédric Guillemette, http://www.ebdata.com
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
FullPage.I18N = {
|
||||
"Alternate style-sheet:": "Feuille de style alternative:",
|
||||
"Background color:": "Couleur d'arrière plan:",
|
||||
"Cancel": "Annuler",
|
||||
"DOCTYPE:": "DOCTYPE:",
|
||||
"Document properties": "Propriétés de document",
|
||||
"Document title:": "Titre du document:",
|
||||
"OK": "OK",
|
||||
"Primary style-sheet:": "Feuille de style primaire:",
|
||||
"Text color:": "Couleur de texte:"
|
||||
};
|
||||
25
htmlarea/plugins/FullPage/lang/he.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// I18N for the FullPage plugin
|
||||
|
||||
|
||||
|
||||
// LANG: "he", ENCODING: UTF-8
|
||||
|
||||
// Author: Liron Newman, http://www.eesh.net, <plastish at ultinet dot org>
|
||||
|
||||
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
|
||||
//
|
||||
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
|
||||
// (at least a valid email address)
|
||||
|
||||
//
|
||||
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
|
||||
// (if this is not possible, please include a comment
|
||||
|
||||
// that states what encoding is necessary.)
|
||||
25
htmlarea/plugins/FullPage/lang/ro.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// I18N for the FullPage plugin
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
FullPage.I18N = {
|
||||
"Alternate style-sheet:": "Template CSS alternativ:",
|
||||
"Background color:": "Culoare de fundal:",
|
||||
"Cancel": "Renunţă",
|
||||
"DOCTYPE:": "DOCTYPE:",
|
||||
"Document properties": "Proprietăţile documentului",
|
||||
"Document title:": "Titlul documentului:",
|
||||
"OK": "Acceptă",
|
||||
"Primary style-sheet:": "Template CSS principal:",
|
||||
"Text color:": "Culoare text:"
|
||||
};
|
||||
143
htmlarea/plugins/FullPage/popups/docprop.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Document properties</title>
|
||||
|
||||
<script type="text/javascript" src="../../../popups/popup.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
FullPage = window.opener.FullPage; // load the FullPage plugin and lang file ;-)
|
||||
window.resizeTo(400, 100);
|
||||
|
||||
var accepted = {
|
||||
f_doctype : true,
|
||||
f_title : true,
|
||||
f_body_bgcolor : true,
|
||||
f_body_fgcolor : true,
|
||||
f_base_style : true,
|
||||
f_alt_style : true,
|
||||
f_charset : true
|
||||
};
|
||||
|
||||
var editor = null;
|
||||
function Init() {
|
||||
__dlg_translate(FullPage.I18N);
|
||||
__dlg_init();
|
||||
var params = window.dialogArguments;
|
||||
for (var i in params) {
|
||||
if (i in accepted) {
|
||||
var el = document.getElementById(i);
|
||||
el.value = params[i];
|
||||
}
|
||||
}
|
||||
editor = params.editor;
|
||||
document.getElementById("f_title").focus();
|
||||
document.getElementById("f_title").select();
|
||||
};
|
||||
|
||||
function onOK() {
|
||||
var required = {
|
||||
};
|
||||
for (var i in required) {
|
||||
var el = document.getElementById(i);
|
||||
if (!el.value) {
|
||||
alert(required[i]);
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var param = {};
|
||||
for (var i in accepted) {
|
||||
var el = document.getElementById(i);
|
||||
param[i] = el.value;
|
||||
}
|
||||
__dlg_close(param);
|
||||
return false;
|
||||
};
|
||||
|
||||
function onCancel() {
|
||||
__dlg_close(null);
|
||||
return false;
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
html, body {
|
||||
background: ButtonFace;
|
||||
color: ButtonText;
|
||||
font: 11px Tahoma,Verdana,sans-serif;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
body { padding: 5px; }
|
||||
table {
|
||||
font: 11px Tahoma,Verdana,sans-serif;
|
||||
}
|
||||
select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
|
||||
button { width: 70px; }
|
||||
table .label { text-align: right; width: 12em; }
|
||||
|
||||
.title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
|
||||
border-bottom: 1px solid black; letter-spacing: 2px;
|
||||
}
|
||||
|
||||
#buttons {
|
||||
margin-top: 1em; border-top: 1px solid #999;
|
||||
padding: 2px; text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title"><span>Document properties</span></div>
|
||||
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td class="label"><span>Document title:</span></td>
|
||||
<td><input type="text" id="f_title" style="width: 100%" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><span>DOCTYPE:</span></td>
|
||||
<td><input type="text" id="f_doctype" style="width: 100%" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><span>Primary style-sheet:</span></td>
|
||||
<td><input type="text" id="f_base_style" style="width: 100%" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><span>Alternate style-sheet:</span></td>
|
||||
<td><input type="text" id="f_alt_style" style="width: 100%" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><span>Background color:</span></td>
|
||||
<td><input type="text" id="f_body_bgcolor" size="7" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><span>Text color:</span></td>
|
||||
<td><input type="text" id="f_body_fgcolor" size="7" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><span>Character set:</span></td>
|
||||
<td><select id="f_charset">
|
||||
<option value=""></option>
|
||||
<option value="utf-8">UTF-8 (recommended)</option>
|
||||
<option value="windows-1251">cyrillic (WINDOWS-1251)</option>
|
||||
<option value="koi8-r">cyrillic (KOI8-R)</option>
|
||||
<option value="iso-8859-5">cyrillic (ISO-8859-5)</option>
|
||||
<option value="iso-8859-1">western (ISO-8859-1)</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="buttons">
|
||||
<button type="button" name="ok" onclick="return onOK();"><span>OK</span></button>
|
||||
<button type="button" name="cancel" onclick="return onCancel();"><span>Cancel</span></button>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
89
htmlarea/plugins/FullPage/test.html
Normal file
@@ -0,0 +1,89 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Test of FullPage plugin</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript">
|
||||
_editor_url = "../../";
|
||||
</script>
|
||||
|
||||
<!-- load the main HTMLArea files -->
|
||||
<script type="text/javascript" src="../../htmlarea.js"></script>
|
||||
<script type="text/javascript" src="../../lang/en.js"></script>
|
||||
<script type="text/javascript" src="../../dialog.js"></script>
|
||||
|
||||
<!-- <script type="text/javascript" src="popupdiv.js"></script> -->
|
||||
<script type="text/javascript" src="../../popupwin.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
HTMLArea.loadPlugin("TableOperations");
|
||||
HTMLArea.loadPlugin("SpellChecker");
|
||||
HTMLArea.loadPlugin("FullPage");
|
||||
|
||||
function initDocument() {
|
||||
var editor = new HTMLArea("editor");
|
||||
editor.registerPlugin(TableOperations);
|
||||
editor.registerPlugin(SpellChecker);
|
||||
editor.registerPlugin(FullPage);
|
||||
editor.generate();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
@import url(../../htmlarea.css);
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initDocument()">
|
||||
<h1>Test of FullPage plugin</h1>
|
||||
|
||||
<textarea id="editor" style="height: 30em; width: 100%;">
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>FullPage plugin for HTMLArea</title>
|
||||
<link rel="alternate stylesheet" href="http://dynarch.com/mishoo/css/dark.css" />
|
||||
<link rel="stylesheet" href="http://dynarch.com/mishoo/css/cool-light.css" />
|
||||
</head>
|
||||
<body style="background-color: #ddddee; color: #000077;">
|
||||
<table style="width:60%; height: 90%; margin: 2% auto 1% auto;" align="center" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td style="background-color: #ddeedd; border: 2px solid #002; height: 1.5em; padding: 2px; font: bold 24px Verdana;">
|
||||
FullPage plugin
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #fff; border: 1px solid #aab; padding: 1em 3em; font: 12px Verdana;">
|
||||
<p>
|
||||
This plugin enables one to edit a full HTML file in <a
|
||||
href="http://dynarch.com/htmlarea/">HTMLArea</a>. This is not
|
||||
normally possible with just the core editor since it only
|
||||
retrieves the HTML inside the <code>body</code> tag.
|
||||
</p>
|
||||
<p>
|
||||
It provides the ability to change the <code>DOCTYPE</code> of
|
||||
the document, <code>body</code> <code>bgcolor</code> and
|
||||
<code>fgcolor</code> attributes as well as to add additional
|
||||
<code>link</code>-ed stylesheets. Cool, eh?
|
||||
</p>
|
||||
<p>
|
||||
The development of this plugin was initiated and sponsored by
|
||||
<a href="http://thycotic.com">Thycotic Software Ltd.</a>.
|
||||
That's also cool, isn't it? ;-)
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</textarea>
|
||||
|
||||
<hr />
|
||||
<address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
|
||||
<!-- Created: Wed Oct 1 19:55:37 EEST 2003 -->
|
||||
<!-- hhmts start -->
|
||||
Last modified on Sat Oct 25 01:06:59 2003
|
||||
<!-- hhmts end -->
|
||||
<!-- doc-lang: English -->
|
||||
</body>
|
||||
</html>
|
||||
104
htmlarea/plugins/HtmlTidy/README
Normal file
@@ -0,0 +1,104 @@
|
||||
// Plugin for htmlArea to run code through the server's HTML Tidy
|
||||
// By Adam Wright, for The University of Western Australia
|
||||
//
|
||||
// Email: zeno@ucc.gu.uwa.edu.au
|
||||
// Homepage: http://blog.hipikat.org/
|
||||
//
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
//
|
||||
// Version: 0.5
|
||||
// Released to the outside world: 04/03/04
|
||||
|
||||
|
||||
HtmlTidy is a plugin for the popular cross-browser TTY WYSIWYG editor,
|
||||
htmlArea (http://www.htmlarea.com/). HtmlTidy
|
||||
basically queries HTML Tidy (http://tidy.sourceforge.net/) on the
|
||||
server side, getting it to make-html-nice, instead of relying on masses
|
||||
of javascript, which the client would have to download.
|
||||
|
||||
Hi, this is a quick explanation of how to install HtmlTidy. Much better
|
||||
documentation is probably required, and you're welcome to write it :)
|
||||
|
||||
|
||||
* The HtmlTidy directory you should have found this file in should
|
||||
include the following:
|
||||
|
||||
- README
|
||||
This file, providing help installing the plugin.
|
||||
|
||||
- html-tidy-config.cfg
|
||||
This file contains the configuration options HTML Tidy uses to
|
||||
clean html, and can be modified to suit your organizations
|
||||
requirements.
|
||||
|
||||
- html-tidy-logic.php
|
||||
This is the php script, which is queried with dirty html and is
|
||||
responsible for invoking HTML Tidy, getting nice new html and
|
||||
returning it to the client.
|
||||
|
||||
- html-tidy.js
|
||||
The main htmlArea plugin, providing functionality to tidy html
|
||||
through the htmlArea interface.
|
||||
|
||||
- htmlarea.js.onmode_event.diff
|
||||
At the time of publishing, an extra event handler was required
|
||||
inside the main htmlarea.js file. htmlarea.js may be patched
|
||||
against this file to make the changes reuquired, but be aware
|
||||
that the event handler may either now be in the core or
|
||||
htmlarea.js may have changed enough to invalidate the patch.
|
||||
|
||||
UPDATE: now it exists in the official htmlarea.js; applying
|
||||
this patch is thus no longer necessary.
|
||||
|
||||
- img/html-tidy.gif
|
||||
The HtmlTidy icon, for the htmlArea toolbar. Created by Dan
|
||||
Petty for The University of Western Australia.
|
||||
|
||||
- lang/en.js
|
||||
English language file. Add your own language files here and
|
||||
please contribute back into the htmlArea community!
|
||||
|
||||
The HtmlArea directory should be extracted to your htmlarea/plugins/
|
||||
directory.
|
||||
|
||||
|
||||
* Make sure the onMode event handler mentioned above, regarding
|
||||
htmlarea.js.onmode_event.diff, exists in your htmlarea.js
|
||||
|
||||
|
||||
* html-tidy-logic.php should be executable, and your web server should
|
||||
be configured to execute php scripts in the directory
|
||||
html-tidy-logic.php exists in.
|
||||
|
||||
|
||||
* HTML Tidy needs to be installed on your server, and 'tidy' should be
|
||||
an alias to it, lying in the PATH known to the user executing such
|
||||
web scripts.
|
||||
|
||||
|
||||
* In your htmlArea configuration, do something like this:
|
||||
|
||||
HTMLArea.loadPlugin("HtmlTidy");
|
||||
|
||||
editor = new HTMLArea("doc");
|
||||
editor.registerPlugin("HtmlTidy");
|
||||
|
||||
|
||||
* Then, in your htmlArea toolbar configuration, use:
|
||||
|
||||
- "HT-html-tidy"
|
||||
This will create the 'tidy broom' icon on the toolbar, which
|
||||
will attempt to tidy html source when clicked, and;
|
||||
|
||||
- "HT-auto-tidy"
|
||||
This will create an "Auto Tidy" / "Don't Tidy" dropdown, to
|
||||
select whether the source should be tidied automatically when
|
||||
entering source view. On by default, if you'd like it otherwise
|
||||
you can do so programatically after generating the toolbar :)
|
||||
(Or just hack it to be otherwise...)
|
||||
|
||||
|
||||
Thank you.
|
||||
|
||||
Any bugs you find can be emailed to zeno@ucc.gu.uwa.edu.au
|
||||
29
htmlarea/plugins/HtmlTidy/html-tidy-config.cfg
Normal file
@@ -0,0 +1,29 @@
|
||||
// Default configuration file for the htmlArea, HtmlTidy plugin
|
||||
// By Adam Wright, for The University of Western Australia
|
||||
//
|
||||
// Evertything you always wanted to know about HTML Tidy *
|
||||
// can be found at http://tidy.sourceforge.net/, and a
|
||||
// quick reference to the configuration options exists at
|
||||
// http://tidy.sourceforge.net/docs/quickref.html
|
||||
//
|
||||
// * But were afraid to ask
|
||||
//
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
word-2000: yes
|
||||
clean: no
|
||||
drop-font-tags: yes
|
||||
doctype: auto
|
||||
drop-empty-paras: yes
|
||||
drop-proprietary-attributes: yes
|
||||
enclose-block-text: yes
|
||||
enclose-text: yes
|
||||
escape-cdata: yes
|
||||
logical-emphasis: yes
|
||||
indent: auto
|
||||
indent-spaces: 2
|
||||
break-before-br: yes
|
||||
output-xhtml: yes
|
||||
|
||||
force-output: yes
|
||||
83
htmlarea/plugins/HtmlTidy/html-tidy-logic.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<? ###################################################################
|
||||
##
|
||||
## Plugin for htmlArea, to run code through the server's HTML Tidy
|
||||
## By Adam Wright, for The University of Western Australia
|
||||
## This is the server-side script, which dirty code is run through.
|
||||
##
|
||||
## Distributed under the same terms as HTMLArea itself.
|
||||
## This notice MUST stay intact for use (see license.txt).
|
||||
##
|
||||
|
||||
// Get the original source
|
||||
$source = $_POST['htisource_name'];
|
||||
$source = stripslashes($source);
|
||||
|
||||
// Open a tidy process - I hope it's installed!
|
||||
$descriptorspec = array(
|
||||
0 => array("pipe", "r"),
|
||||
1 => array("pipe", "w"),
|
||||
2 => array("file", "/dev/null", "a")
|
||||
);
|
||||
$process = proc_open("tidy -config html-tidy-config.cfg", $descriptorspec, $pipes);
|
||||
|
||||
// Make sure the program started and we got the hooks...
|
||||
// Either way, get some source code into $source
|
||||
if (is_resource($process)) {
|
||||
|
||||
// Feed untidy source into the stdin
|
||||
fwrite($pipes[0], $source);
|
||||
fclose($pipes[0]);
|
||||
|
||||
// Read clean source out to the browser
|
||||
while (!feof($pipes[1])) {
|
||||
//echo fgets($pipes[1], 1024);
|
||||
$newsrc .= fgets($pipes[1], 1024);
|
||||
}
|
||||
fclose($pipes[1]);
|
||||
|
||||
// Clean up after ourselves
|
||||
proc_close($process);
|
||||
|
||||
} else {
|
||||
// Better give them back what they came with, so they don't lose it all...
|
||||
$newsrc = "<body>\n" .$source. "\n</body>";
|
||||
}
|
||||
|
||||
// Split our source into an array by lines
|
||||
$srcLines = explode("\n",$newsrc);
|
||||
|
||||
// Get only the lines between the body tags
|
||||
$startLn = 0;
|
||||
while ( strpos( $srcLines[$startLn++], '<body' ) === false && $startLn < sizeof($srcLines) );
|
||||
$endLn = $startLn;
|
||||
while ( strpos( $srcLines[$endLn++], '</body' ) === false && $endLn < sizeof($srcLines) );
|
||||
|
||||
$srcLines = array_slice( $srcLines, $startLn, ($endLn - $startLn - 1) );
|
||||
|
||||
// Create a set of javascript code to compile a new source string
|
||||
foreach ($srcLines as $line) {
|
||||
$jsMakeSrc .= "\tns += '" . str_replace("'","\'",$line) . "\\n';\n";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
|
||||
function setNewHtml() {
|
||||
var htRef = window.parent._editorRef.plugins['HtmlTidy'];
|
||||
htRef.instance.processTidied(tidyString());
|
||||
}
|
||||
function tidyString() {
|
||||
var ns = '\n';
|
||||
<?=$jsMakeSrc;?>
|
||||
return ns;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body id="htiNewBody" onload="setNewHtml()">
|
||||
</body>
|
||||
</html>
|
||||
128
htmlarea/plugins/HtmlTidy/html-tidy.js
Normal file
@@ -0,0 +1,128 @@
|
||||
// Plugin for htmlArea to run code through the server's HTML Tidy
|
||||
// By Adam Wright, for The University of Western Australia
|
||||
//
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
function HtmlTidy(editor) {
|
||||
this.editor = editor;
|
||||
|
||||
var cfg = editor.config;
|
||||
var tt = HtmlTidy.I18N;
|
||||
var bl = HtmlTidy.btnList;
|
||||
var self = this;
|
||||
|
||||
this.onMode = this.__onMode;
|
||||
|
||||
// register the toolbar buttons provided by this plugin
|
||||
var toolbar = [];
|
||||
for (var i = 0; i < bl.length; ++i) {
|
||||
var btn = bl[i];
|
||||
if (btn == "html-tidy") {
|
||||
var id = "HT-html-tidy";
|
||||
cfg.registerButton(id, tt[id], editor.imgURL(btn[0] + ".gif", "HtmlTidy"), true,
|
||||
function(editor, id) {
|
||||
// dispatch button press event
|
||||
self.buttonPress(editor, id);
|
||||
}, btn[1]);
|
||||
toolbar.push(id);
|
||||
} else if (btn == "html-auto-tidy") {
|
||||
var ht_class = {
|
||||
id : "HT-auto-tidy",
|
||||
options : { "Auto-Tidy" : "auto", "Don't Tidy" : "noauto" },
|
||||
action : function (editor) { self.__onSelect(editor, this); },
|
||||
refresh : function (editor) { },
|
||||
context : "body"
|
||||
};
|
||||
cfg.registerDropdown(ht_class);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i in toolbar) {
|
||||
cfg.toolbar[0].push(toolbar[i]);
|
||||
}
|
||||
};
|
||||
|
||||
HtmlTidy._pluginInfo = {
|
||||
name : "HtmlTidy",
|
||||
version : "1.0",
|
||||
developer : "Adam Wright",
|
||||
developer_url : "http://blog.hipikat.org/",
|
||||
sponsor : "The University of Western Australia",
|
||||
sponsor_url : "http://www.uwa.edu.au/",
|
||||
license : "htmlArea"
|
||||
};
|
||||
|
||||
HtmlTidy.prototype.__onSelect = function(editor, obj) {
|
||||
// Get the toolbar element object
|
||||
var elem = editor._toolbarObjects[obj.id].element;
|
||||
|
||||
// Set our onMode event appropriately
|
||||
if (elem.value == "auto")
|
||||
this.onMode = this.__onMode;
|
||||
else
|
||||
this.onMode = null;
|
||||
};
|
||||
|
||||
HtmlTidy.prototype.__onMode = function(mode) {
|
||||
if ( mode == "textmode" ) {
|
||||
this.buttonPress(this.editor, "HT-html-tidy");
|
||||
}
|
||||
};
|
||||
|
||||
HtmlTidy.btnList = [
|
||||
null, // separator
|
||||
["html-tidy"],
|
||||
["html-auto-tidy"]
|
||||
];
|
||||
|
||||
HtmlTidy.prototype.onGenerateOnce = function() {
|
||||
var editor = this.editor;
|
||||
|
||||
var ifr = document.createElement("iframe");
|
||||
ifr.name = "htiframe_name";
|
||||
var s = ifr.style;
|
||||
s.position = "absolute";
|
||||
s.width = s.height = s.border = s.left = s.top = s.padding = s.margin = "0px";
|
||||
document.body.appendChild(ifr);
|
||||
|
||||
var frm = '<form id="htiform_id" name="htiform_name" method="post" target="htiframe_name" action="';
|
||||
frm += _editor_url + 'plugins/HtmlTidy/html-tidy-logic.php';
|
||||
frm += '"><textarea name="htisource_name" id="htisource_id">';
|
||||
frm += '</textarea></form>';
|
||||
|
||||
var newdiv = document.createElement('div');
|
||||
newdiv.style.display = "none";
|
||||
newdiv.innerHTML = frm;
|
||||
document.body.appendChild(newdiv);
|
||||
};
|
||||
|
||||
HtmlTidy.prototype.buttonPress = function(editor, id) {
|
||||
var i18n = HtmlTidy.I18N;
|
||||
|
||||
switch (id) {
|
||||
case "HT-html-tidy":
|
||||
|
||||
var oldhtml = editor.getHTML();
|
||||
|
||||
// Ask the server for some nice new html, based on the old...
|
||||
var myform = document.getElementById('htiform_id');
|
||||
var txtarea = document.getElementById('htisource_id');
|
||||
txtarea.value = editor.getHTML();
|
||||
|
||||
// Apply the 'meanwhile' text, e.g. "Tidying HTML, please wait..."
|
||||
editor.setHTML(i18n['tidying']);
|
||||
|
||||
// The returning tidying processing script needs to find the editor
|
||||
window._editorRef = editor;
|
||||
|
||||
// ...And send our old source off for processing!
|
||||
myform.submit();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
HtmlTidy.prototype.processTidied = function(newSrc) {
|
||||
editor = this.editor;
|
||||
editor.setHTML(newSrc);
|
||||
};
|
||||
BIN
htmlarea/plugins/HtmlTidy/img/html-tidy.gif
Normal file
|
After Width: | Height: | Size: 107 B |
18
htmlarea/plugins/HtmlTidy/lang/en.js
Normal file
@@ -0,0 +1,18 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Adam Wright, http://blog.hipikat.org/
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
HtmlTidy.I18N = {
|
||||
"tidying" : "\n Tidying up the HTML source, please wait...",
|
||||
"HT-html-tidy" : "HTML Tidy"
|
||||
};
|
||||
23
htmlarea/plugins/ListType/lang/de.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Holger Hees, http://www.systemconcept.de
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
ListType.I18N = {
|
||||
"Decimal" : "1-Zahlen",
|
||||
"Lower roman" : "i-Roemisch",
|
||||
"Upper roman" : "I-Roemisch",
|
||||
"Lower latin" : "a-Zeichen",
|
||||
"Upper latin" : "A-Zeichen",
|
||||
"Lower greek" : "Griechisch",
|
||||
"ListStyleTooltip" : "W<>hlen Sie einen Typ f<>r die Nummerierung aus"
|
||||
};
|
||||
23
htmlarea/plugins/ListType/lang/en.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
ListType.I18N = {
|
||||
"Decimal" : "Decimal numbers",
|
||||
"Lower roman" : "Lower roman numbers",
|
||||
"Upper roman" : "Upper roman numbers",
|
||||
"Lower latin" : "Lower latin letters",
|
||||
"Upper latin" : "Upper latin letters",
|
||||
"Lower greek" : "Lower greek letters",
|
||||
"ListStyleTooltip" : "Choose list style type (for ordered lists)"
|
||||
};
|
||||
89
htmlarea/plugins/ListType/list-type.js
Normal file
@@ -0,0 +1,89 @@
|
||||
// ListType Plugin for HTMLArea-3.0
|
||||
// Sponsored by MEdTech Unit - Queen's University
|
||||
// Implementation by Mihai Bazon, http://dynarch.com/mishoo/
|
||||
//
|
||||
// (c) dynarch.com 2003-2005.
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
//
|
||||
// $Id$
|
||||
|
||||
function ListType(editor) {
|
||||
this.editor = editor;
|
||||
var cfg = editor.config;
|
||||
var toolbar = cfg.toolbar;
|
||||
var self = this;
|
||||
var i18n = ListType.I18N;
|
||||
var options = {};
|
||||
options[i18n["Decimal"]] = "decimal";
|
||||
options[i18n["Lower roman"]] = "lower-roman";
|
||||
options[i18n["Upper roman"]] = "upper-roman";
|
||||
options[i18n["Lower latin"]] = "lower-alpha";
|
||||
options[i18n["Upper latin"]] = "upper-alpha";
|
||||
if (!HTMLArea.is_ie)
|
||||
// IE doesn't support this property; even worse, it complains
|
||||
// with a gross error message when we tried to select it,
|
||||
// therefore let's hide it from the damn "browser".
|
||||
options[i18n["Lower greek"]] = "lower-greek";
|
||||
var obj = {
|
||||
id : "ListType",
|
||||
tooltip : i18n["ListStyleTooltip"],
|
||||
options : options,
|
||||
action : function(editor) { self.onSelect(editor, this); },
|
||||
refresh : function(editor) { self.updateValue(editor, this); },
|
||||
context : "ol"
|
||||
};
|
||||
cfg.registerDropdown(obj);
|
||||
var a, i, j, found = false;
|
||||
for (i = 0; !found && i < toolbar.length; ++i) {
|
||||
a = toolbar[i];
|
||||
for (j = 0; j < a.length; ++j) {
|
||||
if (a[j] == "unorderedlist") {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
a.splice(j, 0, "space", "ListType", "space");
|
||||
};
|
||||
|
||||
ListType._pluginInfo = {
|
||||
name : "ListType",
|
||||
version : "1.0",
|
||||
developer : "Mihai Bazon",
|
||||
developer_url : "http://dynarch.com/mishoo/",
|
||||
c_owner : "dynarch.com",
|
||||
sponsor : "MEdTech Unit - Queen's University",
|
||||
sponsor_url : "http://www.queensu.ca/",
|
||||
license : "htmlArea"
|
||||
};
|
||||
|
||||
ListType.prototype.onSelect = function(editor, combo) {
|
||||
var tbobj = editor._toolbarObjects[combo.id].element;
|
||||
var parent = editor.getParentElement();
|
||||
while (!/^ol$/i.test(parent.tagName)) {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
parent.style.listStyleType = tbobj.value;
|
||||
};
|
||||
|
||||
ListType.prototype.updateValue = function(editor, combo) {
|
||||
var tbobj = editor._toolbarObjects[combo.id].element;
|
||||
var parent = editor.getParentElement();
|
||||
while (parent && !/^ol$/i.test(parent.tagName)) {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
if (!parent) {
|
||||
tbobj.selectedIndex = 0;
|
||||
return;
|
||||
}
|
||||
var type = parent.style.listStyleType;
|
||||
if (!type) {
|
||||
tbobj.selectedIndex = 0;
|
||||
} else {
|
||||
for (var i = tbobj.firstChild; i; i = i.nextSibling) {
|
||||
i.selected = (type.indexOf(i.value) != -1);
|
||||
}
|
||||
}
|
||||
};
|
||||
BIN
htmlarea/plugins/SpellChecker/img/he-spell-check.gif
Normal file
|
After Width: | Height: | Size: 899 B |
BIN
htmlarea/plugins/SpellChecker/img/spell-check.gif
Normal file
|
After Width: | Height: | Size: 107 B |
37
htmlarea/plugins/SpellChecker/lang/cz.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// I18N constants
|
||||
|
||||
|
||||
|
||||
// LANG: "cz", ENCODING: UTF-8 | ISO-8859-2
|
||||
|
||||
// Author: Jiri Löw, <jirilow@jirilow.com>
|
||||
|
||||
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
|
||||
//
|
||||
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
|
||||
// (at least a valid email address)
|
||||
|
||||
//
|
||||
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
|
||||
// (if this is not possible, please include a comment
|
||||
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
|
||||
|
||||
SpellChecker.I18N = {
|
||||
|
||||
"CONFIRM_LINK_CLICK" : "Prosím potvrďte otevření tohoto odkazu",
|
||||
|
||||
"Cancel" : "Zrušit",
|
||||
|
||||
"Dictionary" : "Slovník",
|
||||
|
||||
"Finished list of mispelled words" : "Dokončen seznam chybných slov",
|
||||
37
htmlarea/plugins/SpellChecker/lang/da.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Steen Sønderup, <steen@soenderup.com>
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
SpellChecker.I18N = {
|
||||
"CONFIRM_LINK_CLICK" : "Vil du følge dette link?",
|
||||
"Cancel" : "Anuler",
|
||||
"Dictionary" : "Ordbog",
|
||||
"Finished list of mispelled words" : "Listen med stavefejl er gennemgået",
|
||||
"I will open it in a new page." : "Jeg vil åbne det i en ny side.",
|
||||
"Ignore all" : "Ignorer alle",
|
||||
"Ignore" : "Ignorer",
|
||||
"NO_ERRORS" : "Der blev ikke fundet nogle stavefejl med den valgte ordbog.",
|
||||
"NO_ERRORS_CLOSING" : "Stavekontrollen er gennemført, der blev ikke fundet nogle stavefejl. Lukker...",
|
||||
"OK" : "OK",
|
||||
"Original word" : "Oprindeligt ord",
|
||||
"Please wait. Calling spell checker." : "Vent venligst. Henter stavekontrol.",
|
||||
"Please wait: changing dictionary to" : "Vent venligst: skifter ordbog til",
|
||||
"QUIT_CONFIRMATION" : "Alle dine ændringer vil gå tabt, vil du fortsætte?",
|
||||
"Re-check" : "Tjek igen",
|
||||
"Replace all" : "Erstat alle",
|
||||
"Replace with" : "Erstat med",
|
||||
"Replace" : "Erstat",
|
||||
"SC-spell-check" : "Stavekontrol",
|
||||
"Suggestions" : "Forslag",
|
||||
"pliz weit ;-)" : "Vent venligst"
|
||||
};
|
||||
28
htmlarea/plugins/SpellChecker/lang/de.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Broxx, <broxx@broxx.com>
|
||||
|
||||
SpellChecker.I18N = {
|
||||
"CONFIRM_LINK_CLICK" : "Wollen Sie diesen Link oeffnen",
|
||||
"Cancel" : "Abbrechen",
|
||||
"Dictionary" : "Woerterbuch",
|
||||
"Finished list of mispelled words" : "Liste der nicht bekannten Woerter",
|
||||
"I will open it in a new page." : "Wird auf neuer Seite geoeffnet",
|
||||
"Ignore all" : "Alle ignorieren",
|
||||
"Ignore" : "Ignorieren",
|
||||
"NO_ERRORS" : "Keine falschen Woerter mit gewaehlten Woerterbuch gefunden",
|
||||
"NO_ERRORS_CLOSING" : "Rechtsschreibpruefung wurde ohne Fehler fertiggestellt. Wird nun geschlossen...",
|
||||
"OK" : "OK",
|
||||
"Original word" : "Original Wort",
|
||||
"Please wait. Calling spell checker." : "Bitte warten. Woerterbuch wird durchsucht.",
|
||||
"Please wait: changing dictionary to" : "Bitte warten: Woerterbuch wechseln zu",
|
||||
"QUIT_CONFIRMATION" : "Aenderungen werden nicht uebernommen. Bitte bestaettigen.",
|
||||
"Re-check" : "Neuueberpruefung",
|
||||
"Replace all" : "Alle ersetzen",
|
||||
"Replace with" : "Ersetzen mit",
|
||||
"Replace" : "Ersetzen",
|
||||
"SC-spell-check" : "Ueberpruefung",
|
||||
"Suggestions" : "Vorschlag",
|
||||
"pliz weit ;-)" : "bittsche wartn ;-)"
|
||||
};
|
||||
38
htmlarea/plugins/SpellChecker/lang/en.js
Normal file
@@ -0,0 +1,38 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
SpellChecker.I18N = {
|
||||
"CONFIRM_LINK_CLICK" : "Please confirm that you want to open this link",
|
||||
"Cancel" : "Cancel",
|
||||
"Dictionary" : "Dictionary",
|
||||
"Finished list of mispelled words" : "Finished list of mispelled words",
|
||||
"I will open it in a new page." : "I will open it in a new page.",
|
||||
"Ignore all" : "Ignore all",
|
||||
"Ignore" : "Ignore",
|
||||
"NO_ERRORS" : "No mispelled words found with the selected dictionary.",
|
||||
"NO_ERRORS_CLOSING" : "Spell check complete, didn't find any mispelled words. Closing now...",
|
||||
"OK" : "OK",
|
||||
"Original word" : "Original word",
|
||||
"Please wait. Calling spell checker." : "Please wait. Calling spell checker.",
|
||||
"Please wait: changing dictionary to" : "Please wait: changing dictionary to",
|
||||
"QUIT_CONFIRMATION" : "This will drop changes and quit spell checker. Please confirm.",
|
||||
"Re-check" : "Re-check",
|
||||
"Replace all" : "Replace all",
|
||||
"Replace with" : "Replace with",
|
||||
"Replace" : "Replace",
|
||||
"Revert" : "Revert",
|
||||
"SC-spell-check" : "Spell-check",
|
||||
"Suggestions" : "Suggestions",
|
||||
"pliz weit ;-)" : "pliz weit ;-)"
|
||||
};
|
||||
38
htmlarea/plugins/SpellChecker/lang/he.js
Normal file
@@ -0,0 +1,38 @@
|
||||
// I18N constants
|
||||
|
||||
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
|
||||
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||
|
||||
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
|
||||
//
|
||||
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
|
||||
// (at least a valid email address)
|
||||
|
||||
//
|
||||
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
|
||||
// (if this is not possible, please include a comment
|
||||
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
|
||||
|
||||
SpellChecker.I18N = {
|
||||
|
||||
"CONFIRM_LINK_CLICK" : "אנא אשר שברצונך לפתוח קישור זה",
|
||||
|
||||
"Cancel" : "ביטול",
|
||||
|
||||
"Dictionary" : "מילון",
|
||||
|
||||
"Finished list of mispelled words" : "הסתיימה רשימת המילים המאויתות באופן שגוי",
|
||||
|
||||
37
htmlarea/plugins/SpellChecker/lang/hu.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "hu", ENCODING: UTF-8
|
||||
// Author: Miklós Somogyi, <somogyine@vnet.hu>
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
SpellChecker.I18N = {
|
||||
"CONFIRM_LINK_CLICK" : "Megerősítés",
|
||||
"Cancel" : "Mégsem",
|
||||
"Dictionary" : "Szótár",
|
||||
"Finished list of mispelled words" : "A tévesztett szavak listájának vége",
|
||||
"I will open it in a new page." : "Megnyitás új lapon",
|
||||
"Ignore all" : "Minden elvetése",
|
||||
"Ignore" : "Elvetés",
|
||||
"NO_ERRORS" : "A választott szótár szerint nincs tévesztett szó.",
|
||||
"NO_ERRORS_CLOSING" : "A helyesírásellenőrzés kész, tévesztett szó nem fordult elő. Bezárás...",
|
||||
"OK" : "Rendben",
|
||||
"Original word" : "Eredeti szó",
|
||||
"Please wait. Calling spell checker." : "Kis türelmet, a helyesírásellenőrző hívása folyamatban.",
|
||||
"Please wait: changing dictionary to" : "Kis türelmet, szótár cseréje",
|
||||
"QUIT_CONFIRMATION" : "Kilépés a változások eldobásával. Jóváhagyja?",
|
||||
"Re-check" : "Újraellenőrzés",
|
||||
"Replace all" : "Mind cseréje",
|
||||
"Replace with" : "Csere a következőre:",
|
||||
"Replace" : "Csere",
|
||||
"SC-spell-check" : "Helyesírásellenőrzés",
|
||||
"Suggestions" : "Tippek",
|
||||
"pliz weit ;-)" : "Kis türelmet ;-)"
|
||||
};
|
||||
28
htmlarea/plugins/SpellChecker/lang/it.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "it", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Fabio Rotondo, <fabio@rotondo.it>
|
||||
|
||||
SpellChecker.I18N = {
|
||||
"CONFIRM_LINK_CLICK" : "Devi confermare l'apertura di questo link",
|
||||
"Cancel" : "Annulla",
|
||||
"Dictionary" : "Dizionario",
|
||||
"Finished list of mispelled words" : "La lista delle parole scritte male è terminata",
|
||||
"I will open it in a new page." : "Lo aprirò in una nuova pagina.",
|
||||
"Ignore all" : "Ignora sempre",
|
||||
"Ignore" : "Ignora",
|
||||
"NO_ERRORS" : "Non sono state trovate parole scritte male con il dizionario selezionato.",
|
||||
"NO_ERRORS_CLOSING" : "Controllo completato, non sono state trovate parole scritte male. Sto chiudendo...",
|
||||
"OK" : "OK",
|
||||
"Original word" : "Parola originale",
|
||||
"Please wait. Calling spell checker." : "Attendere. Sto invocando lo Spell Checker.",
|
||||
"Please wait: changing dictionary to" : "Attendere. Cambio il dizionario in",
|
||||
"QUIT_CONFIRMATION" : "Questo annullerà le modifiche e chiuderà lo Spell Checker. Conferma.",
|
||||
"Re-check" : "Ricontrolla",
|
||||
"Replace all" : "Sostituisci sempre",
|
||||
"Replace with" : "Stostituisci con",
|
||||
"Replace" : "Sostituisci",
|
||||
"SC-spell-check" : "Spell-check",
|
||||
"Suggestions" : "Suggerimenti",
|
||||
"pliz weit ;-)" : "Attendere Prego ;-)"
|
||||
};
|
||||
39
htmlarea/plugins/SpellChecker/lang/nl.js
Normal file
@@ -0,0 +1,39 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: A.H van den Broek http://www.kontaktfm.nl
|
||||
// Email : tonbroek@kontaktfm.nl
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
SpellChecker.I18N = {
|
||||
"CONFIRM_LINK_CLICK" : "Weet u zeker dat u deze link wilt openen?",
|
||||
"Cancel" : "Annuleer",
|
||||
"Dictionary" : "Woordenboek",
|
||||
"Finished list of mispelled words" : "klaar met de lijst van fouten woorden",
|
||||
"I will open it in a new page." : "Ik zal het in een nieuwe pagina openen.",
|
||||
"Ignore all" : "alles overslaan",
|
||||
"Ignore" : "Overslaan",
|
||||
"NO_ERRORS" : "Geen fouten gevonden met dit woordenboek.",
|
||||
"NO_ERRORS_CLOSING" : "Spell checking is klaar, geen fouten gevonden. spell checking word gesloten...",
|
||||
"OK" : "OK",
|
||||
"Original word" : "Originele woord",
|
||||
"Please wait. Calling spell checker." : "Even wachten. spell checker wordt geladen.",
|
||||
"Please wait: changing dictionary to" : "even wachten: woordenboek wordt veranderd naar",
|
||||
"QUIT_CONFIRMATION" : "Dit zal alle veranderingen annuleren en de spell checker sluiten. Weet u het zeker?",
|
||||
"Re-check" : "Opnieuw",
|
||||
"Replace all" : "Alles vervangen",
|
||||
"Replace with" : "Vervangen met",
|
||||
"Replace" : "Vervangen",
|
||||
"Revert" : "Omkeren",
|
||||
"SC-spell-check" : "Spell-check",
|
||||
"Suggestions" : "Suggestie",
|
||||
"pliz weit ;-)" : "Even wachten ;-)"
|
||||
};
|
||||
37
htmlarea/plugins/SpellChecker/lang/ro.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "ro", ENCODING: UTF-8
|
||||
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
SpellChecker.I18N = {
|
||||
"CONFIRM_LINK_CLICK" : "Vă rog confirmaţi că vreţi să deschideţi acest link",
|
||||
"Cancel" : "Anulează",
|
||||
"Dictionary" : "Dicţionar",
|
||||
"Finished list of mispelled words" : "Am terminat lista de cuvinte greşite",
|
||||
"I will open it in a new page." : "O voi deschide într-o altă fereastră.",
|
||||
"Ignore all" : "Ignoră toate",
|
||||
"Ignore" : "Ignoră",
|
||||
"NO_ERRORS" : "Nu am găsit nici un cuvânt greşit cu acest dicţionar.",
|
||||
"NO_ERRORS_CLOSING" : "Am terminat, nu am detectat nici o greşeală. Acum închid fereastra...",
|
||||
"OK" : "OK",
|
||||
"Original word" : "Cuvântul original",
|
||||
"Please wait. Calling spell checker." : "Vă rog aşteptaţi. Apelez spell-checker-ul.",
|
||||
"Please wait: changing dictionary to" : "Vă rog aşteptaţi. Schimb dicţionarul cu",
|
||||
"QUIT_CONFIRMATION" : "Doriţi să renunţaţi la modificări şi să închid spell-checker-ul?",
|
||||
"Re-check" : "Scanează",
|
||||
"Replace all" : "Înlocuieşte toate",
|
||||
"Replace with" : "Înlocuieşte cu",
|
||||
"Replace" : "Înlocuieşte",
|
||||
"SC-spell-check" : "Detectează greşeli",
|
||||
"Suggestions" : "Sugestii",
|
||||
"pliz weit ;-)" : "va rog ashteptatzi ;-)"
|
||||
};
|
||||
114
htmlarea/plugins/SpellChecker/readme-tech.html
Normal file
@@ -0,0 +1,114 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>HTMLArea Spell Checker</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>HTMLArea Spell Checker</h1>
|
||||
|
||||
<p>The HTMLArea Spell Checker subsystem consists of the following
|
||||
files:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>spell-checker.js — the spell checker plugin interface for
|
||||
HTMLArea</li>
|
||||
|
||||
<li>spell-checker-ui.html — the HTML code for the user
|
||||
interface</li>
|
||||
|
||||
<li>spell-checker-ui.js — functionality of the user
|
||||
interface</li>
|
||||
|
||||
<li>spell-checker-logic.cgi — Perl CGI script that checks a text
|
||||
given through POST for spelling errors</li>
|
||||
|
||||
<li>spell-checker-style.css — style for mispelled words</li>
|
||||
|
||||
<li>lang/en.js — main language file (English).</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Process overview</h2>
|
||||
|
||||
<p>
|
||||
When an end-user clicks the "spell-check" button in the HTMLArea
|
||||
editor, a new window is opened with the URL of "spell-check-ui.html".
|
||||
This window initializes itself with the text found in the editor (uses
|
||||
<tt>window.opener.SpellChecker.editor</tt> global variable) and it
|
||||
submits the text to the server-side script "spell-check-logic.cgi".
|
||||
The target of the FORM is an inline frame which is used both to
|
||||
display the text and correcting.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Further, spell-check-logic.cgi calls Aspell for each portion of plain
|
||||
text found in the given HTML. It rebuilds an HTML file that contains
|
||||
clear marks of which words are incorrect, along with suggestions for
|
||||
each of them. This file is then loaded in the inline frame. Upon
|
||||
loading, a JavaScript function from "spell-check-ui.js" is called.
|
||||
This function will retrieve all mispelled words from the HTML of the
|
||||
iframe and will setup the user interface so that it allows correction.
|
||||
</p>
|
||||
|
||||
<h2>The server-side script (spell-check-logic.cgi)</h2>
|
||||
|
||||
<p>
|
||||
<strong>Unicode safety</strong> — the program <em>is</em>
|
||||
Unicode safe. HTML entities are expanded into their corresponding
|
||||
Unicode characters. These characters will be matched as part of the
|
||||
word passed to Aspell. All texts passed to Aspell are in Unicode
|
||||
(when appropriate). <strike>However, Aspell seems to not support Unicode
|
||||
yet (<a
|
||||
href="http://mail.gnu.org/archive/html/aspell-user/2000-11/msg00007.html">thread concerning Aspell and Unicode</a>).
|
||||
This mean that words containing Unicode
|
||||
characters that are not in 0..255 are likely to be reported as "mispelled" by Aspell.</strike>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong style="font-variant: small-caps; color:
|
||||
red;">Update:</strong> though I've never seen it mentioned
|
||||
anywhere, it looks that Aspell <em>does</em>, in fact, speak
|
||||
Unicode. Or else, maybe <code>Text::Aspell</code> does
|
||||
transparent conversion; anyway, this new version of our
|
||||
SpellChecker plugin is, as tests show so far, fully
|
||||
Unicode-safe... well, probably the <em>only</em> freeware
|
||||
Web-based spell-checker which happens to have Unicode support.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Perl Unicode manual (man perluniintro) states:
|
||||
</p>
|
||||
|
||||
<blockquote>
|
||||
<em>
|
||||
Starting from Perl 5.6.0, Perl has had the capacity to handle Unicode
|
||||
natively. Perl 5.8.0, however, is the first recommended release for
|
||||
serious Unicode work. The maintenance release 5.6.1 fixed many of the
|
||||
problems of the initial Unicode implementation, but for example regular
|
||||
expressions still do not work with Unicode in 5.6.1.
|
||||
</em>
|
||||
</blockquote>
|
||||
|
||||
<p>In other words, do <em>not</em> assume that this script is
|
||||
Unicode-safe on Perl interpreters older than 5.8.0.</p>
|
||||
|
||||
<p>The following Perl modules are required:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://search.cpan.org/search?query=Text%3A%3AAspell&mode=all" target="_blank">Text::Aspell</a></li>
|
||||
<li><a href="http://search.cpan.org/search?query=XML%3A%3ADOM&mode=all" target="_blank">XML::DOM</a></li>
|
||||
<li><a href="http://search.cpan.org/search?query=CGI&mode=all" target="_blank">CGI</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Of these, only Text::Aspell might need to be installed manually. The
|
||||
others are likely to be available by default in most Perl distributions.</p>
|
||||
|
||||
<hr />
|
||||
<address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
|
||||
<!-- Created: Thu Jul 17 13:22:27 EEST 2003 -->
|
||||
<!-- hhmts start --> Last modified: Fri Jan 30 19:14:11 EET 2004 <!-- hhmts end -->
|
||||
<!-- doc-lang: English -->
|
||||
</body>
|
||||
</html>
|
||||
210
htmlarea/plugins/SpellChecker/spell-check-logic.cgi
Normal file
@@ -0,0 +1,210 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Spell Checker Plugin for HTMLArea-3.0
|
||||
# Sponsored by www.americanbible.org
|
||||
# Implementation by Mihai Bazon, http://dynarch.com/mishoo/
|
||||
#
|
||||
# (c) dynarch.com 2003.
|
||||
# Distributed under the same terms as HTMLArea itself.
|
||||
# This notice MUST stay intact for use (see license.txt).
|
||||
#
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
use utf8;
|
||||
use Encode;
|
||||
use Text::Aspell;
|
||||
use XML::DOM;
|
||||
use CGI;
|
||||
|
||||
my $TIMER_start = undef;
|
||||
eval {
|
||||
use Time::HiRes qw( gettimeofday tv_interval );
|
||||
$TIMER_start = [gettimeofday()];
|
||||
};
|
||||
# use POSIX qw( locale_h );
|
||||
|
||||
binmode STDIN, ':utf8';
|
||||
binmode STDOUT, ':utf8';
|
||||
|
||||
my $debug = 0;
|
||||
|
||||
my $speller = new Text::Aspell;
|
||||
my $cgi = new CGI;
|
||||
|
||||
my $total_words = 0;
|
||||
my $total_mispelled = 0;
|
||||
my $total_suggestions = 0;
|
||||
my $total_words_suggested = 0;
|
||||
|
||||
# FIXME: report a nice error...
|
||||
die "Can't create speller!" unless $speller;
|
||||
|
||||
my $dict = $cgi->param('dictionary') || $cgi->cookie('dictionary') || 'en';
|
||||
|
||||
# add configurable option for this
|
||||
$speller->set_option('lang', $dict);
|
||||
$speller->set_option('encoding', 'UTF-8');
|
||||
#setlocale(LC_CTYPE, $dict);
|
||||
|
||||
# ultra, fast, normal, bad-spellers
|
||||
# bad-spellers seems to cause segmentation fault
|
||||
$speller->set_option('sug-mode', 'normal');
|
||||
|
||||
my %suggested_words = ();
|
||||
keys %suggested_words = 128;
|
||||
|
||||
my $file_content = decode('UTF-8', $cgi->param('content'));
|
||||
$file_content = parse_with_dom($file_content);
|
||||
|
||||
my $ck_dictionary = $cgi->cookie(-name => 'dictionary',
|
||||
-value => $dict,
|
||||
-expires => '+30d');
|
||||
|
||||
print $cgi->header(-type => 'text/html; charset: utf-8',
|
||||
-cookie => $ck_dictionary);
|
||||
|
||||
my $js_suggested_words = make_js_hash(\%suggested_words);
|
||||
my $js_spellcheck_info = make_js_hash_from_array
|
||||
([
|
||||
[ 'Total words' , $total_words ],
|
||||
[ 'Mispelled words' , $total_mispelled . ' in dictionary \"'.$dict.'\"' ],
|
||||
[ 'Total suggestions' , $total_suggestions ],
|
||||
[ 'Total words suggested' , $total_words_suggested ],
|
||||
[ 'Spell-checked in' , defined $TIMER_start ? (tv_interval($TIMER_start) . ' seconds') : 'n/a' ]
|
||||
]);
|
||||
|
||||
print qq^<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" media="all" href="spell-check-style.css" />
|
||||
<script type="text/javascript">
|
||||
var suggested_words = { $js_suggested_words };
|
||||
var spellcheck_info = { $js_spellcheck_info }; </script>
|
||||
</head>
|
||||
<body onload="window.parent.finishedSpellChecking();">^;
|
||||
|
||||
print $file_content;
|
||||
if ($cgi->param('init') eq '1') {
|
||||
my @dicts = $speller->dictionary_info();
|
||||
my $dictionaries = '';
|
||||
foreach my $i (@dicts) {
|
||||
next if $i->{jargon};
|
||||
my $name = $i->{name};
|
||||
if ($name eq $dict) {
|
||||
$name = '@'.$name;
|
||||
}
|
||||
$dictionaries .= ',' . $name;
|
||||
}
|
||||
$dictionaries =~ s/^,//;
|
||||
print qq^<div id="HA-spellcheck-dictionaries">$dictionaries</div>^;
|
||||
}
|
||||
|
||||
print '</body></html>';
|
||||
|
||||
# Perl is beautiful.
|
||||
sub spellcheck {
|
||||
my $node = shift;
|
||||
my $doc = $node->getOwnerDocument;
|
||||
my $check = sub { # called for each word in the text
|
||||
# input is in UTF-8
|
||||
my $word = shift;
|
||||
my $already_suggested = defined $suggested_words{$word};
|
||||
++$total_words;
|
||||
if (!$already_suggested && $speller->check($word)) {
|
||||
return undef;
|
||||
} else {
|
||||
# we should have suggestions; give them back to browser in UTF-8
|
||||
++$total_mispelled;
|
||||
if (!$already_suggested) {
|
||||
# compute suggestions for this word
|
||||
my @suggestions = $speller->suggest($word);
|
||||
my $suggestions = decode($speller->get_option('encoding'), join(',', @suggestions));
|
||||
$suggested_words{$word} = $suggestions;
|
||||
++$total_suggestions;
|
||||
$total_words_suggested += scalar @suggestions;
|
||||
}
|
||||
# HA-spellcheck-error
|
||||
my $err = $doc->createElement('span');
|
||||
$err->setAttribute('class', 'HA-spellcheck-error');
|
||||
my $tmp = $doc->createTextNode;
|
||||
$tmp->setNodeValue($word);
|
||||
$err->appendChild($tmp);
|
||||
return $err;
|
||||
}
|
||||
};
|
||||
while ($node->getNodeValue =~ /([\p{IsWord}']+)/) {
|
||||
my $word = $1;
|
||||
my $before = $`;
|
||||
my $after = $';
|
||||
my $df = &$check($word);
|
||||
if (!$df) {
|
||||
$before .= $word;
|
||||
}
|
||||
{
|
||||
my $parent = $node->getParentNode;
|
||||
my $n1 = $doc->createTextNode;
|
||||
$n1->setNodeValue($before);
|
||||
$parent->insertBefore($n1, $node);
|
||||
$parent->insertBefore($df, $node) if $df;
|
||||
$node->setNodeValue($after);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
sub check_inner_text {
|
||||
my $node = shift;
|
||||
my $text = '';
|
||||
for (my $i = $node->getFirstChild; defined $i; $i = $i->getNextSibling) {
|
||||
if ($i->getNodeType == TEXT_NODE) {
|
||||
spellcheck($i);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
sub parse_with_dom {
|
||||
my ($text) = @_;
|
||||
$text = '<spellchecker>'.$text.'</spellchecker>';
|
||||
|
||||
my $parser = new XML::DOM::Parser;
|
||||
if ($debug) {
|
||||
open(FOO, '>:utf8', '/tmp/foo');
|
||||
print FOO $text;
|
||||
close FOO;
|
||||
}
|
||||
my $doc = $parser->parse($text);
|
||||
my $nodes = $doc->getElementsByTagName('*');
|
||||
my $n = $nodes->getLength;
|
||||
|
||||
for (my $i = 0; $i < $n; ++$i) {
|
||||
my $node = $nodes->item($i);
|
||||
if ($node->getNodeType == ELEMENT_NODE) {
|
||||
check_inner_text($node);
|
||||
}
|
||||
}
|
||||
|
||||
my $ret = $doc->toString;
|
||||
$ret =~ s{<spellchecker>(.*)</spellchecker>}{$1}sg;
|
||||
return $ret;
|
||||
};
|
||||
|
||||
sub make_js_hash {
|
||||
my ($hash) = @_;
|
||||
my $js_hash = '';
|
||||
while (my ($key, $val) = each %$hash) {
|
||||
$js_hash .= ',' if $js_hash;
|
||||
$js_hash .= '"'.$key.'":"'.$val.'"';
|
||||
}
|
||||
return $js_hash;
|
||||
};
|
||||
|
||||
sub make_js_hash_from_array {
|
||||
my ($array) = @_;
|
||||
my $js_hash = '';
|
||||
foreach my $i (@$array) {
|
||||
$js_hash .= ',' if $js_hash;
|
||||
$js_hash .= '"'.$i->[0].'":"'.$i->[1].'"';
|
||||
}
|
||||
return $js_hash;
|
||||
};
|
||||
10
htmlarea/plugins/SpellChecker/spell-check-style.css
Normal file
@@ -0,0 +1,10 @@
|
||||
.HA-spellcheck-error { border-bottom: 1px dashed #f00; cursor: default; }
|
||||
.HA-spellcheck-same { background-color: #cef; color: #000; }
|
||||
.HA-spellcheck-hover { background-color: #433; color: white; }
|
||||
.HA-spellcheck-fixed { border-bottom: 1px dashed #0b8; }
|
||||
.HA-spellcheck-current { background-color: #9be; color: #000; }
|
||||
.HA-spellcheck-suggestions { display: none; }
|
||||
|
||||
#HA-spellcheck-dictionaries { display: none; }
|
||||
|
||||
a:link, a:visited { color: #55e; }
|
||||
122
htmlarea/plugins/SpellChecker/spell-check-ui.html
Normal file
@@ -0,0 +1,122 @@
|
||||
<!--
|
||||
|
||||
Strangely, IE sucks with or without the DOCTYPE switch.
|
||||
I thought it would only suck without it.
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
|
||||
Spell Checker Plugin for HTMLArea-3.0
|
||||
Sponsored by www.americanbible.org
|
||||
Implementation by Mihai Bazon, http://dynarch.com/mishoo/
|
||||
|
||||
(c) dynarch.com 2003-2005.
|
||||
Distributed under the same terms as HTMLArea itself.
|
||||
This notice MUST stay intact for use (see license.txt).
|
||||
|
||||
$Id$
|
||||
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>Spell Checker</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript" src="spell-check-ui.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
html, body { height: 100%; margin: 0px; padding: 0px; background-color: #fff;
|
||||
color: #000; }
|
||||
a:link, a:visited { color: #00f; text-decoration: none; }
|
||||
a:hover { color: #f00; text-decoration: underline; }
|
||||
|
||||
table { background-color: ButtonFace; color: ButtonText;
|
||||
font-family: tahoma,verdana,sans-serif; font-size: 11px; }
|
||||
|
||||
iframe { background-color: #fff; color: #000; height: 100%; width: 100%; }
|
||||
|
||||
.controls { width: 13em; }
|
||||
.controls .sectitle { /* background-color: #736c6c; color: #fff;
|
||||
border-top: 1px solid #000; border-bottom: 1px solid #fff; */
|
||||
text-align: center;
|
||||
font-weight: bold; padding: 2px 4px; }
|
||||
.controls .secbody { margin-bottom: 10px; }
|
||||
|
||||
button, select { font-family: tahoma,verdana,sans-serif; font-size: 11px; }
|
||||
button { width: 6em; padding: 0px; }
|
||||
|
||||
input, select { font-family: fixed,"andale mono",monospace; }
|
||||
|
||||
#v_currentWord { color: #f00; font-weight: bold; }
|
||||
#statusbar { padding: 7px 0px 0px 5px; }
|
||||
#status { font-weight: bold; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="initDocument()">
|
||||
|
||||
<form style="display: none;" action="spell-check-logic.cgi"
|
||||
method="post" target="framecontent"
|
||||
accept-charset="UTF-8"
|
||||
><input type="hidden" name="content" id="f_content"
|
||||
/><input type="hidden" name="dictionary" id="f_dictionary"
|
||||
/><input type="hidden" name="init" id="f_init" value="1"
|
||||
/></form>
|
||||
|
||||
<table style="height: 100%; width: 100%; border-collapse: collapse;" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan="2" style="height: 1em; padding: 2px;">
|
||||
<div style="float: right; padding: 2px;"><span>Dictionary</span>
|
||||
<select id="v_dictionaries" style="width: 10em"></select>
|
||||
<button id="b_recheck">Re-check</button>
|
||||
</div>
|
||||
<span id="status">Please wait. Calling spell checker.</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="controls">
|
||||
<div class="secbody" style="text-align: center">
|
||||
<button id="b_info">Info</button>
|
||||
</div>
|
||||
<div class="sectitle">Original word</div>
|
||||
<div class="secbody" id="v_currentWord" style="text-align:
|
||||
center; margin-bottom: 0px;">pliz weit ;-)</div>
|
||||
<div class="secbody" style="text-align: center">
|
||||
<button id="b_revert">Revert</button>
|
||||
</div>
|
||||
<div class="sectitle">Replace with</div>
|
||||
<div class="secbody">
|
||||
<input type="text" id="v_replacement" style="width: 94%; margin-left: 3%;" /><br />
|
||||
<div style="text-align: center; margin-top: 2px;">
|
||||
<button id="b_replace">Replace</button><button
|
||||
id="b_replall">Replace all</button><br /><button
|
||||
id="b_ignore">Ignore</button><button
|
||||
id="b_ignall">Ignore all</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sectitle">Suggestions</div>
|
||||
<div class="secbody">
|
||||
<select size="11" style="width: 94%; margin-left: 3%;" id="v_suggestions"></select>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<iframe src="about:blank" width="100%" height="100%"
|
||||
id="i_framecontent" name="framecontent"></iframe>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height: 1em;" colspan="2">
|
||||
<div style="padding: 4px 2px 2px 2px; float: right;">
|
||||
<button id="b_ok">OK</button>
|
||||
<button id="b_cancel">Cancel</button>
|
||||
</div>
|
||||
<div id="statusbar"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
397
htmlarea/plugins/SpellChecker/spell-check-ui.js
Normal file
@@ -0,0 +1,397 @@
|
||||
// Spell Checker Plugin for HTMLArea-3.0
|
||||
// Sponsored by www.americanbible.org
|
||||
// Implementation by Mihai Bazon, http://dynarch.com/mishoo/
|
||||
//
|
||||
// (c) dynarch.com 2003-2005.
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
//
|
||||
// $Id$
|
||||
|
||||
// internationalization file was already loaded in parent ;-)
|
||||
var SpellChecker = window.opener.SpellChecker;
|
||||
var i18n = SpellChecker.I18N;
|
||||
|
||||
var HTMLArea = window.opener.HTMLArea;
|
||||
var is_ie = HTMLArea.is_ie;
|
||||
var editor = SpellChecker.editor;
|
||||
var frame = null;
|
||||
var currentElement = null;
|
||||
var wrongWords = null;
|
||||
var modified = false;
|
||||
var allWords = {};
|
||||
var fixedWords = [];
|
||||
var suggested_words = {};
|
||||
|
||||
function makeCleanDoc(leaveFixed) {
|
||||
// document.getElementById("status").innerHTML = 'Please wait: rendering valid HTML';
|
||||
var words = wrongWords.concat(fixedWords);
|
||||
for (var i = words.length; --i >= 0;) {
|
||||
var el = words[i];
|
||||
if (!(leaveFixed && /HA-spellcheck-fixed/.test(el.className))) {
|
||||
el.parentNode.insertBefore(el.firstChild, el);
|
||||
el.parentNode.removeChild(el);
|
||||
} else
|
||||
el.className = "HA-spellcheck-fixed";
|
||||
}
|
||||
// we should use innerHTML here, but IE6's implementation fucks up the
|
||||
// HTML to such extent that our poor Perl parser doesn't understand it
|
||||
// anymore.
|
||||
return window.opener.HTMLArea.getHTML(frame.contentWindow.document.body, false, editor);
|
||||
};
|
||||
|
||||
function recheckClicked() {
|
||||
document.getElementById("status").innerHTML = i18n["Please wait: changing dictionary to"] + ': "' + document.getElementById("f_dictionary").value + '".';
|
||||
var field = document.getElementById("f_content");
|
||||
field.value = makeCleanDoc(true);
|
||||
field.form.submit();
|
||||
};
|
||||
|
||||
function saveClicked() {
|
||||
if (modified) {
|
||||
editor.setHTML(makeCleanDoc(false));
|
||||
}
|
||||
window.close();
|
||||
return false;
|
||||
};
|
||||
|
||||
function cancelClicked() {
|
||||
var ok = true;
|
||||
if (modified) {
|
||||
ok = confirm(i18n["QUIT_CONFIRMATION"]);
|
||||
}
|
||||
if (ok) {
|
||||
window.close();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
function replaceWord(el) {
|
||||
var replacement = document.getElementById("v_replacement").value;
|
||||
var this_word_modified = (el.innerHTML != replacement);
|
||||
if (this_word_modified)
|
||||
modified = true;
|
||||
if (el) {
|
||||
el.className = el.className.replace(/\s*HA-spellcheck-(hover|fixed)\s*/g, " ");
|
||||
}
|
||||
el.className += " HA-spellcheck-fixed";
|
||||
el.__msh_fixed = true;
|
||||
if (!this_word_modified) {
|
||||
return false;
|
||||
}
|
||||
el.innerHTML = replacement;
|
||||
};
|
||||
|
||||
function replaceClicked() {
|
||||
replaceWord(currentElement);
|
||||
var start = currentElement.__msh_id;
|
||||
var index = start;
|
||||
do {
|
||||
++index;
|
||||
if (index == wrongWords.length) {
|
||||
index = 0;
|
||||
}
|
||||
} while ((index != start) && wrongWords[index].__msh_fixed);
|
||||
if (index == start) {
|
||||
index = 0;
|
||||
alert(i18n["Finished list of mispelled words"]);
|
||||
}
|
||||
wrongWords[index].__msh_wordClicked(true);
|
||||
return false;
|
||||
};
|
||||
|
||||
function revertClicked() {
|
||||
document.getElementById("v_replacement").value = currentElement.__msh_origWord;
|
||||
replaceWord(currentElement);
|
||||
currentElement.className = "HA-spellcheck-error HA-spellcheck-current";
|
||||
return false;
|
||||
};
|
||||
|
||||
function replaceAllClicked() {
|
||||
var replacement = document.getElementById("v_replacement").value;
|
||||
var ok = true;
|
||||
var spans = allWords[currentElement.__msh_origWord];
|
||||
if (spans.length == 0) {
|
||||
alert("An impossible condition just happened. Call FBI. ;-)");
|
||||
} else if (spans.length == 1) {
|
||||
replaceClicked();
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
var message = "The word \"" + currentElement.__msh_origWord + "\" occurs " + spans.length + " times.\n";
|
||||
if (replacement == currentElement.__msh_origWord) {
|
||||
ok = confirm(message + "Ignore all occurrences?");
|
||||
} else {
|
||||
ok = confirm(message + "Replace all occurrences with \"" + replacement + "\"?");
|
||||
}
|
||||
*/
|
||||
if (ok) {
|
||||
for (var i = 0; i < spans.length; ++i) {
|
||||
if (spans[i] != currentElement) {
|
||||
replaceWord(spans[i]);
|
||||
}
|
||||
}
|
||||
// replace current element the last, so that we jump to the next word ;-)
|
||||
replaceClicked();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
function ignoreClicked() {
|
||||
document.getElementById("v_replacement").value = currentElement.__msh_origWord;
|
||||
replaceClicked();
|
||||
return false;
|
||||
};
|
||||
|
||||
function ignoreAllClicked() {
|
||||
document.getElementById("v_replacement").value = currentElement.__msh_origWord;
|
||||
replaceAllClicked();
|
||||
return false;
|
||||
};
|
||||
|
||||
function learnClicked() {
|
||||
alert("Not [yet] implemented");
|
||||
return false;
|
||||
};
|
||||
|
||||
function internationalizeWindow() {
|
||||
var types = ["div", "span", "button"];
|
||||
for (var i = 0; i < types.length; ++i) {
|
||||
var tag = types[i];
|
||||
var els = document.getElementsByTagName(tag);
|
||||
for (var j = els.length; --j >= 0;) {
|
||||
var el = els[j];
|
||||
if (el.childNodes.length == 1 && /\S/.test(el.innerHTML)) {
|
||||
var txt = el.innerHTML;
|
||||
if (typeof i18n[txt] != "undefined") {
|
||||
el.innerHTML = i18n[txt];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function initDocument() {
|
||||
internationalizeWindow();
|
||||
modified = false;
|
||||
frame = document.getElementById("i_framecontent");
|
||||
var field = document.getElementById("f_content");
|
||||
field.value = HTMLArea.getHTML(editor._doc.body, false, editor);
|
||||
field.form.submit();
|
||||
document.getElementById("f_init").value = "0";
|
||||
|
||||
// assign some global event handlers
|
||||
|
||||
var select = document.getElementById("v_suggestions");
|
||||
select.onchange = function() {
|
||||
document.getElementById("v_replacement").value = this.value;
|
||||
};
|
||||
if (is_ie) {
|
||||
select.attachEvent("ondblclick", replaceClicked);
|
||||
} else {
|
||||
select.addEventListener("dblclick", replaceClicked, true);
|
||||
}
|
||||
|
||||
document.getElementById("b_replace").onclick = replaceClicked;
|
||||
// document.getElementById("b_learn").onclick = learnClicked;
|
||||
document.getElementById("b_replall").onclick = replaceAllClicked;
|
||||
document.getElementById("b_ignore").onclick = ignoreClicked;
|
||||
document.getElementById("b_ignall").onclick = ignoreAllClicked;
|
||||
document.getElementById("b_recheck").onclick = recheckClicked;
|
||||
document.getElementById("b_revert").onclick = revertClicked;
|
||||
document.getElementById("b_info").onclick = displayInfo;
|
||||
|
||||
document.getElementById("b_ok").onclick = saveClicked;
|
||||
document.getElementById("b_cancel").onclick = cancelClicked;
|
||||
|
||||
select = document.getElementById("v_dictionaries");
|
||||
select.onchange = function() {
|
||||
document.getElementById("f_dictionary").value = this.value;
|
||||
};
|
||||
};
|
||||
|
||||
function getAbsolutePos(el) {
|
||||
var r = { x: el.offsetLeft, y: el.offsetTop };
|
||||
if (el.offsetParent) {
|
||||
var tmp = getAbsolutePos(el.offsetParent);
|
||||
r.x += tmp.x;
|
||||
r.y += tmp.y;
|
||||
}
|
||||
return r;
|
||||
};
|
||||
|
||||
function wordClicked(scroll) {
|
||||
var self = this;
|
||||
if (scroll) (function() {
|
||||
var pos = getAbsolutePos(self);
|
||||
var ws = { x: frame.offsetWidth - 4,
|
||||
y: frame.offsetHeight - 4 };
|
||||
var wp = { x: frame.contentWindow.document.body.scrollLeft,
|
||||
y: frame.contentWindow.document.body.scrollTop };
|
||||
pos.x -= Math.round(ws.x/2);
|
||||
if (pos.x < 0) pos.x = 0;
|
||||
pos.y -= Math.round(ws.y/2);
|
||||
if (pos.y < 0) pos.y = 0;
|
||||
frame.contentWindow.scrollTo(pos.x, pos.y);
|
||||
})();
|
||||
if (currentElement) {
|
||||
var a = allWords[currentElement.__msh_origWord];
|
||||
currentElement.className = currentElement.className.replace(/\s*HA-spellcheck-current\s*/g, " ");
|
||||
for (var i = 0; i < a.length; ++i) {
|
||||
var el = a[i];
|
||||
if (el != currentElement) {
|
||||
el.className = el.className.replace(/\s*HA-spellcheck-same\s*/g, " ");
|
||||
}
|
||||
}
|
||||
}
|
||||
currentElement = this;
|
||||
this.className += " HA-spellcheck-current";
|
||||
var a = allWords[currentElement.__msh_origWord];
|
||||
for (var i = 0; i < a.length; ++i) {
|
||||
var el = a[i];
|
||||
if (el != currentElement) {
|
||||
el.className += " HA-spellcheck-same";
|
||||
}
|
||||
}
|
||||
// document.getElementById("b_replall").disabled = (a.length <= 1);
|
||||
// document.getElementById("b_ignall").disabled = (a.length <= 1);
|
||||
var txt;
|
||||
if (a.length == 1) {
|
||||
txt = "one occurrence";
|
||||
} else if (a.length == 2) {
|
||||
txt = "two occurrences";
|
||||
} else {
|
||||
txt = a.length + " occurrences";
|
||||
}
|
||||
var suggestions = suggested_words[this.__msh_origWord];
|
||||
if (suggestions)
|
||||
suggestions = suggestions.split(/,/);
|
||||
else
|
||||
suggestions = [];
|
||||
var select = document.getElementById("v_suggestions");
|
||||
document.getElementById("statusbar").innerHTML = "Found " + txt +
|
||||
' for word "<b>' + currentElement.__msh_origWord + '</b>"';
|
||||
for (var i = select.length; --i >= 0;) {
|
||||
select.remove(i);
|
||||
}
|
||||
for (var i = 0; i < suggestions.length; ++i) {
|
||||
var txt = suggestions[i];
|
||||
var option = document.createElement("option");
|
||||
option.value = txt;
|
||||
option.appendChild(document.createTextNode(txt));
|
||||
select.appendChild(option);
|
||||
}
|
||||
document.getElementById("v_currentWord").innerHTML = this.__msh_origWord;
|
||||
if (suggestions.length > 0) {
|
||||
select.selectedIndex = 0;
|
||||
select.onchange();
|
||||
} else {
|
||||
document.getElementById("v_replacement").value = this.innerHTML;
|
||||
}
|
||||
select.style.display = "none";
|
||||
select.style.display = "block";
|
||||
return false;
|
||||
};
|
||||
|
||||
function wordMouseOver() {
|
||||
this.className += " HA-spellcheck-hover";
|
||||
};
|
||||
|
||||
function wordMouseOut() {
|
||||
this.className = this.className.replace(/\s*HA-spellcheck-hover\s*/g, " ");
|
||||
};
|
||||
|
||||
function displayInfo() {
|
||||
var info = frame.contentWindow.spellcheck_info;
|
||||
if (!info)
|
||||
alert("No information available");
|
||||
else {
|
||||
var txt = "** Document information **";
|
||||
for (var i in info) {
|
||||
txt += "\n" + i + " : " + info[i];
|
||||
}
|
||||
alert(txt);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
function finishedSpellChecking() {
|
||||
// initialization of global variables
|
||||
currentElement = null;
|
||||
wrongWords = null;
|
||||
allWords = {};
|
||||
fixedWords = [];
|
||||
suggested_words = frame.contentWindow.suggested_words;
|
||||
|
||||
document.getElementById("status").innerHTML = "HTMLArea Spell Checker (<a href='readme-tech.html' target='_blank' title='Technical information'>info</a>)";
|
||||
var doc = frame.contentWindow.document;
|
||||
var spans = doc.getElementsByTagName("span");
|
||||
var sps = [];
|
||||
var id = 0;
|
||||
for (var i = 0; i < spans.length; ++i) {
|
||||
var el = spans[i];
|
||||
if (/HA-spellcheck-error/.test(el.className)) {
|
||||
sps.push(el);
|
||||
el.__msh_wordClicked = wordClicked;
|
||||
el.onclick = function(ev) {
|
||||
ev || (ev = window.event);
|
||||
ev && HTMLArea._stopEvent(ev);
|
||||
return this.__msh_wordClicked(false);
|
||||
};
|
||||
el.onmouseover = wordMouseOver;
|
||||
el.onmouseout = wordMouseOut;
|
||||
el.__msh_id = id++;
|
||||
var txt = (el.__msh_origWord = el.firstChild.data);
|
||||
el.__msh_fixed = false;
|
||||
if (typeof allWords[txt] == "undefined") {
|
||||
allWords[txt] = [el];
|
||||
} else {
|
||||
allWords[txt].push(el);
|
||||
}
|
||||
} else if (/HA-spellcheck-fixed/.test(el.className)) {
|
||||
fixedWords.push(el);
|
||||
}
|
||||
}
|
||||
wrongWords = sps;
|
||||
if (sps.length == 0) {
|
||||
if (!modified) {
|
||||
alert(i18n["NO_ERRORS_CLOSING"]);
|
||||
window.close();
|
||||
} else {
|
||||
alert(i18n["NO_ERRORS"]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
(currentElement = sps[0]).__msh_wordClicked(true);
|
||||
var as = doc.getElementsByTagName("a");
|
||||
for (var i = as.length; --i >= 0;) {
|
||||
var a = as[i];
|
||||
a.onclick = function() {
|
||||
if (confirm(i18n["CONFIRM_LINK_CLICK"] + ":\n" +
|
||||
this.href + "\n" + i18n["I will open it in a new page."])) {
|
||||
window.open(this.href);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
var dicts = doc.getElementById("HA-spellcheck-dictionaries");
|
||||
if (dicts) {
|
||||
dicts.parentNode.removeChild(dicts);
|
||||
dicts = dicts.innerHTML.split(/,/);
|
||||
var select = document.getElementById("v_dictionaries");
|
||||
for (var i = select.length; --i >= 0;) {
|
||||
select.remove(i);
|
||||
}
|
||||
for (var i = 0; i < dicts.length; ++i) {
|
||||
var txt = dicts[i];
|
||||
var option = document.createElement("option");
|
||||
if (/^@(.*)$/.test(txt)) {
|
||||
txt = RegExp.$1;
|
||||
option.selected = true;
|
||||
}
|
||||
option.value = txt;
|
||||
option.appendChild(document.createTextNode(txt));
|
||||
select.appendChild(option);
|
||||
}
|
||||
}
|
||||
};
|
||||
79
htmlarea/plugins/SpellChecker/spell-checker.js
Normal file
@@ -0,0 +1,79 @@
|
||||
// Spell Checker Plugin for HTMLArea-3.0
|
||||
// Sponsored by www.americanbible.org
|
||||
// Implementation by Mihai Bazon, http://dynarch.com/mishoo/
|
||||
//
|
||||
// (c) dynarch.com 2003-2005.
|
||||
// Distributed under the same terms as HTMLArea itself.
|
||||
// This notice MUST stay intact for use (see license.txt).
|
||||
//
|
||||
// $Id$
|
||||
|
||||
function SpellChecker(editor) {
|
||||
this.editor = editor;
|
||||
|
||||
var cfg = editor.config;
|
||||
var tt = SpellChecker.I18N;
|
||||
var bl = SpellChecker.btnList;
|
||||
var self = this;
|
||||
|
||||
// register the toolbar buttons provided by this plugin
|
||||
var toolbar = [];
|
||||
for (var i = 0; i < bl.length; ++i) {
|
||||
var btn = bl[i];
|
||||
if (!btn) {
|
||||
toolbar.push("separator");
|
||||
} else {
|
||||
var id = "SC-" + btn[0];
|
||||
cfg.registerButton(id, tt[id], editor.imgURL(btn[0] + ".gif", "SpellChecker"), false,
|
||||
function(editor, id) {
|
||||
// dispatch button press event
|
||||
self.buttonPress(editor, id);
|
||||
}, btn[1]);
|
||||
toolbar.push(id);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < toolbar.length; ++i) {
|
||||
cfg.toolbar[0].push(toolbar[i]);
|
||||
}
|
||||
};
|
||||
|
||||
SpellChecker._pluginInfo = {
|
||||
name : "SpellChecker",
|
||||
version : "1.0",
|
||||
developer : "Mihai Bazon",
|
||||
developer_url : "http://dynarch.com/mishoo/",
|
||||
c_owner : "Mihai Bazon",
|
||||
sponsor : "American Bible Society",
|
||||
sponsor_url : "http://www.americanbible.org",
|
||||
license : "htmlArea"
|
||||
};
|
||||
|
||||
SpellChecker.btnList = [
|
||||
null, // separator
|
||||
["spell-check"]
|
||||
];
|
||||
|
||||
SpellChecker.prototype.buttonPress = function(editor, id) {
|
||||
switch (id) {
|
||||
case "SC-spell-check":
|
||||
SpellChecker.editor = editor;
|
||||
SpellChecker.init = true;
|
||||
var uiurl = _editor_url + "plugins/SpellChecker/spell-check-ui.html";
|
||||
var win;
|
||||
if (HTMLArea.is_ie) {
|
||||
win = window.open(uiurl, "SC_spell_checker",
|
||||
"toolbar=no,location=no,directories=no,status=no,menubar=no," +
|
||||
"scrollbars=no,resizable=yes,width=600,height=450");
|
||||
} else {
|
||||
win = window.open(uiurl, "SC_spell_checker",
|
||||
"toolbar=no,menubar=no,personalbar=no,width=600,height=450," +
|
||||
"scrollbars=no,resizable=yes");
|
||||
}
|
||||
win.focus();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
// this needs to be global, it's accessed from spell-check-ui.html
|
||||
SpellChecker.editor = null;
|
||||
BIN
htmlarea/plugins/TableOperations/img/cell-delete.gif
Normal file
|
After Width: | Height: | Size: 101 B |
BIN
htmlarea/plugins/TableOperations/img/cell-insert-after.gif
Normal file
|
After Width: | Height: | Size: 118 B |
BIN
htmlarea/plugins/TableOperations/img/cell-insert-before.gif
Normal file
|
After Width: | Height: | Size: 118 B |
BIN
htmlarea/plugins/TableOperations/img/cell-merge.gif
Normal file
|
After Width: | Height: | Size: 896 B |
BIN
htmlarea/plugins/TableOperations/img/cell-prop.gif
Normal file
|
After Width: | Height: | Size: 155 B |
BIN
htmlarea/plugins/TableOperations/img/cell-split.gif
Normal file
|
After Width: | Height: | Size: 907 B |
BIN
htmlarea/plugins/TableOperations/img/col-delete.gif
Normal file
|
After Width: | Height: | Size: 100 B |
BIN
htmlarea/plugins/TableOperations/img/col-insert-after.gif
Normal file
|
After Width: | Height: | Size: 111 B |
BIN
htmlarea/plugins/TableOperations/img/col-insert-before.gif
Normal file
|
After Width: | Height: | Size: 110 B |
BIN
htmlarea/plugins/TableOperations/img/col-split.gif
Normal file
|
After Width: | Height: | Size: 908 B |
BIN
htmlarea/plugins/TableOperations/img/row-delete.gif
Normal file
|
After Width: | Height: | Size: 104 B |
BIN
htmlarea/plugins/TableOperations/img/row-insert-above.gif
Normal file
|
After Width: | Height: | Size: 116 B |
BIN
htmlarea/plugins/TableOperations/img/row-insert-under.gif
Normal file
|
After Width: | Height: | Size: 115 B |
BIN
htmlarea/plugins/TableOperations/img/row-prop.gif
Normal file
|
After Width: | Height: | Size: 149 B |
BIN
htmlarea/plugins/TableOperations/img/row-split.gif
Normal file
|
After Width: | Height: | Size: 895 B |
BIN
htmlarea/plugins/TableOperations/img/table-prop.gif
Normal file
|
After Width: | Height: | Size: 145 B |
90
htmlarea/plugins/TableOperations/lang/cz.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// I18N constants
|
||||
|
||||
|
||||
|
||||
// LANG: "cz", ENCODING: UTF-8 | ISO-8859-2
|
||||
|
||||
// Author: Jiri Löw, <jirilow@jirilow.com>
|
||||
|
||||
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
|
||||
//
|
||||
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
|
||||
// (at least a valid email address)
|
||||
|
||||
//
|
||||
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
|
||||
// (if this is not possible, please include a comment
|
||||
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
|
||||
|
||||
TableOperations.I18N = {
|
||||
|
||||
"Align": "Zarovnání",
|
||||
|
||||
"All four sides": "Všechny čtyři strany",
|
||||
|
||||
"Background": "Pozadí",
|
||||
|
||||
"Baseline": "Základní linka",
|
||||
|
||||
"Border": "Obrys",
|
||||
|
||||
"Borders": "Obrysy",
|
||||
|
||||
"Bottom": "Dolů",
|
||||
|
||||
"CSS Style": "Kaskádové styly (CSS)",
|
||||
|
||||
"Caption": "Titulek",
|
||||
|
||||
"Cell Properties": "Vlastnosti buňky",
|
||||
|
||||
"Center": "Na střed",
|
||||
|
||||
"Char": "Znak",
|
||||
|
||||
"Collapsed borders": "Stlačené okraje",
|
||||
|
||||
"Color": "Barva",
|
||||
|
||||
"Description": "Popis",
|
||||
|
||||
"FG Color": "Barva popředí",
|
||||
|
||||
"Float": "Obtékání",
|
||||
|
||||
"Frames": "Rámečky",
|
||||
|
||||
"Height": "Výška",
|
||||
|
||||
"How many columns would you like to merge?": "Kolik sloupců si přejete spojit?",
|
||||
|
||||
"How many rows would you like to merge?": "Kolik řádků si přejete spojit?",
|
||||
|
||||
"Image URL": "Adresa obrázku",
|
||||
|
||||
"Justify": "Do stran",
|
||||
|
||||
"Layout": "Rozložení",
|
||||
|
||||
"Left": "Vlevo",
|
||||
|
||||
"Margin": "Okraj",
|
||||
|
||||
"Middle": "Na střed",
|
||||
|
||||
"No rules": "Žádné čáry",
|
||||
|
||||
"No sides": "Žádné strany",
|
||||
|
||||
"None": "Žádné",
|
||||
|
||||
90
htmlarea/plugins/TableOperations/lang/da.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "da", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Steen Sønderup, <steen@soenderup.com>
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
TableOperations.I18N = {
|
||||
"Align": "Placer",
|
||||
"All four sides": "Alle fire sider",
|
||||
"Background": "Baggrund",
|
||||
"Baseline": "Bundlinie",
|
||||
"Border": "Kant",
|
||||
"Borders": "Kanter",
|
||||
"Bottom": "Bund",
|
||||
"CSS Style": "Stil [CSS]",
|
||||
"Caption": "Titel",
|
||||
"Cell Properties": "Celle egenskaber",
|
||||
"Center": "Centrer",
|
||||
"Char": "Plads",
|
||||
"Collapsed borders": "Sammensmelt rammer",
|
||||
"Color": "Farve",
|
||||
"Description": "Beskrivelse",
|
||||
"FG Color": "Font farve",
|
||||
"Float": "Justering",
|
||||
"Frames": "Udvendig",
|
||||
"Height": "Højde",
|
||||
"How many columns would you like to merge?": "Hvor mange kollonner vil du samle?",
|
||||
"How many rows would you like to merge?": "Hvor mange rækker vil du samle?",
|
||||
"Image URL": "Billede URL",
|
||||
"Justify": "Lige margener",
|
||||
"Layout": "Opsætning",
|
||||
"Left": "Venstre",
|
||||
"Margin": "Margen",
|
||||
"Middle": "Centrer",
|
||||
"No rules": "Ingen rammer",
|
||||
"No sides": "Ingen sider",
|
||||
"None": "Ingen",
|
||||
"Padding": "Margen",
|
||||
"Please click into some cell": "Klik på en celle",
|
||||
"Right": "Højre",
|
||||
"Row Properties": "Række egenskaber",
|
||||
"Rules will appear between all rows and columns": "Rammer mellem rækker og kolonner",
|
||||
"Rules will appear between columns only": "Kun rammer mellem kolonner",
|
||||
"Rules will appear between rows only": "Kun rammer mellem rækker",
|
||||
"Rules": "Invendig",
|
||||
"Spacing and padding": "Afstand og margen",
|
||||
"Spacing": "Afstand",
|
||||
"Summary": "Beskrivelse",
|
||||
"TO-cell-delete": "Slet celle",
|
||||
"TO-cell-insert-after": "Indsæt celle efter",
|
||||
"TO-cell-insert-before": "Indsæt celle før",
|
||||
"TO-cell-merge": "Sammensæt celler",
|
||||
"TO-cell-prop": "Celle egenskaber",
|
||||
"TO-cell-split": "Opdel celle",
|
||||
"TO-col-delete": "Slet kollonne",
|
||||
"TO-col-insert-after": "Indsæt kolonne efter",
|
||||
"TO-col-insert-before": "Indsæt kolonne før",
|
||||
"TO-col-split": "Opdel kolonne",
|
||||
"TO-row-delete": "Slet række",
|
||||
"TO-row-insert-above": "Indsæt række før",
|
||||
"TO-row-insert-under": "Indsæt række efter",
|
||||
"TO-row-prop": "Række egenskaber",
|
||||
"TO-row-split": "Opdel række",
|
||||
"TO-table-prop": "Tabel egenskaber",
|
||||
"Table Properties": "Tabel egenskaber",
|
||||
"Text align": "Tekst",
|
||||
"The bottom side only": "Kun i bunden",
|
||||
"The left-hand side only": "Kun i højre side",
|
||||
"The right and left sides only": "Kun i siderne",
|
||||
"The right-hand side only": "Kun i venstre side",
|
||||
"The top and bottom sides only": "Kun i top og bund",
|
||||
"The top side only": "Kun i toppen",
|
||||
"Top": "Top",
|
||||
"Unset color": "Farve ikke valgt",
|
||||
"Vertical align": "Vertikal placering",
|
||||
"Width": "Bredde",
|
||||
"not-del-last-cell": "Du kan ikke slette den sidste celle i en række.",
|
||||
"not-del-last-col": "Du kan ikke slette den sidste kolonne i en tabel.",
|
||||
"not-del-last-row": "Du kan ikke slette den sidste række i en tabel.",
|
||||
"percent": "procent",
|
||||
"pixels": "pixel"
|
||||
};
|
||||
81
htmlarea/plugins/TableOperations/lang/de.js
Normal file
@@ -0,0 +1,81 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "de", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: broxx, <broxx@broxx.com>
|
||||
|
||||
TableOperations.I18N = {
|
||||
"Align": "Ausrichten",
|
||||
"All four sides": "Alle 4 Seiten",
|
||||
"Background": "Hintergrund",
|
||||
"Baseline": "Basislinie",
|
||||
"Border": "Rand",
|
||||
"Borders": "Raender",
|
||||
"Bottom": "Unten",
|
||||
"CSS Style": "Style [CSS]",
|
||||
"Caption": "Ueberschrift",
|
||||
"Cell Properties": "Zellen",
|
||||
"Center": "Zentrieren",
|
||||
"Char": "Zeichen",
|
||||
"Collapsed borders": "Collapsed borders",
|
||||
"Color": "Farbe",
|
||||
"Description": "Beschreibung",
|
||||
"FG Color": "FG Farbe",
|
||||
"Float": "Ausrichtung",
|
||||
"Frames": "Rahmen",
|
||||
"Height": "Hoehe",
|
||||
"How many columns would you like to merge?": "Wieviele Spalten willst du verbinden?",
|
||||
"How many rows would you like to merge?": "Wieviele Zeilen willst du verbinden?",
|
||||
"Image URL": "Bild URL",
|
||||
"Justify": "Justieren",
|
||||
"Layout": "Layout",
|
||||
"Left": "Links",
|
||||
"Margin": "Rand",
|
||||
"Middle": "Mitte",
|
||||
"No rules": "Keine Balken",
|
||||
"No sides": "Keine Seiten",
|
||||
"None": "Keine",
|
||||
"Padding": "Auffuellung",
|
||||
"Please click into some cell": "Waehle eine Zelle",
|
||||
"Right": "Rechts",
|
||||
"Row Properties": "Reihen",
|
||||
"Rules will appear between all rows and columns": "Balken zwischen Reihen und Spalten",
|
||||
"Rules will appear between columns only": "Balken zwischen Spalten",
|
||||
"Rules will appear between rows only": "Balken zwischen Reihen",
|
||||
"Rules": "Balken",
|
||||
"Spacing and padding": "Abstaende",
|
||||
"Spacing": "Abstand",
|
||||
"Summary": "Zusammenfassung",
|
||||
"TO-cell-delete": "Zelle loeschen",
|
||||
"TO-cell-insert-after": "Zelle einfuegen nach",
|
||||
"TO-cell-insert-before": "Zelle einfuegen bevor",
|
||||
"TO-cell-merge": "Zellen zusammenfuegen",
|
||||
"TO-cell-prop": "Zelleinstellungen",
|
||||
"TO-cell-split": "Zellen aufteilen",
|
||||
"TO-col-delete": "Spalte loeschen",
|
||||
"TO-col-insert-after": "Spalte einfuegen nach",
|
||||
"TO-col-insert-before": "Spalte einfuegen bevor",
|
||||
"TO-col-split": "Spalte aufteilen",
|
||||
"TO-row-delete": "Reihe loeschen",
|
||||
"TO-row-insert-above": "Reihe einfuegen vor",
|
||||
"TO-row-insert-under": "Reihe einfuegen nach",
|
||||
"TO-row-prop": "Reiheneinstellungen",
|
||||
"TO-row-split": "Reihen aufteilen",
|
||||
"TO-table-prop": "Tabelle",
|
||||
"Table Properties": "Tabelle",
|
||||
"Text align": "Ausrichtung",
|
||||
"The bottom side only": "Nur untere Seite",
|
||||
"The left-hand side only": "Nur linke Seite",
|
||||
"The right and left sides only": "Nur linke und rechte Seite",
|
||||
"The right-hand side only": "Nur rechte Seite",
|
||||
"The top and bottom sides only": "Nur obere und untere Seite",
|
||||
"The top side only": "Nur obere Seite",
|
||||
"Top": "Oben",
|
||||
"Unset color": "Farbe",
|
||||
"Vertical align": "Ausrichtung",
|
||||
"Width": "Breite",
|
||||
"not-del-last-cell": "Letzte Zelle in dieser Reihe!",
|
||||
"not-del-last-col": "Letzte Spalte in dieser Tabelle!",
|
||||
"not-del-last-row": "Letzte Reihe in dieser Tabelle",
|
||||
"percent": "%",
|
||||
"pixels": "pixels"
|
||||
};
|
||||
81
htmlarea/plugins/TableOperations/lang/el.js
Normal file
@@ -0,0 +1,81 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "el", ENCODING: UTF-8 | ISO-8859-7
|
||||
// Author: Dimitris Glezos, dimitris@glezos.com
|
||||
|
||||
TableOperations.I18N = {
|
||||
"Align": "Στοίχηση",
|
||||
"All four sides": "Και οι 4 πλευρές",
|
||||
"Background": "Φόντο",
|
||||
"Baseline": "Baseline",
|
||||
"Border": "Περίγραμμα",
|
||||
"Borders": "Περιγράμματα",
|
||||
"Bottom": "Κάτω μέρος",
|
||||
"CSS Style": "Στυλ [CSS]",
|
||||
"Caption": "Λεζάντα",
|
||||
"Cell Properties": "Ιδιότητες Κελιού",
|
||||
"Center": "Κέντρο",
|
||||
"Char": "Χαρακτήρας",
|
||||
"Collapsed borders": "Συμπτυγμένα περιγράμματα",
|
||||
"Color": "Χρώμα",
|
||||
"Description": "Περιγραφή",
|
||||
"FG Color": "Χρώμα αντικειμένων",
|
||||
"Float": "Float",
|
||||
"Frames": "Frames",
|
||||
"Height": "Ύψος",
|
||||
"How many columns would you like to merge?": "Πόσες στήλες θέλετε να ενώσετε;",
|
||||
"How many rows would you like to merge?": "Πόσες γραμμές θέλετε να ενώσετε;",
|
||||
"Image URL": "URL εικόνας",
|
||||
"Justify": "Πλήρης στοίχηση",
|
||||
"Layout": "Διάταξη",
|
||||
"Left": "Αριστερά",
|
||||
"Margin": "Περιθώριο",
|
||||
"Middle": "Κέντρο",
|
||||
"No rules": "Χωρίς Γραμμές",
|
||||
"No sides": "No sides",
|
||||
"None": "Τίποτα",
|
||||
"Padding": "Εσοχή",
|
||||
"Please click into some cell": "Κάντε κλικ μέσα σε κάποιο κελί",
|
||||
"Right": "Δεξιά",
|
||||
"Row Properties": "Ιδιότητες Γραμμής",
|
||||
"Rules will appear between all rows and columns": "Γραμμές θα εμφανίζονται μεταξύ όλων των γραμμών και στηλών",
|
||||
"Rules will appear between columns only": "Γραμμές θα εμφανίζονται μόνο μεταξύ στηλών",
|
||||
"Rules will appear between rows only": "Γραμμές θα εμφανίζονται μόνο μεταξύ γραμμών",
|
||||
"Rules": "Γραμμές",
|
||||
"Spacing and padding": "Αποστάσεις και εσοχές",
|
||||
"Spacing": "Αποστάσεις",
|
||||
"Summary": "Σύνοψη",
|
||||
"TO-cell-delete": "Διαγραφή κελιού",
|
||||
"TO-cell-insert-after": "Εισαγωγή κελιού μετά",
|
||||
"TO-cell-insert-before": "Εισαγωγή κελιού πριν",
|
||||
"TO-cell-merge": "Συγχώνευση κελιών",
|
||||
"TO-cell-prop": "Ιδιότητες κελιού",
|
||||
"TO-cell-split": "Διαίρεση κελιού",
|
||||
"TO-col-delete": "Διαγραφή στήλης",
|
||||
"TO-col-insert-after": "Εισαγωγή στήλης μετά",
|
||||
"TO-col-insert-before": "Εισαγωγή στήλης πριν",
|
||||
"TO-col-split": "Διαίρεση στήλης",
|
||||
"TO-row-delete": "Διαγραφή γραμμής",
|
||||
"TO-row-insert-above": "Εισαγωγή γραμμής μετά",
|
||||
"TO-row-insert-under": "Εισαγωγή γραμμής πριν",
|
||||
"TO-row-prop": "Ιδιότητες γραμμής",
|
||||
"TO-row-split": "Διαίρεση γραμμής",
|
||||
"TO-table-prop": "Ιδιότητες πίνακα",
|
||||
"Table Properties": "Ιδιότητες πίνακα",
|
||||
"Text align": "Στοίχηση κειμένου",
|
||||
"The bottom side only": "Η κάτω πλευρά μόνο",
|
||||
"The left-hand side only": "Η αριστερή πλευρά μόνο",
|
||||
"The right and left sides only": "Οι δεξιές και αριστερές πλευρές μόνο",
|
||||
"The right-hand side only": "Η δεξιά πλευρά μόνο",
|
||||
"The top and bottom sides only": "Οι πάνω και κάτω πλευρές μόνο",
|
||||
"The top side only": "Η πάνω πλευρά μόνο",
|
||||
"Top": "Πάνω",
|
||||
"Unset color": "Αναίρεση χρώματος",
|
||||
"Vertical align": "Κατακόρυφη στοίχηση",
|
||||
"Width": "Πλάτος",
|
||||
"not-del-last-cell": "Δεν μπορεί να διαγραφεί το τελευταίο κελί σε μια γραμμή.",
|
||||
"not-del-last-col": "Δεν μπορεί να διαγραφεί η τελευταία στήλη σε ένα πίνακα.",
|
||||
"not-del-last-row": "Δεν μπορεί να διαγραφεί η τελευταία γραμμή σε ένα πίνακα.",
|
||||
"percent": "τοις εκατόν",
|
||||
"pixels": "pixels"
|
||||
};
|
||||
90
htmlarea/plugins/TableOperations/lang/en.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
TableOperations.I18N = {
|
||||
"Align": "Align",
|
||||
"All four sides": "All four sides",
|
||||
"Background": "Background",
|
||||
"Baseline": "Baseline",
|
||||
"Border": "Border",
|
||||
"Borders": "Borders",
|
||||
"Bottom": "Bottom",
|
||||
"CSS Style": "Style [CSS]",
|
||||
"Caption": "Caption",
|
||||
"Cell Properties": "Cell Properties",
|
||||
"Center": "Center",
|
||||
"Char": "Char",
|
||||
"Collapsed borders": "Collapsed borders",
|
||||
"Color": "Color",
|
||||
"Description": "Description",
|
||||
"FG Color": "FG Color",
|
||||
"Float": "Float",
|
||||
"Frames": "Frames",
|
||||
"Height": "Height",
|
||||
"How many columns would you like to merge?": "How many columns would you like to merge?",
|
||||
"How many rows would you like to merge?": "How many rows would you like to merge?",
|
||||
"Image URL": "Image URL",
|
||||
"Justify": "Justify",
|
||||
"Layout": "Layout",
|
||||
"Left": "Left",
|
||||
"Margin": "Margin",
|
||||
"Middle": "Middle",
|
||||
"No rules": "No rules",
|
||||
"No sides": "No sides",
|
||||
"None": "None",
|
||||
"Padding": "Padding",
|
||||
"Please click into some cell": "Please click into some cell",
|
||||
"Right": "Right",
|
||||
"Row Properties": "Row Properties",
|
||||
"Rules will appear between all rows and columns": "Rules will appear between all rows and columns",
|
||||
"Rules will appear between columns only": "Rules will appear between columns only",
|
||||
"Rules will appear between rows only": "Rules will appear between rows only",
|
||||
"Rules": "Rules",
|
||||
"Spacing and padding": "Spacing and padding",
|
||||
"Spacing": "Spacing",
|
||||
"Summary": "Summary",
|
||||
"TO-cell-delete": "Delete cell",
|
||||
"TO-cell-insert-after": "Insert cell after",
|
||||
"TO-cell-insert-before": "Insert cell before",
|
||||
"TO-cell-merge": "Merge cells",
|
||||
"TO-cell-prop": "Cell properties",
|
||||
"TO-cell-split": "Split cell",
|
||||
"TO-col-delete": "Delete column",
|
||||
"TO-col-insert-after": "Insert column after",
|
||||
"TO-col-insert-before": "Insert column before",
|
||||
"TO-col-split": "Split column",
|
||||
"TO-row-delete": "Delete row",
|
||||
"TO-row-insert-above": "Insert row before",
|
||||
"TO-row-insert-under": "Insert row after",
|
||||
"TO-row-prop": "Row properties",
|
||||
"TO-row-split": "Split row",
|
||||
"TO-table-prop": "Table properties",
|
||||
"Table Properties": "Table Properties",
|
||||
"Text align": "Text align",
|
||||
"The bottom side only": "The bottom side only",
|
||||
"The left-hand side only": "The left-hand side only",
|
||||
"The right and left sides only": "The right and left sides only",
|
||||
"The right-hand side only": "The right-hand side only",
|
||||
"The top and bottom sides only": "The top and bottom sides only",
|
||||
"The top side only": "The top side only",
|
||||
"Top": "Top",
|
||||
"Unset color": "Unset color",
|
||||
"Vertical align": "Vertical align",
|
||||
"Width": "Width",
|
||||
"not-del-last-cell": "HTMLArea cowardly refuses to delete the last cell in row.",
|
||||
"not-del-last-col": "HTMLArea cowardly refuses to delete the last column in table.",
|
||||
"not-del-last-row": "HTMLArea cowardly refuses to delete the last row in table.",
|
||||
"percent": "percent",
|
||||
"pixels": "pixels"
|
||||
};
|
||||
66
htmlarea/plugins/TableOperations/lang/fi.js
Normal file
@@ -0,0 +1,66 @@
|
||||
TableOperations.I18N = {
|
||||
"Align": "Kohdistus",
|
||||
"All four sides": "Kaikki nelj<6C> sivua",
|
||||
"Background": "Tausta",
|
||||
"Baseline": "Takaraja",
|
||||
"Border": "Reuna",
|
||||
"Borders": "Reunat",
|
||||
"Bottom": "Alle",
|
||||
"CSS Style": "Tyyli [CSS]",
|
||||
"Caption": "Otsikko",
|
||||
"Cell Properties": "Solun asetukset",
|
||||
"Center": "Keskelle",
|
||||
"Char": "Merkki",
|
||||
"Collapsed borders": "Luhistetut reunat",
|
||||
"Color": "V<>ri",
|
||||
"Description": "Kuvaus",
|
||||
"FG Color": "FG V<>ri",
|
||||
"Frames": "Kehykset",
|
||||
"Image URL": "Kuvan osoite",
|
||||
"Layout": "Sommittelu",
|
||||
"Left": "Vasen",
|
||||
"Margin": "Marginaali",
|
||||
"Middle": "Keskelle",
|
||||
"No rules": "Ei viivoja",
|
||||
"No sides": "Ei sivuja",
|
||||
"Padding": "Palstant<6E>yte",
|
||||
"Right": "Oikea",
|
||||
"Row Properties": "Rivin asetukset",
|
||||
"Rules will appear between all rows and columns": "Viivat jokaisen rivin ja sarakkeen v<>lill<6C>",
|
||||
"Rules will appear between columns only": "Viivat ainoastaan sarakkeiden v<>lill<6C>",
|
||||
"Rules will appear between rows only": "Viivat ainoastaan rivien v<>lill<6C>",
|
||||
"Rules": "Viivat",
|
||||
"Spacing": "Palstatila",
|
||||
"Summary": "Yhteenveto",
|
||||
"TO-cell-delete": "Poista solu",
|
||||
"TO-cell-insert-after": "Lis<69><73> solu per<65><72>n",
|
||||
"TO-cell-insert-before": "Lis<69><73> solu ennen",
|
||||
"TO-cell-merge": "Yhdist<73> solut",
|
||||
"TO-cell-prop": "Solun asetukset",
|
||||
"TO-cell-split": "Jaa solu",
|
||||
"TO-col-delete": "Poista sarake",
|
||||
"TO-col-insert-after": "Lis<69><73> sarake per<65><72>n",
|
||||
"TO-col-insert-before": "Lis<69><73> sarake ennen",
|
||||
"TO-col-split": "Jaa sarake",
|
||||
"TO-row-delete": "Poista rivi",
|
||||
"TO-row-insert-above": "Lis<69><73> rivi yl<79>puolelle",
|
||||
"TO-row-insert-under": "Lis<69><73> rivi alapuolelle",
|
||||
"TO-row-prop": "Rivin asetukset",
|
||||
"TO-row-split": "Jaa rivi",
|
||||
"TO-table-prop": "Taulukon asetukset",
|
||||
"Top": "Yl<59>s",
|
||||
"Table Properties": "Taulukon asetukset",
|
||||
"The bottom side only": "Ainoastaan alapuolelle",
|
||||
"The left-hand side only": "Ainoastaan vasenreuna",
|
||||
"The right and left sides only": "Oikea- ja vasenreuna",
|
||||
"The right-hand side only": "Ainoastaan oikeareuna",
|
||||
"The top and bottom sides only": "Yl<59>- ja alapuoli.",
|
||||
"The top side only": "Ainoastaan yl<79>puoli",
|
||||
"Vertical align": "Vertikaali kohdistus",
|
||||
"Width": "Leveys",
|
||||
"not-del-last-cell": "Ei voida poistaa viimeist<73> solua rivist<73>.",
|
||||
"not-del-last-col": "Ei voida poistaa viimeist<73> saraketta taulusta.",
|
||||
"not-del-last-row": "Ei voida poistaa viimeist<73> rivi<76> taulusta.",
|
||||
"percent": "prosenttia",
|
||||
"pixels": "pikseli<6C>"
|
||||
};
|
||||
90
htmlarea/plugins/TableOperations/lang/fr.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "fr", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Cédric Guillemette, http://www.ebdata.com
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
TableOperations.I18N = {
|
||||
"Align": "Aligner",
|
||||
"All four sides": "Quatre cotés",
|
||||
"Background": "Arrière plan",
|
||||
"Baseline": "Ligne de base",
|
||||
"Border": "Bordure",
|
||||
"Borders": "Bordures",
|
||||
"Bottom": "Bas",
|
||||
"CSS Style": "Style [CSS]",
|
||||
"Caption": "Étiquette",
|
||||
"Cell Properties": "Propriétés de cellule",
|
||||
"Center": "Centre",
|
||||
"Char": "Charactère",
|
||||
"Collapsed borders": "Bordure effondrés",
|
||||
"Color": "Couleur",
|
||||
"Description": "Description",
|
||||
"FG Color": "Couleur de face",
|
||||
"Float": "Flotteur",
|
||||
"Frames": "Vues",
|
||||
"Height": "Largeur",
|
||||
"How many columns would you like to merge?": "Combien de colonnes voulez-vous fusionner?",
|
||||
"How many rows would you like to merge?": "Combien de rangées voulez-vous fusionner?",
|
||||
"Image URL": "URL pour l'image",
|
||||
"Justify": "Justifié",
|
||||
"Layout": "Arrangement",
|
||||
"Left": "Gauche",
|
||||
"Margin": "Marge",
|
||||
"Middle": "Milieu",
|
||||
"No rules": "Aucun règlement",
|
||||
"No sides": "Aucun côtés",
|
||||
"None": "Aucun",
|
||||
"Padding": "Remplissage",
|
||||
"Please click into some cell": "Cliquer sur une cellule",
|
||||
"Right": "Droit",
|
||||
"Row Properties": "Propriétés de rangée",
|
||||
"Rules will appear between all rows and columns": "Les règles vont apparaître entre les rangées et les cellules",
|
||||
"Rules will appear between columns only": "Les règles vont apparaître entre les colonnes seulement",
|
||||
"Rules will appear between rows only": "Les règles vont apparaître entre les rangées seulement",
|
||||
"Rules": "Les règles",
|
||||
"Spacing and padding": "Espacement et remplissage",
|
||||
"Spacing": "Espacement",
|
||||
"Summary": "Sommaire",
|
||||
"TO-cell-delete": "Supprimer une cellule",
|
||||
"TO-cell-insert-after": "Insérer une cellule après",
|
||||
"TO-cell-insert-before": "Insérer une cellule avant",
|
||||
"TO-cell-merge": "Fusionner les cellules",
|
||||
"TO-cell-prop": "Cell properties",
|
||||
"TO-cell-split": "Diviser la cellule",
|
||||
"TO-col-delete": "Supprimer la colonne",
|
||||
"TO-col-insert-after": "Insérer une colonne après",
|
||||
"TO-col-insert-before": "Insérer une colonne avant",
|
||||
"TO-col-split": "Diviser une colonne",
|
||||
"TO-row-delete": "Supprimer une rangée",
|
||||
"TO-row-insert-above": "Insérer une rangée avant",
|
||||
"TO-row-insert-under": "Insérer une rangée après",
|
||||
"TO-row-prop": "Propriétés de rangée",
|
||||
"TO-row-split": "Diviser la rangée",
|
||||
"TO-table-prop": "Propriétés de table",
|
||||
"Table Properties": "Propriétés de table",
|
||||
"Text align": "Aligner le texte",
|
||||
"The bottom side only": "Côté du bas seulement",
|
||||
"The left-hand side only": "Côté gauche seulement",
|
||||
"The right and left sides only": "Côté gauche et droit seulement",
|
||||
"The right-hand side only": "Côté droit seulement",
|
||||
"The top and bottom sides only": "Côté haut et bas seulement",
|
||||
"The top side only": "Côté haut seulement",
|
||||
"Top": "Haut",
|
||||
"Unset color": "Enlever la couleur",
|
||||
"Vertical align": "Alignement vertical",
|
||||
"Width": "Longeur",
|
||||
"not-del-last-cell": "HTMLArea refuse de supprimer la dernière cellule de la rangée.",
|
||||
"not-del-last-col": "HTMLArea refuse de supprimer la dernière colonne de la table.",
|
||||
"not-del-last-row": "HTMLArea refuse de supprimer la dernière rangée de la table",
|
||||
"percent": "pourcentage",
|
||||
"pixels": "pixels"
|
||||
};
|
||||
90
htmlarea/plugins/TableOperations/lang/he.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// I18N constants
|
||||
|
||||
|
||||
|
||||
// LANG: "he", ENCODING: UTF-8
|
||||
|
||||
// Author: Liron Newman, http://www.eesh.net, <plastish at ultinet dot org>
|
||||
|
||||
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
|
||||
//
|
||||
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
|
||||
// (at least a valid email address)
|
||||
|
||||
//
|
||||
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
|
||||
// (if this is not possible, please include a comment
|
||||
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
|
||||
|
||||
TableOperations.I18N = {
|
||||
|
||||
"Align": "ישור",
|
||||
|
||||
"All four sides": "כל ארבעת הצדדים",
|
||||
|
||||
"Background": "רקע",
|
||||
|
||||
"Baseline": "קו בסיס",
|
||||
|
||||
"Border": "גבול",
|
||||
|
||||
"Borders": "גבולות",
|
||||
|
||||
"Bottom": "תחתון",
|
||||
|
||||
"CSS Style": "סגנון [CSS]",
|
||||
|
||||
"Caption": "כותרת",
|
||||
|
||||
"Cell Properties": "מאפייני תא",
|
||||
|
||||
"Center": "מרכז",
|
||||
|
||||
"Char": "תו",
|
||||
|
||||
"Collapsed borders": "גבולות קורסים",
|
||||
|
||||
"Color": "צבע",
|
||||
|
||||
"Description": "תיאור",
|
||||
|
||||
"FG Color": "צבע קידמה",
|
||||
|
||||
"Float": "מרחף",
|
||||
|
||||
"Frames": "מסגרות",
|
||||
|
||||
"Height": "גובה",
|
||||
|
||||
"How many columns would you like to merge?": "כמה טורים ברצונך למזג?",
|
||||
|
||||
"How many rows would you like to merge?": "כמה שורות ברצונך למזג?",
|
||||
|
||||
"Image URL": "URL התמונה",
|
||||
|
||||
"Justify": "ישור",
|
||||
|
||||
"Layout": "פריסה",
|
||||
|
||||
"Left": "שמאל",
|
||||
|
||||
"Margin": "שוליים",
|
||||
|
||||
"Middle": "אמצע",
|
||||
|
||||
"No rules": "ללא קווים",
|
||||
|
||||
"No sides": "ללא צדדים",
|
||||
|
||||
"None": "אין",
|
||||
|
||||
63
htmlarea/plugins/TableOperations/lang/hu.js
Normal file
@@ -0,0 +1,63 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "hu", ENCODING: UTF-8
|
||||
// Author: Miklós Somogyi, <somogyine@vnet.hu>
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
HTMLArea.I18N = {
|
||||
|
||||
// the following should be the filename without .js extension
|
||||
// it will be used for automatically load plugin language.
|
||||
lang: "hu",
|
||||
|
||||
tooltips: {
|
||||
bold: "Félkövér",
|
||||
italic: "Dőlt",
|
||||
underline: "Aláhúzott",
|
||||
strikethrough: "Áthúzott",
|
||||
subscript: "Alsó index",
|
||||
superscript: "Felső index",
|
||||
justifyleft: "Balra zárt",
|
||||
justifycenter: "Középre zárt",
|
||||
justifyright: "Jobbra zárt",
|
||||
justifyfull: "Sorkizárt",
|
||||
orderedlist: "Számozott lista",
|
||||
unorderedlist: "Számozatlan lista",
|
||||
outdent: "Behúzás csökkentése",
|
||||
indent: "Behúzás növelése",
|
||||
forecolor: "Karakterszín",
|
||||
hilitecolor: "Háttérszín",
|
||||
horizontalrule: "Elválasztó vonal",
|
||||
createlink: "Hiperhivatkozás beszúrása",
|
||||
insertimage: "Kép beszúrása",
|
||||
inserttable: "Táblázat beszúrása",
|
||||
htmlmode: "HTML forrás be/ki",
|
||||
popupeditor: "Szerkesztő külön ablakban",
|
||||
about: "Névjegy",
|
||||
showhelp: "Súgó",
|
||||
textindicator: "Aktuális stílus",
|
||||
undo: "Visszavonás",
|
||||
redo: "Újra végrehajtás",
|
||||
cut: "Kivágás",
|
||||
copy: "Másolás",
|
||||
paste: "Beillesztés"
|
||||
},
|
||||
|
||||
buttons: {
|
||||
"ok": "Rendben",
|
||||
"cancel": "Mégsem"
|
||||
},
|
||||
|
||||
msg: {
|
||||
"Path": "Hierarchia",
|
||||
"TEXT_MODE": "Forrás mód. Visszaváltás [<>] gomb"
|
||||
}
|
||||
};
|
||||
81
htmlarea/plugins/TableOperations/lang/it.js
Normal file
@@ -0,0 +1,81 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "it", ENCODING: UTF-8 | ISO-8859-1
|
||||
// Author: Fabio Rotondo <fabio@rotondo.it>
|
||||
|
||||
TableOperations.I18N = {
|
||||
"Align": "Allinea",
|
||||
"All four sides": "Tutti e quattro i lati",
|
||||
"Background": "Sfondo",
|
||||
"Baseline": "Allineamento",
|
||||
"Border": "Bordo",
|
||||
"Borders": "Bordi",
|
||||
"Bottom": "Basso",
|
||||
"CSS Style": "Stile [CSS]",
|
||||
"Caption": "Titolo",
|
||||
"Cell Properties": "Proprietà della Cella",
|
||||
"Center": "Centra",
|
||||
"Char": "Carattere",
|
||||
"Collapsed borders": "Bordi chiusi",
|
||||
"Color": "Colore",
|
||||
"Description": "Descrizione",
|
||||
"FG Color": "Colore Principale",
|
||||
"Float": "Fluttuante",
|
||||
"Frames": "Frames",
|
||||
"Height": "Altezza",
|
||||
"How many columns would you like to merge?": "Quante colonne vuoi unire?",
|
||||
"How many rows would you like to merge?": "Quante righe vuoi unire?",
|
||||
"Image URL": "URL dell'Immagine",
|
||||
"Justify": "Justifica",
|
||||
"Layout": "Layout",
|
||||
"Left": "Sinistra",
|
||||
"Margin": "Margine",
|
||||
"Middle": "Centrale",
|
||||
"No rules": "Nessun righello",
|
||||
"No sides": "Nessun lato",
|
||||
"None": "Nulla",
|
||||
"Padding": "Padding",
|
||||
"Please click into some cell": "Per favore, clicca in una cella",
|
||||
"Right": "Destra",
|
||||
"Row Properties": "Proprietà della Riga",
|
||||
"Rules will appear between all rows and columns": "Le linee appariranno tra tutte le righe e colonne",
|
||||
"Rules will appear between columns only": "Le linee appariranno solo tra le colonne",
|
||||
"Rules will appear between rows only": "Le linee appariranno solo tra le righe",
|
||||
"Rules": "Linee",
|
||||
"Spacing and padding": "Spaziatura e Padding",
|
||||
"Spacing": "Spaziatura",
|
||||
"Summary": "Sommario",
|
||||
"TO-cell-delete": "Cancella cella",
|
||||
"TO-cell-insert-after": "Inserisci cella dopo",
|
||||
"TO-cell-insert-before": "Inserisci cella prima",
|
||||
"TO-cell-merge": "Unisci celle",
|
||||
"TO-cell-prop": "Proprietà della cella",
|
||||
"TO-cell-split": "Dividi cella",
|
||||
"TO-col-delete": "Cancella colonna",
|
||||
"TO-col-insert-after": "Inserisci colonna dopo",
|
||||
"TO-col-insert-before": "Inserisci colonna prima",
|
||||
"TO-col-split": "Dividi colonna",
|
||||
"TO-row-delete": "Cancella riga",
|
||||
"TO-row-insert-above": "Inserisci riga prima",
|
||||
"TO-row-insert-under": "Inserisci riga dopo",
|
||||
"TO-row-prop": "Proprietà della riga",
|
||||
"TO-row-split": "Dividi riga",
|
||||
"TO-table-prop": "Proprietà della Tabella",
|
||||
"Table Properties": "Proprietà della Tabella",
|
||||
"Text align": "Allineamento del Testo",
|
||||
"The bottom side only": "Solo la parte inferiore",
|
||||
"The left-hand side only": "Solo la parte sinistra",
|
||||
"The right and left sides only": "Solo destra e sinistra",
|
||||
"The right-hand side only": "Solo la parte destra",
|
||||
"The top and bottom sides only": "Solo sopra e sotto",
|
||||
"The top side only": "Solo la parte sopra",
|
||||
"Top": "Alto",
|
||||
"Unset color": "Rimuovi colore",
|
||||
"Vertical align": "Allineamento verticale",
|
||||
"Width": "Larghezza",
|
||||
"not-del-last-cell": "HTMLArea si rifiuta codardamente di cancellare l'ultima cella nella riga.",
|
||||
"not-del-last-col": "HTMLArea si rifiuta codardamente di cancellare l'ultima colonna nella tabella.",
|
||||
"not-del-last-row": "HTMLArea si rifiuta codardamente di cancellare l'ultima riga nella tabella.",
|
||||
"percent": "percento",
|
||||
"pixels": "pixels"
|
||||
};
|
||||
90
htmlarea/plugins/TableOperations/lang/nl.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// I18N constants
|
||||
|
||||
|
||||
|
||||
// LANG: "nl", ENCODING: UTF-8 | ISO-8859-1
|
||||
|
||||
// Author: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl
|
||||
|
||||
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
|
||||
//
|
||||
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
|
||||
// (at least a valid email address)
|
||||
|
||||
//
|
||||
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
|
||||
// (if this is not possible, please include a comment
|
||||
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
|
||||
|
||||
TableOperations.I18N = {
|
||||
|
||||
"Align": "Uitlijning",
|
||||
|
||||
"All four sides": "Alle 4 zijden",
|
||||
|
||||
"Background": "Achtergrond",
|
||||
|
||||
"Baseline": "Basis",
|
||||
|
||||
"Border": "Rand",
|
||||
|
||||
"Borders": "Randen",
|
||||
|
||||
"Bottom": "Onder",
|
||||
|
||||
"CSS Style": "CSS Style",
|
||||
|
||||
"Caption": "Opmerking",
|
||||
|
||||
"Cell Properties": "Celeigenschappen",
|
||||
|
||||
"Center": "Centreren",
|
||||
|
||||
"Char": "Karakter",
|
||||
|
||||
"Collapsed borders": "Geen randen",
|
||||
|
||||
"Color": "Kleur",
|
||||
|
||||
"Description": "Omschrijving",
|
||||
|
||||
"FG Color": "Voorgrond",
|
||||
|
||||
"Float": "Zwevend",
|
||||
|
||||
"Frames": "Frames",
|
||||
|
||||
"Height": "Hoogte",
|
||||
|
||||
"How many columns would you like to merge?": "Hoeveel kolommen wilt u samenvoegen?",
|
||||
|
||||
"How many rows would you like to merge?": "Hoeveel rijen wilt u samenvoegen?",
|
||||
|
||||
"Image URL": "Afbeelding URL",
|
||||
|
||||
"Justify": "Uitvullen",
|
||||
|
||||
"Layout": "Opmaak",
|
||||
|
||||
"Left": "Links",
|
||||
|
||||
"Margin": "Marge",
|
||||
|
||||
"Middle": "Midden",
|
||||
|
||||
"No rules": "Geen regels",
|
||||
|
||||
"No sides": "Geen zijlijnen",
|
||||
|
||||
"None": "Geen",
|
||||
|
||||
91
htmlarea/plugins/TableOperations/lang/no.js
Normal file
@@ -0,0 +1,91 @@
|
||||
// I18N constants
|
||||
|
||||
|
||||
|
||||
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
|
||||
|
||||
// Author: Mihai Bazon, <mihai_bazon@yahoo.com>
|
||||
|
||||
// translated into Norwegia: ses@online.no 11.11.03
|
||||
|
||||
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
|
||||
//
|
||||
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
|
||||
// (at least a valid email address)
|
||||
|
||||
//
|
||||
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
|
||||
// (if this is not possible, please include a comment
|
||||
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
|
||||
|
||||
TableOperations.I18N = {
|
||||
|
||||
"Align": "Juster",
|
||||
|
||||
"All four sides": "Alle fire sider",
|
||||
|
||||
"Background": "Bakgrund",
|
||||
|
||||
"Baseline": "Grunnlinje",
|
||||
|
||||
"Border": "Kantlinje",
|
||||
|
||||
"Borders": "Kantlinjer",
|
||||
|
||||
"Bottom": "Bunn",
|
||||
|
||||
"CSS Style": "Stil [CSS]",
|
||||
|
||||
"Caption": "Overskrift",
|
||||
|
||||
"Cell Properties": "Celleegenskaper",
|
||||
|
||||
"Center": "Sentrer",
|
||||
|
||||
"Char": "Tegn",
|
||||
|
||||
"Collapsed borders": "Fjern kantlinjer",
|
||||
|
||||
"Color": "Farge",
|
||||
|
||||
"Description": "Beskrivelse",
|
||||
|
||||
"FG Color": "FG farge",
|
||||
|
||||
"Float": "Flytende",
|
||||
|
||||
"Frames": "rammer",
|
||||
|
||||
"Height": "H<>yde",
|
||||
|
||||
"How many columns would you like to merge?": "Hvor mange kolonner vil du sl<73> sammen?",
|
||||
|
||||
"How many rows would you like to merge?": "Hvor mange rader vil du sl<73> sammen?",
|
||||
|
||||
"Image URL": "Bildets URL",
|
||||
|
||||
"Justify": "Juster",
|
||||
|
||||
"Layout": "Layout",
|
||||
|
||||
"Left": "Venstre",
|
||||
|
||||
"Margin": "Marg",
|
||||
|
||||
"Middle": "Midten",
|
||||
|
||||
"No rules": "Ingen linjal",
|
||||
|
||||
"No sides": "Ingen sider",
|
||||
|
||||
"None": "Ingen",
|
||||
90
htmlarea/plugins/TableOperations/lang/ro.js
Normal file
@@ -0,0 +1,90 @@
|
||||
// I18N constants
|
||||
|
||||
// LANG: "ro", ENCODING: UTF-8
|
||||
// Author: Mihai Bazon, http://dynarch.com/mishoo
|
||||
|
||||
// FOR TRANSLATORS:
|
||||
//
|
||||
// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE
|
||||
// (at least a valid email address)
|
||||
//
|
||||
// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;
|
||||
// (if this is not possible, please include a comment
|
||||
// that states what encoding is necessary.)
|
||||
|
||||
TableOperations.I18N = {
|
||||
"Align": "Aliniere",
|
||||
"All four sides": "Toate părţile",
|
||||
"Background": "Fundal",
|
||||
"Baseline": "Baseline",
|
||||
"Border": "Chenar",
|
||||
"Borders": "Chenare",
|
||||
"Bottom": "Jos",
|
||||
"CSS Style": "Stil [CSS]",
|
||||
"Caption": "Titlu de tabel",
|
||||
"Cell Properties": "Proprietăţile celulei",
|
||||
"Center": "Centru",
|
||||
"Char": "Caracter",
|
||||
"Collapsed borders": "Chenare asimilate",
|
||||
"Color": "Culoare",
|
||||
"Description": "Descriere",
|
||||
"FG Color": "Culoare text",
|
||||
"Float": "Poziţie",
|
||||
"Frames": "Chenare",
|
||||
"Height": "Înălţimea",
|
||||
"How many columns would you like to merge?": "Câte coloane vrei să uneşti?",
|
||||
"How many rows would you like to merge?": "Câte linii vrei să uneşti?",
|
||||
"Image URL": "URL-ul imaginii",
|
||||
"Justify": "Justify",
|
||||
"Layout": "Aranjament",
|
||||
"Left": "Stânga",
|
||||
"Margin": "Margine",
|
||||
"Middle": "Mijloc",
|
||||
"No rules": "Fără linii",
|
||||
"No sides": "Fără părţi",
|
||||
"None": "Nimic",
|
||||
"Padding": "Spaţiere",
|
||||
"Please click into some cell": "Vă rog să daţi click într-o celulă",
|
||||
"Right": "Dreapta",
|
||||
"Row Properties": "Proprietăţile liniei",
|
||||
"Rules will appear between all rows and columns": "Vor apărea linii între toate rândurile şi coloanele",
|
||||
"Rules will appear between columns only": "Vor apărea doar linii verticale",
|
||||
"Rules will appear between rows only": "Vor apărea doar linii orizontale",
|
||||
"Rules": "Linii",
|
||||
"Spacing and padding": "Spaţierea",
|
||||
"Spacing": "Între celule",
|
||||
"Summary": "Sumar",
|
||||
"TO-cell-delete": "Şterge celula",
|
||||
"TO-cell-insert-after": "Inserează o celulă la dreapta",
|
||||
"TO-cell-insert-before": "Inserează o celulă la stânga",
|
||||
"TO-cell-merge": "Uneşte celulele",
|
||||
"TO-cell-prop": "Proprietăţile celulei",
|
||||
"TO-cell-split": "Împarte celula",
|
||||
"TO-col-delete": "Şterge coloana",
|
||||
"TO-col-insert-after": "Inserează o coloană la dreapta",
|
||||
"TO-col-insert-before": "Inserează o coloană la stânga",
|
||||
"TO-col-split": "Împarte coloana",
|
||||
"TO-row-delete": "Şterge rândul",
|
||||
"TO-row-insert-above": "Inserează un rând înainte",
|
||||
"TO-row-insert-under": "Inserează un rând după",
|
||||
"TO-row-prop": "Proprietăţile rândului",
|
||||
"TO-row-split": "Împarte rândul",
|
||||
"TO-table-prop": "Proprietăţile tabelei",
|
||||
"Table Properties": "Proprietăţile tabelei",
|
||||
"Text align": "Aliniere",
|
||||
"The bottom side only": "Doar partea de jos",
|
||||
"The left-hand side only": "Doar partea din stânga",
|
||||
"The right and left sides only": "Partea din stânga şi cea din dreapta",
|
||||
"The right-hand side only": "Doar partea din dreapta",
|
||||
"The top and bottom sides only": "Partea de sus si cea de jos",
|
||||
"The top side only": "Doar partea de sus",
|
||||
"Top": "Sus",
|
||||
"Unset color": "Dezactivează culoarea",
|
||||
"Vertical align": "Aliniere pe verticală",
|
||||
"Width": "Lăţime",
|
||||
"not-del-last-cell": "HTMLArea refuză cu laşitate să şteargă ultima celulă din rând.",
|
||||
"not-del-last-col": "HTMLArea refuză cu laşitate să şteargă ultima coloamă din tabela.",
|
||||
"not-del-last-row": "HTMLArea refuză cu laşitate să şteargă ultimul rând din tabela.",
|
||||
"percent": "procente",
|
||||
"pixels": "pixeli"
|
||||
};
|
||||