Import xinha so we can switch from htmlarea and fix a bunch of in-browser issues that htmlarea has

This commit is contained in:
Chris Morgan
2005-09-30 02:25:07 +00:00
committed by WineHQ
parent 2311d4d572
commit 9242a68c4a
375 changed files with 26623 additions and 0 deletions

149
xinha/plugins/CSS/css.js Normal file
View File

@@ -0,0 +1,149 @@
// 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
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
//
// $Id$
// @TODO This is the default and won't be very useful to others.
// We should make this better.
HTMLArea.Config.prototype.cssPluginConfig =
{
combos : [
{ label: "Syntax",
// menu text // CSS class
options: { "None" : "",
"Code" : "code",
"String" : "string",
"Comment" : "comment",
"Variable name" : "variable-name",
"Type" : "type",
"Reference" : "reference",
"Preprocessor" : "preprocessor",
"Keyword" : "keyword",
"Function name" : "function-name",
"Html tag" : "html-tag",
"Html italic" : "html-helper-italic",
"Warning" : "warning",
"Html bold" : "html-helper-bold"
},
context: "pre"
},
{ label: "Info",
options: { "None" : "",
"Quote" : "quote",
"Highlight" : "highlight",
"Deprecated" : "deprecated"
}
}
]
};
function CSS(editor, params) {
this.editor = editor;
var cfg = editor.config;
var self = this;
var plugin_config;
if(params && params.length)
{
plugin_config = params[0];
}
else
{
plugin_config = editor.config.cssPluginConfig;
}
var combos = plugin_config.combos;
for (var i = 0; i < combos.length; i++) {
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);
cfg.addToolbarElement(["T[" + combo.label + "]", id, "separator"] , "formatblock", -1);
}
};
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;
};

View File

@@ -0,0 +1,87 @@
// Charcounter for HTMLArea-3.0
// (c) Udo Schmal & L.N.Schaffrath NeueMedien
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
function CharCounter(editor) {
this.editor = editor;
};
CharCounter._pluginInfo = {
name : "CharCounter",
version : "1.0",
developer : "Udo Schmal",
developer_url : "http://www.schaffrath-neuemedien.de",
sponsor : "L.N.Schaffrath NeueMedien",
sponsor_url : "http://www.schaffrath-neuemedien.de",
c_owner : "Udo Schmal & L.N.Schaffrath NeueMedien",
license : "htmlArea"
};
CharCounter.prototype._lc = function(string) {
return HTMLArea._lc(string, "CharCounter");
};
CharCounter.prototype.onGenerate = function() {
var self = this;
var charCount = document.createElement("span");
charCount.style.padding = "2px 5px";
if(HTMLArea.is_ie) {
charCount.style.styleFloat = "right";
} else {
charCount.style.cssFloat = "right";
}
var brk = document.createElement('div');
brk.style.height =
brk.style.width =
brk.style.lineHeight =
brk.style.fontSize = '1px';
brk.style.clear = 'both';
if(HTMLArea.is_ie) {
this.editor._statusBarTree.style.styleFloat = "left";
} else {
this.editor._statusBarTree.style.cssFloat = "left";
}
this.editor._statusBar.appendChild(charCount);
this.editor._statusBar.appendChild(brk);
this.charCount = charCount;
};
CharCounter.prototype.onUpdateToolbar = function() {
this.updateCharCount();
}
CharCounter.prototype.onMode = function (mode)
{
//Hide Chars in statusbar when switching into textmode
switch (mode)
{
case "textmode":
this.charCount.style.display = "none";
break;
case "wysiwyg":
this.charCount.style.display = "";
break;
default:
alert("Mode <" + mode + "> not defined!");
return false;
}
}
CharCounter.prototype.updateCharCount = function(ev) {
editor = this.editor;
var contents = editor.getHTML();
contents = contents.replace(/<(.+?)>/g, '');//Don't count HTML tags
contents = contents.replace(/([\n\r\t])/g, ' ');//convert newlines and tabs into space
contents = contents.replace(/( +)/g, ' ');//count spaces only once
contents = contents.replace(/&(.*);/g, ' ');//Count htmlentities as one keystroke
contents = contents.replace(/^\s*|\s*$/g, '');//trim
// var words=0;
// for (var x=0;x<contents.length;x++) {
// if (contents.charAt(x) == " " ) {words++}
// }
// this.charCount.innerHTML = this._lc("Words") + ": " + words + " | " + this._lc("Chars") + ": " + contents.length;
this.charCount.innerHTML = this._lc("Chars") + ": " + contents.length;
return(contents.length);
}

View File

@@ -0,0 +1,12 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8
// Author: Udo Schmal, <udo.schmal@t-online.de>
//
// (c) Udo Schmal & L.N.Schaffrath NeueMedien 2004
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
{
"Chars": "Zeichen"
}

View File

@@ -0,0 +1,5 @@
// I18N constants
// LANG: "fr", ENCODING: UTF-8
{
"Chars": "Caractères"
}

View File

@@ -0,0 +1,7 @@
// I18N constants
// LANG: "no", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
{
"Chars": "Tegn"
}

View File

@@ -0,0 +1,41 @@
.CharacterMap { }
.CharacterMap a.entity {
font-size:12px;
width:18px;
display:block;
float:left;
padding:2px;
text-decoration:none;
color:#000;
text-align:center;
}
.CharacterMap a.light {
background-color:#ffffff;
}
.CharacterMap a.dark {
background-color:#f7f8fd;
}
.CharacterMap a.entity:hover {
background-color:#ffd760;
color:#000;
}
.popup td.character {
font-family:Verdana,Arial,Helvetica,sans-serif;
font-size:14px;
font-weight:bold;
text-align:center;
background:#fff;
padding:4px;
}
.popup td.character-hilite {
background:#ffd760;
}
.popup form {
text-align:center;
}
.popup table {
cursor:pointer;
background-color:#ADAD9C;
border:1px inset;
}

View File

@@ -0,0 +1,123 @@
// Character Map plugin for HTMLArea
// Original Author - Bernhard Pfeifer novocaine@gmx.net
HTMLArea.loadStyle( 'CharacterMap.css', 'CharacterMap' );
function CharacterMap( editor )
{
this.editor = editor;
var cfg = editor.config;
var self = this;
cfg.registerButton(
{
id : 'insertcharacter',
tooltip : HTMLArea._lc( 'Insert special character', 'CharacterMap' ),
image : editor.imgURL( 'ed_charmap.gif', 'CharacterMap' ),
textMode : false,
action : function( editor ) { self.buttonPress( editor ); }
}
);
cfg.addToolbarElement('insertcharacter', 'createlink', -1);
if ( cfg.CharacterMap.mode == 'panel' )
{
editor._CharacterMap = editor.addPanel( 'right' );
HTMLArea._addClass( editor._CharacterMap, 'CharacterMap' );
editor.notifyOn( 'modechange',
function( e, args )
{
if ( args.mode == 'text' ) editor.hidePanel( editor._CharacterMap );
}
);
var entites =
[
'&Yuml;', '&scaron;', '&#064;', '&quot;', '&iexcl;', '&cent;', '&pound;', '&curren;', '&yen;', '&brvbar;',
'&sect;', '&uml;', '&copy;', '&ordf;', '&laquo;', '&not;', '&macr;', '&deg;', '&plusmn;', '&sup2;',
'&sup3;', '&acute;', '&micro;', '&para;', '&middot;', '&cedil;', '&sup1;', '&ordm;', '&raquo;', '&frac14;',
'&frac12;', '&frac34;', '&iquest;', '&times;', '&Oslash;', '&divide;', '&oslash;', '&fnof;', '&circ;',
'&tilde;', '&ndash;', '&mdash;', '&lsquo;', '&rsquo;', '&sbquo;', '&ldquo;', '&rdquo;', '&bdquo;',
'&dagger;', '&Dagger;', '&bull;', '&hellip;', '&permil;', '&lsaquo;', '&rsaquo;', '&euro;', '&trade;',
'&Agrave;', '&Aacute;', '&Acirc;', '&Atilde;', '&Auml;', '&Aring;', '&AElig;', '&Ccedil;', '&Egrave;',
'&Eacute;', '&Ecirc;', '&Euml;', '&Igrave;', '&Iacute;', '&Icirc;', '&Iuml;', '&ETH;', '&Ntilde;',
'&Ograve;', '&Oacute;', '&Ocirc;', '&Otilde;', '&Ouml;', '&reg;', '&times;', '&Ugrave;', '&Uacute;',
'&Ucirc;', '&Uuml;', '&Yacute;', '&THORN;', '&szlig;', '&agrave;', '&aacute;', '&acirc;', '&atilde;',
'&auml;', '&aring;', '&aelig;', '&ccedil;', '&egrave;', '&eacute;', '&ecirc;', '&euml;', '&igrave;',
'&iacute;', '&icirc;', '&iuml;', '&eth;', '&ntilde;', '&ograve;', '&oacute;', '&ocirc;', '&otilde;',
'&ouml;', '&divide;', '&oslash;', '&ugrave;', '&uacute;', '&ucirc;', '&uuml;', '&yacute;', '&thorn;',
'&yuml;', '&OElig;', '&oelig;', '&Scaron;'
];
for ( var i=0; i<entites.length; i++ )
this.addEntity( entites[i], i );
editor.hidePanel( editor._CharacterMap );
}
};
// configuration mode : panel or popup
HTMLArea.Config.prototype.CharacterMap =
{
'mode': 'popup' // configuration mode : panel or popup
}
CharacterMap._pluginInfo =
{
name : "CharacterMap",
version : "2.0",
developer : "Laurent Vilday",
developer_url : "http://www.mokhet.com/",
c_owner : "Xinha community",
sponsor : "",
sponsor_url : "",
license : "Creative Commons Attribution-ShareAlike License"
};
CharacterMap._isActive = false;
CharacterMap.prototype.buttonPress = function( editor )
{
var cfg = editor.config;
if ( cfg.CharacterMap.mode == 'panel' )
{
if ( this._isActive )
{
this._isActive = false;
editor.hidePanel( editor._CharacterMap );
}
else
{
this._isActive = true;
editor.showPanel( editor._CharacterMap );
}
}
else
{
editor._popupDialog( "plugin://CharacterMap/select_character", function( entity )
{
if ( !entity ) return false;
if ( HTMLArea.is_ie ) editor.focusEditor();
editor.insertHTML( entity );
}, null);
}
};
CharacterMap.prototype.addEntity = function ( entite, pos )
{
editor = this.editor;
var self = this;
var a = document.createElement( 'a' );
HTMLArea._addClass( a, 'entity' );
a.innerHTML = entite;
a.href = 'javascript:void(0)';
HTMLArea._addClass(a, (pos%2)? 'light':'dark');
a.onclick = function()
{
if (HTMLArea.is_ie) editor.focusEditor();
editor.insertHTML( entite );
self._isActive = false;
editor.hidePanel( editor._CharacterMap );
return false;
};
editor._CharacterMap.appendChild( a );
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

View File

@@ -0,0 +1,14 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8
// 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).
{
"Insert special character": "Sonderzeichen einfügen",
"Cancel": "Abbrechen"
}

View File

@@ -0,0 +1,18 @@
// I18N constants
// LANG: "fr", ENCODING: UTF-8
// Author: Laurent Vilday, mokhet@mokhet.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.)
{
"Insert special character": "Insérer caractère spécial",
"Cancel": "Annuler"
}

View File

@@ -0,0 +1,10 @@
// I18N constants
// LANG: "it", ENCODING: UTF-8
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
{
"Insert special character" : "Inserisca il carattere speciale",
"Cancel" : "Annullamento"
}

View File

@@ -0,0 +1,14 @@
// I18N constants
// LANG: "nl", ENCODING: UTF-8
// 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).
{
"Insert special character": "Speciaal character invoegen",
"Cancel": "Annuleer"
}

View File

@@ -0,0 +1,8 @@
// I18N constants
// LANG: "no", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
{
"Insert special character": "Sett inn tegn",
"Cancel": "Avbryt"
}

View File

@@ -0,0 +1,183 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>Insert special character</title>
<link rel="stylesheet" type="text/css" href="../CharacterMap.css" />
<script type="text/javascript" src="../../../popups/popup.js"></script>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript">
// HTMLSource based on HTMLArea XTD 1.5 modified by Holger Hees
// Original Author - Bernhard Pfeifer novocaine@gmx.net
HTMLArea = window.opener.HTMLArea;
function Init() // run on page load
{
__dlg_translate('CharacterMap');
__dlg_init();
window.resizeTo(480, 300);
var character = ''; // set default input to empty
View( null, character );
document.getElementById("cancel").focus();
}
var oldView = null;
function View( td, character ) // preview character
{
if (oldView)
HTMLArea._removeClass(oldView, 'character-hilite');
if (td) {
oldView = td;
HTMLArea._addClass(oldView, '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 class="dialog popup" onload="Init();">
<table border="0" cellspacing="1" cellpadding="0" width="100%">
<tr>
<td class="character" onmouseover="View(this,'&amp;Yuml;')" onclick="Set('&Yuml;')">&Yuml;</td>
<td class="character" onmouseover="View(this,'&amp;scaron;')" onclick="Set('&scaron;')">&scaron;</td>
<td class="character" onmouseover="View(this,'&amp;#064;')" onclick="Set('&#064;')">@</td>
<td class="character" onmouseover="View(this,'&amp;quot;')" onclick="Set('&quot;')">&quot;</td>
<td class="character" onmouseover="View(this,'&amp;iexcl;')" onclick="Set('&iexcl;')">&iexcl;</td>
<td class="character" onmouseover="View(this,'&amp;cent;')" onclick="Set('&cent;')">&cent;</td>
<td class="character" onmouseover="View(this,'&amp;pound;')" onclick="Set('&pound;')">&pound;</td>
<td class="character" onmouseover="View(this,'&amp;curren;')" onclick="Set('&curren;')">&curren;</td>
<td class="character" onmouseover="View(this,'&amp;yen;')" onclick="Set('&yen;')">&yen;</td>
<td class="character" onmouseover="View(this,'&amp;brvbar;')" onclick="Set('&brvbar;')">&brvbar;</td>
<td class="character" onmouseover="View(this,'&amp;sect;')" onclick="Set('&sect;')">&sect;</td>
<td class="character" onmouseover="View(this,'&amp;uml;')" onclick="Set('&uml;')">&uml;</td>
<td class="character" onmouseover="View(this,'&amp;copy;')" onclick="Set('&copy;')">&copy;</td>
<td class="character" onmouseover="View(this,'&amp;ordf;')" onclick="Set('&ordf;')">&ordf;</td>
<td class="character" onmouseover="View(this,'&amp;laquo;')" onclick="Set('&laquo;')">&laquo;</td>
<td class="character" onmouseover="View(this,'&amp;not;')" onclick="Set('&not;')">&not;</td>
</tr><tr>
<td class="character" onmouseover="View(this,'&amp;macr;')" onclick="Set('&macr;')">&macr;</td>
<td class="character" onmouseover="View(this,'&amp;deg;')" onclick="Set('&deg;')">&deg;</td>
<td class="character" onmouseover="View(this,'&amp;plusmn;')" onclick="Set('&plusmn;')">&plusmn;</td>
<td class="character" onmouseover="View(this,'&amp;sup2;')" onclick="Set('&sup2;')">&sup2;</td>
<td class="character" onmouseover="View(this,'&amp;sup3;')" onclick="Set('&sup3;')">&sup3;</td>
<td class="character" onmouseover="View(this,'&amp;acute;')" onclick="Set('&acute;')">&acute;</td>
<td class="character" onmouseover="View(this,'&amp;micro;')" onclick="Set('&micro;')">&micro;</td>
<td class="character" onmouseover="View(this,'&amp;para;')" onclick="Set('&para;')">&para;</td>
<td class="character" onmouseover="View(this,'&amp;middot;')" onclick="Set('&middot;')">&middot;</td>
<td class="character" onmouseover="View(this,'&amp;cedil;')" onclick="Set('&cedil;')">&cedil;</td>
<td class="character" onmouseover="View(this,'&amp;sup1;')" onclick="Set('&sup1;')">&sup1;</td>
<td class="character" onmouseover="View(this,'&amp;ordm;')" onclick="Set('&ordm;')">&ordm;</td>
<td class="character" onmouseover="View(this,'&amp;raquo;')" onclick="Set('&raquo;')">&raquo;</td>
<td class="character" onmouseover="View(this,'&amp;frac14;')" onclick="Set('&frac14;')">&frac14;</td>
<td class="character" onmouseover="View(this,'&amp;frac12;')" onclick="Set('&frac12;')">&frac12;</td>
<td class="character" onmouseover="View(this,'&amp;frac34;')" onclick="Set('&frac34;')">&frac34;</td>
</tr><tr>
<td class="character" onmouseover="View(this,'&amp;iquest;')" onclick="Set('&iquest;')">&iquest;</td>
<td class="character" onmouseover="View(this,'&amp;times;')" onclick="Set('&times;')">&times;</td>
<td class="character" onmouseover="View(this,'&amp;Oslash;')" onclick="Set('&Oslash;')">&Oslash;</td>
<td class="character" onmouseover="View(this,'&amp;divide;')" onclick="Set('&divide;')">&divide;</td>
<td class="character" onmouseover="View(this,'&amp;oslash;')" onclick="Set('&oslash;')">&oslash;</td>
<td class="character" onmouseover="View(this,'&amp;fnof;')" onclick="Set('&fnof;')">&fnof;</td>
<td class="character" onmouseover="View(this,'&amp;circ;')" onclick="Set('&circ;')">&circ;</td>
<td class="character" onmouseover="View(this,'&amp;tilde;')" onclick="Set('&tilde;')">&tilde;</td>
<td class="character" onmouseover="View(this,'&amp;ndash;')" onclick="Set('&ndash;')">&ndash;</td>
<td class="character" onmouseover="View(this,'&amp;mdash;')" onclick="Set('&mdash;')">&mdash;</td>
<td class="character" onmouseover="View(this,'&amp;lsquo;')" onclick="Set('&lsquo;')">&lsquo;</td>
<td class="character" onmouseover="View(this,'&amp;rsquo;')" onclick="Set('&rsquo;')">&rsquo;</td>
<td class="character" onmouseover="View(this,'&amp;sbquo;')" onclick="Set('&sbquo;')">&sbquo;</td>
<td class="character" onmouseover="View(this,'&amp;ldquo;')" onclick="Set('&ldquo;')">&ldquo;</td>
<td class="character" onmouseover="View(this,'&amp;rdquo;')" onclick="Set('&rdquo;')">&rdquo;</td>
<td class="character" onmouseover="View(this,'&amp;bdquo;')" onclick="Set('&bdquo;')">&bdquo;</td>
</tr><tr>
<td class="character" onmouseover="View(this,'&amp;dagger;')" onclick="Set('&dagger;')">&dagger;</td>
<td class="character" onmouseover="View(this,'&amp;Dagger;')" onclick="Set('&Dagger;')">&Dagger;</td>
<td class="character" onmouseover="View(this,'&amp;bull;')" onclick="Set('&bull;')">&bull;</td>
<td class="character" onmouseover="View(this,'&amp;hellip;')" onclick="Set('&hellip;')">&hellip;</td>
<td class="character" onmouseover="View(this,'&amp;permil;')" onclick="Set('&permil;')">&permil;</td>
<td class="character" onmouseover="View(this,'&amp;lsaquo;')" onclick="Set('&lsaquo;')">&lsaquo;</td>
<td class="character" onmouseover="View(this,'&amp;rsaquo;')" onclick="Set('&rsaquo;')">&rsaquo;</td>
<td class="character" onmouseover="View(this,'&amp;euro;')" onclick="Set('&euro;')">&euro;</td>
<td class="character" onmouseover="View(this,'&amp;trade;')" onclick="Set('&trade;')">&trade;</td>
<td class="character" onmouseover="View(this,'&amp;Agrave;')" onclick="Set('&Agrave;')">&Agrave;</td>
<td class="character" onmouseover="View(this,'&amp;Aacute;')" onclick="Set('&Aacute;')">&Aacute;</td>
<td class="character" onmouseover="View(this,'&amp;Acirc;')" onclick="Set('&Acirc;')">&Acirc;</td>
<td class="character" onmouseover="View(this,'&amp;Atilde;')" onclick="Set('&Atilde;')">&Atilde;</td>
<td class="character" onmouseover="View(this,'&amp;Auml;')" onclick="Set('&Auml;')">&Auml;</td>
<td class="character" onmouseover="View(this,'&amp;Aring;')" onclick="Set('&Aring;')">&Aring;</td>
<td class="character" onmouseover="View(this,'&amp;AElig;')" onclick="Set('&AElig;')">&AElig;</td>
</tr><tr>
<td class="character" onmouseover="View(this,'&amp;Ccedil;')" onclick="Set('&Ccedil;')">&Ccedil;</td>
<td class="character" onmouseover="View(this,'&amp;Egrave;')" onclick="Set('&Egrave;')">&Egrave;</td>
<td class="character" onmouseover="View(this,'&amp;Eacute;')" onclick="Set('&Eacute;')">&Eacute;</td>
<td class="character" onmouseover="View(this,'&amp;Ecirc;')" onclick="Set('&Ecirc;')">&Ecirc;</td>
<td class="character" onmouseover="View(this,'&amp;Euml;')" onclick="Set('&Euml;')">&Euml;</td>
<td class="character" onmouseover="View(this,'&amp;Igrave;')" onclick="Set('&Igrave;')">&Igrave;</td>
<td class="character" onmouseover="View(this,'&amp;Iacute;')" onclick="Set('&Iacute;')">&Iacute;</td>
<td class="character" onmouseover="View(this,'&amp;Icirc;')" onclick="Set('&Icirc;')">&Icirc;</td>
<td class="character" onmouseover="View(this,'&amp;Iuml;')" onclick="Set('&Iuml;')">&Iuml;</td>
<td class="character" onmouseover="View(this,'&amp;ETH;')" onclick="Set('&ETH;')">&ETH;</td>
<td class="character" onmouseover="View(this,'&amp;Ntilde;')" onclick="Set('&Ntilde;')">&Ntilde;</td>
<td class="character" onmouseover="View(this,'&amp;Ograve;')" onclick="Set('&Ograve;')">&Ograve;</td>
<td class="character" onmouseover="View(this,'&amp;Oacute;')" onclick="Set('&Oacute;')">&Oacute;</td>
<td class="character" onmouseover="View(this,'&amp;Ocirc;')" onclick="Set('&Ocirc;')">&Ocirc;</td>
<td class="character" onmouseover="View(this,'&amp;Otilde;')" onclick="Set('&Otilde;')">&Otilde;</td>
<td class="character" onmouseover="View(this,'&amp;Ouml;')" onclick="Set('&Ouml;')">&Ouml;</td>
</tr><tr>
<td class="character" onmouseover="View(this,'&amp;reg;')" onclick="Set('&reg;')">&reg;</td>
<td class="character" onmouseover="View(this,'&amp;times;')" onclick="Set('&times;')">&times;</td>
<td class="character" onmouseover="View(this,'&amp;Ugrave;')" onclick="Set('&Ugrave;')">&Ugrave;</td>
<td class="character" onmouseover="View(this,'&amp;Uacute;')" onclick="Set('&Uacute;')">&Uacute;</td>
<td class="character" onmouseover="View(this,'&amp;Ucirc;')" onclick="Set('&Ucirc;')">&Ucirc;</td>
<td class="character" onmouseover="View(this,'&amp;Uuml;')" onclick="Set('&Uuml;')">&Uuml;</td>
<td class="character" onmouseover="View(this,'&amp;Yacute;')" onclick="Set('&Yacute;')">&Yacute;</td>
<td class="character" onmouseover="View(this,'&amp;THORN;')" onclick="Set('&THORN;')">&THORN;</td>
<td class="character" onmouseover="View(this,'&amp;szlig;')" onclick="Set('&szlig;')">&szlig;</td>
<td class="character" onmouseover="View(this,'&amp;agrave;')" onclick="Set('&agrave;')">&agrave;</td>
<td class="character" onmouseover="View(this,'&amp;aacute;')" onclick="Set('&aacute;')">&aacute;</td>
<td class="character" onmouseover="View(this,'&amp;acirc;')" onclick="Set('&acirc;')">&acirc;</td>
<td class="character" onmouseover="View(this,'&amp;atilde;')" onclick="Set('&atilde;')">&atilde;</td>
<td class="character" onmouseover="View(this,'&amp;auml;')" onclick="Set('&auml;')">&auml;</td>
<td class="character" onmouseover="View(this,'&amp;aring;')" onclick="Set('&aring;')">&aring;</td>
<td class="character" onmouseover="View(this,'&amp;aelig;')" onclick="Set('&aelig;')">&aelig;</td>
</tr><tr>
<td class="character" onmouseover="View(this,'&amp;ccedil;')" onclick="Set('&ccedil;')">&ccedil;</td>
<td class="character" onmouseover="View(this,'&amp;egrave;')" onclick="Set('&egrave;')">&egrave;</td>
<td class="character" onmouseover="View(this,'&amp;eacute;')" onclick="Set('&eacute;')">&eacute;</td>
<td class="character" onmouseover="View(this,'&amp;ecirc;')" onclick="Set('&ecirc;')">&ecirc;</td>
<td class="character" onmouseover="View(this,'&amp;euml;')" onclick="Set('&euml;')">&euml;</td>
<td class="character" onmouseover="View(this,'&amp;igrave;')" onclick="Set('&igrave;')">&igrave;</td>
<td class="character" onmouseover="View(this,'&amp;iacute;')" onclick="Set('&iacute;')">&iacute;</td>
<td class="character" onmouseover="View(this,'&amp;icirc;')" onclick="Set('&icirc;')">&icirc;</td>
<td class="character" onmouseover="View(this,'&amp;iuml;')" onclick="Set('&iuml;')">&iuml;</td>
<td class="character" onmouseover="View(this,'&amp;eth;')" onclick="Set('&eth;')">&eth;</td>
<td class="character" onmouseover="View(this,'&amp;ntilde;')" onclick="Set('&ntilde;')">&ntilde;</td>
<td class="character" onmouseover="View(this,'&amp;ograve;')" onclick="Set('&ograve;')">&ograve;</td>
<td class="character" onmouseover="View(this,'&amp;oacute;')" onclick="Set('&oacute;')">&oacute;</td>
<td class="character" onmouseover="View(this,'&amp;ocirc;')" onclick="Set('&ocirc;')">&ocirc;</td>
<td class="character" onmouseover="View(this,'&amp;otilde;')" onclick="Set('&otilde;')">&otilde;</td>
<td class="character" onmouseover="View(this,'&amp;ouml;')" onclick="Set('&ouml;')">&ouml;</td>
</tr><tr>
<td class="character" onmouseover="View(this,'&amp;divide;')" onclick="Set('&divide;')">&divide;</td>
<td class="character" onmouseover="View(this,'&amp;oslash;')" onclick="Set('&oslash;')">&oslash;</td>
<td class="character" onmouseover="View(this,'&amp;ugrave;')" onclick="Set('&ugrave;')">&ugrave;</td>
<td class="character" onmouseover="View(this,'&amp;uacute;')" onclick="Set('&uacute;')">&uacute;</td>
<td class="character" onmouseover="View(this,'&amp;ucirc;')" onclick="Set('&ucirc;')">&ucirc;</td>
<td class="character" onmouseover="View(this,'&amp;uuml;')" onclick="Set('&uuml;')">&uuml;</td>
<td class="character" onmouseover="View(this,'&amp;yacute;')" onclick="Set('&yacute;')">&yacute;</td>
<td class="character" onmouseover="View(this,'&amp;thorn;')" onclick="Set('&thorn;')">&thorn;</td>
<td class="character" onmouseover="View(this,'&amp;yuml;')" onclick="Set('&yuml;')">&yuml;</td>
<td class="character" onmouseover="View(this,'&amp;OElig;')" onclick="Set('&OElig;')">&OElig;</td>
<td class="character" onmouseover="View(this,'&amp;oelig;')" onclick="Set('&oelig;')">&oelig;</td>
<td class="character" onmouseover="View(this,'&amp;Scaron;')" onclick="Set('&Scaron;')">&Scaron;</td>
<td class="character" colspan="4">&nbsp;</td>
</tr>
</table><br>
<form action="#"><button type="button" id="cancel" name="cancel" onclick="return onCancel();">Cancel</button></form>
</body>
</html>

38
xinha/plugins/ContextMenu/1.pl Executable file
View File

@@ -0,0 +1,38 @@
#! /usr/bin/perl -w
use strict;
my $file = 'context-menu.js';
my $outfile = $file.'-i18n';
my $langfile = 'en.js';
open FILE, "<$file";
#open OUTFILE, ">$outfile";
#open LANGFILE, ">$langfile";
my %texts = ();
while (<FILE>) {
if (/"(.*?)"/) {
my $inline = $_;
chomp $inline;
my $key = $1;
my $val = $1;
print "Key: [$key]: ";
my $line = <STDIN>;
if (defined $line) {
chomp $line;
if ($line =~ /(\S+)/) {
$key = $1;
print "-- using $key\n";
}
$texts{$val} = $key;
} else {
print " -- skipped...\n";
}
}
}
#close LANGFILE;
#close OUTFILE;
close FILE;
print "\n\n\n";
print '"', join("\"\n\"", sort keys %texts), '"', "\n";

View File

@@ -0,0 +1,448 @@
// Context Menu 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$
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 selection = editor.hasSelectedText();
if (selection)
menu.push([ HTMLArea._lc("Cut", "ContextMenu"), function() { editor.execCommand("cut"); }, null, config.btnList["cut"][1] ],
[ HTMLArea._lc("Copy", "ContextMenu"), function() { editor.execCommand("copy"); }, null, config.btnList["copy"][1] ]);
menu.push([ HTMLArea._lc("Paste", "ContextMenu"), function() { editor.execCommand("paste"); }, null, config.btnList["paste"][1] ]);
var currentTarget = target;
var elmenus = [];
var link = null;
var table = null;
var tr = null;
var td = null;
var img = null;
function tableOperation(opcode) {
tbo.buttonPress(editor, opcode);
};
function insertPara(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,
[ HTMLArea._lc("_Image Properties...", "ContextMenu"),
function() {
editor._insertImage(img);
},
HTMLArea._lc("Show the image properties dialog", "ContextMenu"),
config.btnList["insertimage"][1] ]
);
break;
case "a":
link = target;
elmenus.push(null,
[ HTMLArea._lc("_Modify Link...", "ContextMenu"),
function() { editor.config.btnList['createlink'][3](editor); },
HTMLArea._lc("Current URL is", "ContextMenu") + ': ' + link.href,
config.btnList["createlink"][1] ],
[ HTMLArea._lc("Chec_k Link...", "ContextMenu"),
function() { window.open(link.href); },
HTMLArea._lc("Opens this link in a new window", "ContextMenu") ],
[ HTMLArea._lc("_Remove Link...", "ContextMenu"),
function() {
if (confirm(HTMLArea._lc("Please confirm that you want to unlink this element.", "ContextMenu") + "\n" +
HTMLArea._lc("Link points to:", "ContextMenu") + " " + link.href)) {
while (link.firstChild)
link.parentNode.insertBefore(link.firstChild, link);
link.parentNode.removeChild(link);
}
},
HTMLArea._lc("Unlink the current element", "ContextMenu") ]
);
break;
case "td":
td = target;
if (!tbo) break;
elmenus.push(null,
[ HTMLArea._lc("C_ell Properties...", "ContextMenu"),
function() { tableOperation("TO-cell-prop"); },
HTMLArea._lc("Show the Table Cell Properties dialog", "ContextMenu"),
config.btnList["TO-cell-prop"][1] ]
);
break;
case "tr":
tr = target;
if (!tbo) break;
elmenus.push(null,
[ HTMLArea._lc("Ro_w Properties...", "ContextMenu"),
function() { tableOperation("TO-row-prop"); },
HTMLArea._lc("Show the Table Row Properties dialog", "ContextMenu"),
config.btnList["TO-row-prop"][1] ],
[ HTMLArea._lc("I_nsert Row Before", "ContextMenu"),
function() { tableOperation("TO-row-insert-above"); },
HTMLArea._lc("Insert a new row before the current one", "ContextMenu"),
config.btnList["TO-row-insert-above"][1] ],
[ HTMLArea._lc("In_sert Row After", "ContextMenu"),
function() { tableOperation("TO-row-insert-under"); },
HTMLArea._lc("Insert a new row after the current one", "ContextMenu"),
config.btnList["TO-row-insert-under"][1] ],
[ HTMLArea._lc("_Delete Row", "ContextMenu"),
function() { tableOperation("TO-row-delete"); },
HTMLArea._lc("Delete the current row", "ContextMenu"),
config.btnList["TO-row-delete"][1] ]
);
break;
case "table":
table = target;
if (!tbo) break;
elmenus.push(null,
[ HTMLArea._lc("_Table Properties...", "ContextMenu"),
function() { tableOperation("TO-table-prop"); },
HTMLArea._lc("Show the Table Properties dialog", "ContextMenu"),
config.btnList["TO-table-prop"][1] ],
[ HTMLArea._lc("Insert _Column Before", "ContextMenu"),
function() { tableOperation("TO-col-insert-before"); },
HTMLArea._lc("Insert a new column before the current one", "ContextMenu"),
config.btnList["TO-col-insert-before"][1] ],
[ HTMLArea._lc("Insert C_olumn After", "ContextMenu"),
function() { tableOperation("TO-col-insert-after"); },
HTMLArea._lc("Insert a new column after the current one", "ContextMenu"),
config.btnList["TO-col-insert-after"][1] ],
[ HTMLArea._lc("De_lete Column", "ContextMenu"),
function() { tableOperation("TO-col-delete"); },
HTMLArea._lc("Delete the current column", "ContextMenu"),
config.btnList["TO-col-delete"][1] ]
);
break;
case "body":
elmenus.push(null,
[ HTMLArea._lc("Justify Left", "ContextMenu"),
function() { editor.execCommand("justifyleft"); }, null,
config.btnList["justifyleft"][1] ],
[ HTMLArea._lc("Justify Center", "ContextMenu"),
function() { editor.execCommand("justifycenter"); }, null,
config.btnList["justifycenter"][1] ],
[ HTMLArea._lc("Justify Right", "ContextMenu"),
function() { editor.execCommand("justifyright"); }, null,
config.btnList["justifyright"][1] ],
[ HTMLArea._lc("Justify Full", "ContextMenu"),
function() { editor.execCommand("justifyfull"); }, null,
config.btnList["justifyfull"][1] ]
);
break;
}
}
if (selection && !link)
menu.push(null, [ HTMLArea._lc("Make lin_k...", "ContextMenu"),
function() { editor.config.btnList['createlink'][3](editor); },
HTMLArea._lc("Create a link", "ContextMenu"),
config.btnList["createlink"][1] ]);
for (var i = 0; i < elmenus.length; ++i)
menu.push(elmenus[i]);
if (!/html|body/i.test(currentTarget.tagName))
menu.push(null,
[ HTMLArea._lc({string: "Remove the $elem Element...", replace: {elem: "&lt;" + currentTarget.tagName + "&gt;"}}, "ContextMenu"),
function() {
if (confirm(HTMLArea._lc("Please confirm that you want to remove this element:", "ContextMenu") + " " +
currentTarget.tagName)) {
var el = currentTarget;
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;
}
}
}
},
HTMLArea._lc("Remove this node from the document", "ContextMenu") ],
[ HTMLArea._lc("Insert paragraph before", "ContextMenu"),
function() { insertPara(false); },
HTMLArea._lc("Insert a paragraph before the current node", "ContextMenu") ],
[ HTMLArea._lc("Insert paragraph after", "ContextMenu"),
function() { insertPara(true); },
HTMLArea._lc("Insert a paragraph after the current node", "ContextMenu") ]
);
return menu;
};
ContextMenu.prototype.popupMenu = function(ev) {
var self = this;
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(HTMLArea._lc("How did you get here? (Please report!)", "ContextMenu"));
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._htmlArea);//_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'>&nbsp;";
}
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)
{
var t = HTMLArea.makeBtnImg(item.__msh.icon, doc);
td1.appendChild(t);
// 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 || '&nbsp;';
};
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) {
/* FIXME: I think this is to stop the popup from running off the bottom of the screen?
var dx = x + div.offsetWidth - window.innerWidth + 4;
var dy = y + div.offsetHeight - window.innerHeight + 4;
// alert('dy= (' + y + '+' + div.offsetHeight + '-' + window.innerHeight + ' + 4 ) = ' + dy);
if (dx > 0) x -= dx;
if (dy > 0) y -= dy;
*/
div.style.left = x + "px";
div.style.top = y + "px";
} else {
// To get the size we need to display the popup with some width/height
// then we can get the actual size of the div and redisplay the popup at the
// correct dimensions.
this.iePopup.show(ev.screenX, ev.screenY, 300,50);
var w = div.offsetWidth;
var h = div.offsetHeight;
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;
};

View File

@@ -0,0 +1,54 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8
// translated: Raimund Meyer xinha@ray-of-light.org
{
"Cut": "Ausschneiden",
"Copy": "Kopieren",
"Paste": "Einfügen",
"_Image Properties...": "Eigenschaften",
"Show the image properties dialog": "Fenster für die Bildoptionen anzeigen",
"_Modify Link...": "Link ändern",
"Current URL is": "Aktuelle URL ist",
"Chec_k Link...": "Link testen",
"Opens this link in a new window": "Diesen Link in neuem Fenster öffnen",
"_Remove Link...": "Link entfernen",
"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",
"C_ell Properties...": "Zellenoptionen",
"Show the Table Cell Properties dialog": "Zellenoptionen anzeigen",
"Ro_w Properties...": "Zeilenoptionen",
"Show the Table Row Properties dialog": "Zeilenoptionen anzeigen",
"I_nsert Row Before": "Zeile einfügen vor Position",
"Insert a new row before the current one": "Zeile einfügen vor der aktuellen Position",
"In_sert Row After": "Zeile einügen nach Position",
"Insert a new row after the current one": "Zeile einfügen nach der aktuellen Position",
"_Delete Row": "Zeile löschen",
"Delete the current row": "Zeile löschen",
"_Table Properties...": "Tabellenoptionen",
"Show the Table Properties dialog": "Tabellenoptionen anzeigen",
"Insert _Column Before": "Spalte einfügen vor Position",
"Insert a new column before the current one": "Spalte einfügen vor der aktuellen Position",
"Insert C_olumn After": "Spalte einfügen nach Position",
"Insert a new column after the current one": "Spalte einfügen nach der aktuellen Position",
"De_lete Column": "Spalte löschen",
"Delete the current column": "Spalte löschen",
"Justify Left": "Linksbündig",
"Justify Center": "Zentriert",
"Justify Right": "Rechtsbündig",
"Justify Full": "Blocksatz",
"Make lin_k...": "Link erstellen",
"Create a link": "Link erstellen",
"Remove the $elem Element...": "Element $elem entfernen...",
"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",
"Insert paragraph before": "Absatz einfügen vor Position",
"Insert a paragraph before the current node": "Absatz einfügen vor der aktuellen Position",
"Insert paragraph after": "Absatz einfügen hinter Position",
"Insert a paragraph after the current node": "Absatz einfügen hinter der aktuellen Position",
"How did you get here? (Please report!)": "Wie sind Sie denn hier hin gekommen? (Please report!)"
}

View File

@@ -0,0 +1,49 @@
// I18N constants
// LANG: "el", ENCODING: UTF-8
// Author: Dimitris Glezos, dimitris@glezos.com
{
"Cut": ‘ποκοπΞ<C280>",
"Copy": ‘ντιγραφΞ<C286>",
"Paste": "Ξ•Ο€ΞΉΞΊΟŒΞ»Ξ»Ξ·ΟƒΞ·",
"_Image Properties...": "Ξ™Ξ΄ΞΉΟŒΟ„Ξ·Ο„Ξ΅Ο‚ Ξ•ΞΉΞΊΟŒΞ½Ξ±Ο‚...",
"_Modify Link...": <>ροποποίηση συνδέσμου...",
"Chec_k Link...": "ΞˆΞ»Ξ΅Ξ³Ο‡ΞΏΟ‚ συνδέσμων...",
"_Remove Link...": ”ιαγραφΞ<C286> συνδέσμου...",
"C_ell Properties...": "Ξ™Ξ΄ΞΉΟŒΟ„Ξ·Ο„Ξ΅Ο‚ κΡλιού...",
"Ro_w Properties...": "Ξ™Ξ΄ΞΉΟŒΟ„Ξ·Ο„Ξ΅Ο‚ γραμμΞ<CE8C>Ο‚...",
"I_nsert Row Before": •ισαγωγΞ<C2B3> γραμμΞ<CE8C>Ο‚ πριν",
"In_sert Row After": •ισαγωγΞ<C2B3> γραμμΞ<CE8C>Ο‚ μΡτά",
"_Delete Row": ”ιαγραφΞ<C286> γραμμΞ<CE8C>Ο‚",
"_Table Properties...": "Ξ™Ξ΄ΞΉΟŒΟ„Ξ·Ο„Ξ΅Ο‚ πίνακα...",
"Insert _Column Before": •ισαγωγΞ<C2B3> στΞ<C284>λης πριν",
"Insert C_olumn After": •ισαγωγΞ<C2B3> στΞ<C284>λης μΡτά",
"De_lete Column": ”ιαγραφΞ<C286> στΞ<C284>λης",
"Justify Left": "Στοίχηση ΑριστΡρά",
"Justify Center": "Στοίχηση ΞšΞ­Ξ½Ο„ΟΞΏ",
"Justify Right": "Στοίχηση ΔΡξιά",
"Justify Full":  Ξ»Ξ<C2BB>ρης Στοίχηση",
"Make lin_k...": "Δημιουργία συνδέσμου...",
"Remove the $elem Element...": "ΑφαίρΡση $elem στοιχΡίου...",
"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": "Εμφάνιση Ξ΄ΞΉΞ±Ξ»ΟŒΞ³ΞΏΟ… ΞΌΞ΅ τις Ξ™Ξ΄ΞΉΟŒΟ„Ξ·Ο„Ξ΅Ο‚ γραμμΞ<CE8C>Ο‚ Ξ Ξ―Ξ½Ξ±ΞΊΞ±",
"Insert a new row before the current one": •ισαγωγΞ<C2B3> ΞΌΞΉΞ±Ο‚ Ξ½Ξ­Ξ±Ο‚ γραμμΞ<CE8C>Ο‚ πριν την ΡπιλΡγμένη",
"Insert a new row after the current one": •ισαγωγΞ<C2B3> ΞΌΞΉΞ±Ο‚ Ξ½Ξ­Ξ±Ο‚ γραμμΞ<CE8C>Ο‚ μΡτά την ΡπιλΡγμένη",
"Delete the current row": ”ιαγραφΞ<C286> ΡπιλΡγμένης γραμμΞ<CE8C>Ο‚",
"Show the Table Properties dialog": "Εμφάνιση Ξ΄ΞΉΞ±Ξ»ΟŒΞ³ΞΏΟ… ΞΌΞ΅ τις Ξ™Ξ΄ΞΉΟŒΟ„Ξ·Ο„Ξ΅Ο‚ Ξ Ξ―Ξ½Ξ±ΞΊΞ±",
"Insert a new column before the current one": •ισαγωγΞ<C2B3> Ξ½Ξ­Ξ±Ο‚ στΞ<C284>λης πριν την ΡπιλΡγμένη",
"Insert a new column after the current one": •ισαγωγΞ<C2B3> Ξ½Ξ­Ξ±Ο‚ στΞ<C284>λης μΡτά την ΡπιλΡγμένη",
"Delete the current column": ”ιαγραφΞ<C286> ΡπιλΡγμένης στΞ<C284>λης",
"Create a link": "Δημιουργία συνδέσμου"
}

View File

@@ -0,0 +1,50 @@
// I18N constants
// LANG: "fr", ENCODING: UTF-8
{
"Cut": "Couper",
"Copy": "Copier",
"Paste": "Coller",
"_Image Properties...": "_Propriétés de l'image...",
"_Modify Link...": "_Modifier le lien...",
"Chec_k Link...": "_Vérifier le lien...",
"_Remove Link...": "_Supprimer le lien...",
"C_ell Properties...": "P_ropriétés de la cellule...",
"Ro_w Properties...": "Pr_opriétés de la rangée...",
"I_nsert Row Before": "Insérer une rangée a_vant",
"In_sert 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 C_olumn After": "Insérer une colonne après",
"De_lete Column": "_Supprimer la colonne",
"Justify Left": "Aligner à gauche",
"Justify Center": "Aligner au centre",
"Justify Right": "Aligner à droite",
"Justify Full": "Justifier",
"Make lin_k...": "Convertir en lien...",
"Remove the $elem Element...": "Supprimer Élément $elem...",
"Insert paragraph before": "Insérer un paragraphe avant",
"Insert paragraph after": "Insérer un paragraphe après",
"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 ? (Reportez le bug SVP !)",
"Show the image properties dialog": "Afficher le dialogue des propriétés d'image",
"Modify URL": "Modifier l'URL",
"Current URL is": "L'URL courante 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:": "Le lien pointe sur:",
"Unlink the current element": "Enlever le lien sur cet élément",
"Show the Table Cell Properties dialog": "Afficher la boite de propriété des cellules",
"Show the Table Row Properties dialog": "Afficher la boite de propriété 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 la boite de propriété de tableau",
"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",
"Insert a paragraph before the current node": "Insérer un paragraphe avant le noeud courant",
"Insert a paragraph after the current node": "Insérer un paragraphe après le noeud courant"
}

View File

@@ -0,0 +1,58 @@
// 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.)
{
"Cut": "גזור",
"Copy": "העתק",
"Paste": "הדבק",
"_Image Properties...": "_מאפייני תמונה...",
"_Modify Link...": "_שנה קישור...",
"Chec_k Link...": "בדו_ק קישור...",
"_Remove Link...": "_הסר קישור...",
"C_ell Properties...": "מאפייני ת_א...",
"Ro_w Properties...": "מאפייני _טור...",
"I_nsert Row Before": "ה_כנס שורה לפני",
"In_sert Row After": "הכנ_ס שורה אחרי",
"_Delete Row": "_מחק שורה",
"_Table Properties...": "מאפייני ט_בלה...",
"Insert _Column Before": "הכנס _טור לפני",
"Insert C_olumn After": "הכנס ט_ור אחרי",
"De_lete Column": "מח_ק טור",
"Justify Left": "ישור לשמאל",
"Justify Center": "ישור למרכז",
"Justify Right": "ישור לימין",
"Justify Full": "ישור לשורה מלאה",
"Make lin_k...": "צור קיור...",
"Remove the $elem Element...": "הסר את אלמנט ה- $elem...",
"Please confirm that you want to remove this element:": "אנא אשר שברצונך להסיר את האלמנט הזה:",
"Remove this node from the document": "הסרה של node זה מהמסמך",
"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": "יצירת קישור"
}

View File

@@ -0,0 +1,58 @@
// I18N constants
// LANG: "nl", ENCODING: UTF-8
// 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.)
{
"Cut": "Knippen",
"Copy": "Kopiëren",
"Paste": "Plakken",
"_Image Properties...": "Eigenschappen afbeelding...",
"_Modify Link...": "Hyperlin_k aanpassen...",
"Chec_k Link...": "Controleer hyperlin_k...",
"_Remove Link...": "Ve_rwijder hyperlink...",
"C_ell Properties...": "C_eleigenschappen...",
"Ro_w Properties...": "Rijeigenscha_ppen...",
"I_nsert Row Before": "Rij invoegen boven",
"In_sert Row After": "Rij invoegen onder",
"_Delete Row": "Rij _verwijderen",
"_Table Properties...": "_Tabeleigenschappen...",
"Insert _Column Before": "Kolom invoegen voor",
"Insert C_olumn After": "Kolom invoegen na",
"De_lete Column": "Kolom verwijderen",
"Justify Left": "Links uitlijnen",
"Justify Center": "Centreren",
"Justify Right": "Rechts uitlijnen",
"Justify Full": "Uitvullen",
"Make lin_k...": "Maak hyperlin_k...",
"Remove the $elem Element...": "Verwijder het $elem element...",
"Please confirm that you want to remove this element:": "Is het werkelijk de bedoeling dit element te verwijderen:",
"Remove this node from the document": "Verwijder dit punt van het document",
"How did you get here? (Please report!)": "Hoe kwam je hier? (A.U.B. doorgeven!)",
"Show the image properties dialog": "Laat het afbeeldingseigenschappen dialog zien",
"Modify URL": "Aanpassen URL",
"Current URL is": "Huidig URL is",
"Opens this link in a new window": "Opend deze hyperlink in een nieuw venster",
"Please confirm that you want to unlink this element.": "Is het werkelijk de bedoeling dit element te unlinken.",
"Link points to:": "Hyperlink verwijst naar:",
"Unlink the current element": "Unlink het huidige element",
"Show the Table Cell Properties dialog": "Laat de tabel celeigenschappen dialog zien",
"Show the Table Row Properties dialog": "Laat de tabel rijeigenschappen dialog zien",
"Insert a new row before the current one": "Voeg een nieuwe rij in boven de huidige",
"Insert a new row after the current one": "Voeg een nieuwe rij in onder de huidige",
"Delete the current row": "Verwijder de huidige rij",
"Show the Table Properties dialog": "Laat de tabel eigenschappen dialog zien",
"Insert a new column before the current one": "Voeg een nieuwe kolom in voor de huidige",
"Insert a new column after the current one": "Voeg een nieuwe kolom in na de huidige",
"Delete the current column": "Verwijder de huidige kolom",
"Create a link": "Maak een hyperlink"
}

View File

@@ -0,0 +1,55 @@
// I18N constants
// LANG: "no", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
// Used key commands
// C,D,e, ,I, ,k,k,l,M, ,n,o,R, ,s,T, ,w : English
// H B j R m F v : Norwegian
{
"Cut": "Klipp ut",
"Copy": "Kopier",
"Paste": "Lim inn",
"_Image Properties...": "_Bilde Egenskaper...",
"Show the image properties dialog": "Vis bildeegenskaper",
"_Modify Link...": "_Rediger Link...",
"Current URL is": "Gjeldende URL er",
"Chec_k Link...": "Sje_kk Link...",
"Opens this link in a new window": "Åpner denne link i nytt vindu",
"_Remove Link...": "_Fjerne Link...",
"Please confirm that you want to unlink this element.": "Vennligst bekreft at du ønsker å fjerne link på elementet",
"Link points to:": "Link peker til:",
"Unlink the current element": "Fjerne link på gjeldende element",
"C_ell Properties...": "C_elle Egenskaper...",
"Show the Table Cell Properties dialog": "Vis egenskaper for celle",
"Ro_w Properties...": "Rad Egenskaper... (_w)",
"Show the Table Row Properties dialog": "Vis egenskaper for rad",
"I_nsert Row Before": "Sett I_nn rad før",
"Insert a new row before the current one": "Sett inn ny rad før gjeldende",
"In_sert Row After": "_Sett inn rad etter",
"Insert a new row after the current one": "Sett inn ny rad etter gjeldende",
"_Delete Row": "Slett rad (_d)",
"Delete the current row": "Slett gjeldende rad",
"_Table Properties...": "_Tabell Egenskaper...",
"Show the Table Properties dialog": "Vis egenskaper for tabellen",
"Insert _Column Before": "Sett inn kolonne etter (_c)",
"Insert a new column before the current one": "Sett inn kolonne før gjeldende",
"Insert C_olumn After": "Sett inn k_olonne etter",
"Insert a new column after the current one": "Sett inn kolonne etter gjeldende",
"De_lete Column": "S_lett kolonne",
"Delete the current column": "Slett gjeldende kolonne",
"Justify Left": "_Venstrejuster",
"Justify Center": "_Midtjuster",
"Justify Right": "_Høyrejuster",
"Justify Full": "Blokk_juster",
"Make lin_k...": "Lag len_ke...",
"Create a link": "Lag ny link",
"Remove the $elem Element...": "Fjerne $elem elementet...",
"Please confirm that you want to remove this element:": "Vennligst bekreft at du ønsker å fjerne elementet:",
"Remove this node from the document": "Fjerne denne node fra dokumentet",
"Insert paragraph before": "Sett inn paragraf før",
"Insert a paragraph before the current node": "Sett inn paragraf før gjeldende node",
"Insert paragraph after": "Sett inn paragraf etter",
"Insert a paragraph after the current node": "Sett inn paragraf etter gjeldende node",
"How did you get here? (Please report!)": "Hva skjedde? (Vennligst beskriv)"
}

View File

@@ -0,0 +1,51 @@
// I18N constants
// LANG: "pl", ENCODING: UTF-8
// translated: Krzysztof Kotowicz, http://www.eskot.krakow.pl/portfolio/, koto@webworkers.pl
{
"Cut": "Wytnij",
"Copy": "Kopiuj",
"Paste": "Wklej",
"_Image Properties...": "Właściwości obrazka",
"Show the image properties dialog": "Pokaż okienko właściwości obrazka",
"_Modify Link...": "Zmień odnośnik",
"Current URL is": "Bieżący URL odnośnika",
"Chec_k Link...": "Sprawdź odnośnik",
"Opens this link in a new window": "Otwiera ten odnośnik w nowym oknie",
"_Remove Link...": "Usuń odnośnik",
"Please confirm that you want to unlink this element.": "Na pewno chcesz usunąć odnośnik?",
"Link points to:": "Odnośnik wskazuje na:",
"Unlink the current element": "Usuń odnośnik z zaznaczonego elementu",
"C_ell Properties...": "Właściwości komórki",
"Show the Table Cell Properties dialog": "Pokaż okno właściwości komórki",
"Ro_w Properties...": "Właściwości wiersza",
"Show the Table Row Properties dialog": "Pokaż okno właściwości wiersza",
"I_nsert Row Before": "Wstaw wiersz przed",
"Insert a new row before the current one": "Wstaw nowy wiersz przed bieżącym",
"In_sert Row After": "Wstaw wiersz po",
"Insert a new row after the current one": "Wstaw nowy wiersz po bieżącym",
"_Delete Row": "Usuń wiersz",
"Delete the current row": "Usuń bieżący wiersz",
"_Table Properties...": "Właściwości tabeli",
"Show the Table Properties dialog": "Pokaż okienko właściwości tabeli",
"Insert _Column Before": "Wstaw kolumnę przed",
"Insert a new column before the current one": "Wstaw nową kolumnę przed bieżącą",
"Insert C_olumn After": "Wstaw kolumnę po",
"Insert a new column after the current one": "Wstaw nową kolumnę po bieżącej",
"De_lete Column": "Usuń kolumnę",
"Delete the current column": "Usuwa bieżącą kolumnę",
"Justify Left": "Wyrównaj do lewej",
"Justify Center": "Wycentruj",
"Justify Right": "Wyrównaj do prawej",
"Justify Full": "Wyjustuj",
"Make lin_k...": "Utwórz odnośnik",
"Create a link": "Utwórz odnośnik",
"Remove the": "Usuń",
"Element...": "element...",
"Please confirm that you want to remove this element:": "Na pewno chcesz usunąć ten element?",
"Remove this node from the document": "Usuń ten element z dokumentu",
"Insert paragraph before": "Wstaw akapit przed",
"Insert a paragraph before the current node": "Wstaw akapit przed bieżącym elementem",
"Insert paragraph after": "Wstaw akapit po",
"Insert a paragraph after the current node": "Wstaw akapit po bieżącym elemencie",
"How did you get here? (Please report!)": "Jak tu trafiłeś (Proszę, podaj okoliczności!)"
}

View File

@@ -0,0 +1,67 @@
/* 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 {
/* taken care of by xinha.makeBtnImg() */
/* width: 18px; */
/* height: 18px; */
}
div.htmlarea-context-menu tr.item td.icon {
padding: 0px 3px;
width: 18px;
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;
}

View File

@@ -0,0 +1,70 @@
// Double Click Plugin for HTMLArea-3.0
// Implementation by Marijn Kampf http://www.marijn.org
// Sponsored by http://www.smiling-faces.com
//
// (c) Marijn Kampf 2004.
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
//
// Cut-n-paste version of double click plugin.
// Almost no original code used. Based on
// Luis HTMLarea and Mihai Bazon Context Menu
//
//
//
DoubleClick._pluginInfo = {
name : "DoubleClick",
version : "1.0",
developer : "Marijn Kampf",
developer_url : "http://www.marijn.org",
c_owner : "Marijn Kampf",
sponsor : "smiling-faces.com",
sponsor_url : "http://www.smiling-faces.com",
license : "htmlArea"
};
function DoubleClick(editor) {
this.editor = editor;
// ADDING CUSTOM DOUBLE CLICK ACTIONS
// format of the dblClickList elements is "TAGNAME: [ ACTION ]"
// - TAGNAME: tagname of the tag that is double clicked
// - ACTION: function that gets called when the button is clicked.
// it has the following prototype:
// function(editor, event)
// - editor is the HTMLArea object that triggered the call
// - target is the selected object
this.editor.dblClickList = {
u: [ function(e) {e.execCommand("underline");} ],
strike: [ function(e) {e.execCommand("strikethrough");} ],
sub: [ function(e) {e.execCommand("subscript");} ],
sup: [ function(e) {e.execCommand("superscript");} ],
// Edit Link dialog
a: [ function(e) {e.execCommand("createlink");} ],
// Follow link
//a: [ function(editor, target) { window.location = target.href; properties(target); } ],
img: [ function(e) {e.execCommand("insertimage");} ],
td: [ function(e) {e.execCommand("inserttable");} ]
};
};
DoubleClick.prototype.onGenerate = function() {
var self = this;
var doc = this.editordoc = this.editor._iframe.contentWindow.document;
HTMLArea._addEvents(doc, ["dblclick"],
function (event) {
return self.onDoubleClick(HTMLArea.is_ie ? self.editor._iframe.contentWindow.event : event);
});
this.currentClick = null;
};
DoubleClick.prototype.onDoubleClick = function(ev) {
var target = HTMLArea.is_ie ? ev.srcElement : ev.target;
var tagName = target.tagName.toLowerCase();
if (this.editor.dblClickList[tagName] != undefined) {
this.editor.dblClickList[tagName][0](this.editor, target);
}
}

View File

@@ -0,0 +1,237 @@
// 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 self = this;
/*var cssArray=null;
var cssLength=0;*/
var lastTag=null;
var lastClass=null;
var css_class = {
id : "DynamicCSS-class",
tooltip : this._lc("Choose stylesheet"),
options : {"":""},
action : function(editor) { self.onSelect(editor, this); },
refresh : function(editor) { self.updateValue(editor, this); }
};
cfg.registerDropdown(css_class);
cfg.addToolbarElement(["T[CSS]", "DynamicCSS-class", "separator"] , "formatblock", -1);
};
DynamicCSS.parseStyleSheet=function(editor){
iframe = editor._iframe.contentWindow.document;
cssArray=DynamicCSS.cssArray;
if(!cssArray) cssArray=new Array();
for(i=0;i<iframe.styleSheets.length;i++)
{
if(iframe.styleSheets[i].title == "table borders") continue;
// Mozilla
if(HTMLArea.is_gecko){
try{
cssArray=DynamicCSS.applyCSSRule(iframe.styleSheets[i].cssRules,cssArray);
}
catch(e){
//alert(e);
}
}
// IE
else {
try{
if(iframe.styleSheets[i].rules){
cssArray=DynamicCSS.applyCSSRule(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(iframe.styleSheets[i].imports[j].rules,cssArray);
}
}
}
catch(e){
//alert(e);
}
}
}
DynamicCSS.cssArray=cssArray;
}
DynamicCSS.applyCSSRule=function(cssRules,cssArray){
for(rule in cssRules){
if(typeof cssRules[rule] == 'function') continue;
// 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=HTMLArea._lc("Default", 'DynamicCSS');
else cssName='<'+HTMLArea._lc("Default", 'DynamicCSS')+'>';
}
cssArray[tagName][className]=cssName;
DynamicCSS.cssLength++;
}
}
}
// ImportRule (Mozilla)
else if(cssRules[rule].styleSheet){
cssArray=DynamicCSS.applyCSSRule(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._lc = function(string) {
return HTMLArea._lc(string, 'DynamicCSS');
}
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(this.lastTag!=tagName || this.lastClass!=className){
this.lastTag=tagName;
this.lastClass=className;
var select = editor._toolbarObjects[obj.id].element;
while(select.length>0){
select.options[select.length-1] = null;
}
select.options[0]=new Option(this._lc("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(typeof cssArray[tagName][cssClass] != 'string') continue;
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']){
if(typeof cssArray['all'][cssClass] != 'string') continue;
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(this._lc("Undefined"),className);
select.selectedIndex=select.length-1;
}
}
if(select.length>1) select.disabled=false;
else select.disabled=true;
}
};

View File

@@ -0,0 +1,15 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8
// 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).
{
"Default": "Standard",
"Undefined": "Nicht definiert",
"Choose stylesheet": "Wählen Sie einen StyleSheet aus"
}

View File

@@ -0,0 +1,15 @@
// I18N constants
// LANG: "fr", ENCODING: UTF-8
// 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).
{
"Default": "Défaut",
"Undefined": "Non défini",
"Choose stylesheet": "Choisir feuille de style"
}

View File

@@ -0,0 +1,15 @@
// I18N constants
// LANG: "nl", ENCODING: UTF-8
// 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).
{
"Default": "Default",
"Undefined": "Ungedefinieerd",
"Choose stylesheet": "Kies stylesheet"
}

View File

@@ -0,0 +1,9 @@
// I18N constants
// LANG: "no", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
{
"Default": "Standard",
"Undefined": "Udefinert",
"Choose stylesheet": "Velg stilsett"
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
/*---------------------------------------*\
Find and Replace Plugin for HTMLArea-3.0
-----------------------------------------
author: Cau guanabara
e-mail: caugb@ibest.com.br
\*---------------------------------------*/
function FindReplace(editor) {
this.editor = editor;
var cfg = editor.config;
var self = this;
cfg.registerButton("FR-findreplace", this._lc("Find and Replace"),
editor.imgURL("ed_find.gif", "FindReplace"), false,
function(editor) { self.buttonPress(editor); });
cfg.addToolbarElement(["FR-findreplace","separator"], ["formatblock","fontsize","fontname"], -1);
};
FindReplace.prototype.buttonPress = function(editor) {
FindReplace.editor = editor;
var sel = editor.getSelectedHTML();
if(/\w/.test(sel)) {
sel = sel.replace(/<[^>]*>/g,"");
sel = sel.replace(/&nbsp;/g,"");
}
var param = /\w/.test(sel) ? {fr_pattern: sel} : null;
editor._popupDialog("plugin://FindReplace/find_replace", null, param);
};
FindReplace._pluginInfo = {
name : "FindReplace",
version : "1.0 - beta",
developer : "Cau Guanabara",
developer_url : "mailto:caugb@ibest.com.br",
c_owner : "Cau Guanabara",
sponsor : "Independent production",
sponsor_url : "http://www.netflash.com.br/gb/HA3-rc1/examples/find-replace.html",
license : "htmlArea"
};
FindReplace.prototype._lc = function(string) {
return HTMLArea._lc(string, 'FindReplace');
}

View File

@@ -0,0 +1,149 @@
/*---------------------------------------*\
Find and Replace Plugin for HTMLArea-3.0
-----------------------------------------
author: Cau guanabara
e-mail: caugb@ibest.com.br
\*---------------------------------------*/
var FindReplace = window.opener.FindReplace;
var editor = FindReplace.editor;
var is_mo = window.opener.HTMLArea.is_gecko;
var tosearch = '';
var pater = null;
var buffer = null;
var matches = 0;
var replaces = 0;
var fr_spans = new Array();
function _lc(string) {
return(window.opener.HTMLArea._lc(string, 'FindReplace'));
}
function execSearch(params) {
var ihtml = editor._doc.body.innerHTML;
if(buffer == null)
buffer = ihtml;
if(params['fr_pattern'] != tosearch) {
if(tosearch != '')
clearDoc();
tosearch = params['fr_pattern'];
}
if(matches == 0) {
er = params['fr_words'] ? "/(?!<[^>]*)(\\b"+params['fr_pattern']+"\\b)(?![^<]*>)/g" :
"/(?!<[^>]*)("+params['fr_pattern']+")(?![^<]*>)/g";
if(!params['fr_matchcase'])
er += "i";
pater = eval(er);
var tago = '<span id=frmark>';
var tagc = '</span>';
var newHtml = ihtml.replace(pater,tago+"$1"+tagc);
editor.setHTML(newHtml);
var getallspans = editor._doc.body.getElementsByTagName("span");
for (var i = 0; i < getallspans.length; i++)
if(/^frmark/.test(getallspans[i].id))
fr_spans.push(getallspans[i]);
}
spanWalker(params['fr_pattern'],params['fr_replacement'],params['fr_replaceall']);
};
function spanWalker(pattern,replacement,replaceall) {
var foundtrue = false;
clearMarks();
for (var i = matches; i < fr_spans.length; i++) {
var elm = fr_spans[i];
foundtrue = true;
if(!(/[0-9]$/.test(elm.id))) {
matches++;
disab('fr_clear',false);
elm.id = 'frmark_'+matches;
elm.style.color = 'white';
elm.style.backgroundColor = 'highlight';
elm.style.fontWeight = 'bold';
elm.scrollIntoView(false);
if(/\w/.test(replacement)) {
if(replaceall || confirm(_lc("Substitute this occurrence?"))) {
elm.firstChild.replaceData(0,elm.firstChild.data.length,replacement);
replaces++;
disab('fr_undo',false);
}
if(replaceall) {
clearMarks();
continue;
}
}
break;
}
}
var last = (i >= fr_spans.length - 1);
if(last || !foundtrue) { // EOF
var message = _lc("Done")+':\n\n';
if(matches > 0) {
if(matches == 1) message += matches+' '+_lc("found item");
else message += matches+' '+_lc("found items");
if(replaces > 0) {
if(replaces == 1) message += ',\n'+replaces+' '+_lc("replaced item");
else message += ',\n'+replaces+' '+_lc("replaced items");
}
hiliteAll();
disab('fr_hiliteall',false);
} else { message += '"'+pattern+'" '+_lc("not found"); }
alert(message+'.');
}
};
function clearDoc() {
var doc = editor._doc.body.innerHTML;
var er = /(<span\s+[^>]*id=.?frmark[^>]*>)([^<>]*)(<\/span>)/gi;
editor._doc.body.innerHTML = doc.replace(er,"$2");
pater = null;
tosearch = '';
fr_spans = new Array();
matches = 0;
replaces = 0;
disab("fr_hiliteall,fr_clear",true);
};
function clearMarks() {
var getall = editor._doc.body.getElementsByTagName("span");
for (var i = 0; i < getall.length; i++) {
var elm = getall[i];
if(/^frmark/.test(elm.id)) {
var objStyle = editor._doc.getElementById(elm.id).style;
objStyle.backgroundColor = "";
objStyle.color = "";
objStyle.fontWeight = "";
}
}
};
function hiliteAll() {
var getall = editor._doc.body.getElementsByTagName("span");
for (var i = 0; i < getall.length; i++) {
var elm = getall[i];
if(/^frmark/.test(elm.id)) {
var objStyle = editor._doc.getElementById(elm.id).style;
objStyle.backgroundColor = "highlight";
objStyle.color = "white";
objStyle.fontWeight = "bold";
}
}
};
function resetContents() {
if(buffer == null) return;
var transp = editor._doc.body.innerHTML;
editor._doc.body.innerHTML = buffer;
buffer = transp;
};
function disab(elms,toset) {
var names = elms.split(/[,; ]+/);
for(var i = 0; i < names.length; i++)
document.getElementById(names[i]).disabled = toset;
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

View File

@@ -0,0 +1,38 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8
// translated: gocher / udo.schmal@t-online.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.)
{
// messages
"Substitute this occurrence?": "Treffer ersetzen?",
"Enter the text you want to find": "Geben Sie einen Text ein den Sie finden möchten",
"Inform a replacement word": "Geben sie einen Text zum ersetzen ein",
"found items": "alle Treffer",
"replaced items": "ersetzte Treffer",
"found item": "Treffer",
"replaced item": "ersetzter Treffer",
"not found": "kein Teffer",
// window
"Find and Replace": "Suchen und ersetzen",
"Search for:": "Suchen nach:",
"Replace with:": "Ersetzen durch:",
"Options": "Optionen",
"Whole words only": "Ganze Wörter",
"Case sensitive search": "Groß-/Kleinschreibung",
"Substitute all occurrences": "alle Treffer ersetzen",
"Clear": "Nächstes ersetzen",
"Highlight": "Hervorheben",
"Undo": "Rückgängig",
"Next": "Nächster",
"Done": "Fertig"
}

View File

@@ -0,0 +1,26 @@
// I18N constants
// LANG: "fr", ENCODING: UTF-8
{
// messages
"Substitute this occurrence?": "Remplacer cette occurrence ?",
"Enter the text you want to find": "Texte à trouver",
"Inform a replacement word": "Geben sie einen Text zum ersetzen ein",
"found items": "éléments trouvés",
"replaced items": "éléments remplacés",
"found item": "élément trouvé",
"replaced item": "élément remplacé",
"not found": "non trouvé",
// window
"Find and Replace": "Chercher et Remplacer",
"Search for:": "Chercher",
"Replace with:": "Remplacer par",
"Options": "Options",
"Whole words only": "Mots entiers seulement",
"Case sensitive search": "Recherche sensible à la casse",
"Substitute all occurrences": "Remplacer toutes les occurences",
"Clear": "Effacer",
"Highlight": "Surligner",
"Undo": "Annuler",
"Next": "Suivant",
"Done": "Fin"
}

View File

@@ -0,0 +1,28 @@
// I18N constants
// LANG: "no", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
{
// messages
"Substitute this occurrence?": "Vennligst bekreft at du vil erstatte?",
"Enter the text you want to find": "Skriv inn teksten du ønsker å finne",
"Inform a replacement word": "Vennligst skriv inn et erstattningsord / settning",
"found items": "forekomster funnet i søket",
"replaced items": "forekomster erstattet",
"found item": "Treff",
"replaced item": "erstattet treff",
"not found": "ikke funnet",
// window
"Find and Replace": "Søk og erstatt",
"Search for:": "Søk etter:",
"Replace with:": "Erstatt med:",
"Options": "Valg",
"Whole words only": "Bare hele ord",
"Case sensitive search": "Skille mellom store og små bokstaver",
"Substitute all occurrences": "Erstatt alle treff",
"Clear": "Tøm",
"Highlight": "Uthev",
"Undo": "Tilbake",
"Next": "Neste",
"Done": "Ferdig"
}

View File

@@ -0,0 +1,38 @@
/ I18N constants
// LANG: "pl", ENCODING: UTF-8
// translated: Krzysztof Kotowicz, koto1sa@o2.pl, http://www.eskot.krakow.pl/portfolio
// 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.)
{
// messages
"Substitute this occurrence?": "Zamienić to wystąpienie?",
"Enter the text you want to find": "Podaj tekst, jaki chcesz wyszukać",
"Inform a replacement word": "Podaj tekst do zamiany",
"found items": "znalezionych",
"replaced items": "zamienionych",
"found item": "znaleziony",
"replaced item": "zamieniony",
"not found": "nie znaleziony",
// window
"Find and Replace": "Znajdź i zamień",
"Search for:": "Szukaj:",
"Replace with:": "Zamień na:",
"Options": "Opcje",
"Whole words only": "Całe słowa",
"Case sensitive search": "Wg wielkości liter",
"Substitute all occurrences": "Zamień wszystkie wystąpienia",
"Clear": "Wyczyść",
"Highlight": "Podświetl",
"Undo": "Cofnij",
"Next": "Następny",
"Done": "Gotowe"
}

View File

@@ -0,0 +1,35 @@
/*---------------------------------------*\
Find and Replace Plugin for HTMLArea-3.0
by Cau guanabara (independent developer)
e-mail: caugb@ibest.com.br
* Feito no Brasil *
\*---------------------------------------*/
// I18N {pt-br) for FindReplace plugin
{
// mensagens
"Substitute this occurrence?": "Substituir?",
"Enter the text you want to find": "Digite um termo para a busca",
"Inform a replacement word": "Informe um termo para a substituição",
"found items": "itens localizados",
"replaced items": "itens substituídos",
"found item": "item localizado",
"replaced item": "item substituído",
"not found": "não encontrado",
// janela
"Find and Replace": "Localizar e Substituir",
"Search for:": "Localizar:",
"Replace with:": "Substituir por:",
"Options": "Opções",
"Whole words only": "Apenas palavras inteiras",
"Case sensitive search": "Diferenciar caixa alta/baixa",
"Substitute all occurrences": "Substituir todas",
"Highlight": "Remarcar",
"Clear": "Limpar",
"Undo": "Desfazer",
"Next": "Próxima",
"Done": "Concluído"
};

View File

@@ -0,0 +1,162 @@
<html>
<head>
<title>Find and Replace</title>
<!--
/*---------------------------------------*\
Find and Replace Plugin for HTMLArea-3.0
-----------------------------------------
author: Cau guanabara
e-mail: caugb@ibest.com.br
\*---------------------------------------*/
-->
<script type="text/javascript" src="../fr_engine.js"></script>
<script type="text/javascript" src="../../../popups/popup.js"></script>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript">
window.resizeTo(335, 250);
var accepted = {
'fr_pattern' : true,
'fr_replacement' : true,
'fr_words' : true,
'fr_matchcase' : true,
'fr_replaceall' : true
};
function Init() {
__dlg_translate('FindReplace');
__dlg_init();
disab("fr_undo,fr_clear,fr_hiliteall",true);
var params = window.dialogArguments;
if(params) {
document.getElementById('fr_pattern').value = params["fr_pattern"];
document.getElementById('fr_replacement').focus();
} else {
document.getElementById('fr_pattern').focus();
}
document.body.onkeypress = __dlg_key_press;
};
function onCancel() {
clearDoc();
__dlg_close(null);
return false;
};
function onOK() {
var required = {'fr_pattern' : _lc("Enter the text you want to find")};
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.type == 'checkbox' ? el.checked : el.value;
}
execSearch(param);
return false;
};
function __dlg_key_press(ev) {
ev || (ev = window.event);
switch(ev.keyCode) {
case 13:
document.getElementById('fr_go').click();
document.getElementById('fr_pattern').focus();
break;
case 27:
clearDoc();
window.close();
return false;
}
return true;
};
</script>
<style type="text/css">
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 { border-top: 1px solid #999; padding: 2px; text-align: right; }
.hrstyle { border-width: 1px; border-color: #666; width: 95%; padding: 2px; }
</style>
</head>
<body class="dialog" onload="Init()">
<form action="" method="get">
<div class="title" style="width: 310px">Find and Replace</div>
<table border="0" style="width: 100%; padding: 2px;"><!---->
<tbody>
<tr>
<td width="29%" align="right" valign="bottom">Search for:</td>
<td width="71%" colspan="2" valign="bottom">
<input id="fr_pattern" type="text" style="width: 200px" onFocus="this.select();">
</td>
</tr>
<tr>
<td align="right">Replace with:</td>
<td colspan="2">
<input id="fr_replacement" type="text" style="width: 200px" onFocus="this.select();">
</td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr>
<td width="78%" style="padding: 2px">
<FIELDSET style="width:90%; padding: 5px">
<LEGEND><span>Options</span></LEGEND>
<input id="fr_words" type="checkbox" checked onClick="clearDoc();">
<span onClick="e = document.getElementById('fr_words');
e.click(); e.focus();" style="cursor:default">
<span>Whole words only</span></span><br />
<input id="fr_matchcase" type="checkbox" onClick="clearDoc();">
<span onClick="e = document.getElementById('fr_matchcase');
e.click(); e.focus();" style="cursor:default">
<span>Case sensitive search</span></span><br />
<input id="fr_replaceall" type="checkbox" onClick="
if(document.getElementById('fr_replacement').value == '') {
alert(_lc('Inform a replacement word'));
return false;
}
clearDoc();">
<span onClick="e = document.getElementById('fr_replaceall');
e.click(); e.focus();" style="cursor:default">
<span>Substitute all occurrences</span></span>
</FIELDSET></td>
<td width="22%" align="center" valign="bottom" style="text-align: right; padding: 4px">
<button type="button" id="fr_clear" onClick="clearMarks()">Clear</button>
<div class="space"></div>
<button type="button" id="fr_hiliteall" onClick="hiliteAll()">Highlight</button>
<div class="space"></div>
<button type="button" id="fr_undo" onClick="resetContents();">Undo</button>
</td>
</tr>
</table></td>
</tr>
</tbody>
</table>
<div style="border-top: 1px solid #999; padding: 2px; padding: 5px; text-align: right; height: 20px"><button type="button" id="fr_go" onclick="return onOK();">Next</button>
<button type="button" name="cancel" onclick="return onCancel();">Done</button>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,3 @@
form {
border: 1px dotted red;
}

View File

@@ -0,0 +1,354 @@
// Form plugin for HTMLArea
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
function Forms(editor) {
this.editor = editor;
var cfg = editor.config;
var bl = Forms.btnList;
var self = this;
// register the toolbar buttons provided by this plugin
var toolbar = ["linebreak"];
for (var i = 0; i < bl.length; ++i) {
var btn = bl[i];
if (!btn) {
toolbar.push("separator");
} else {
var id = btn[0];
cfg.registerButton(id, HTMLArea._lc(btn[1]), editor.imgURL("ed_" + btn[0] + ".gif", "Forms"), false,
function(editor, id) {
// dispatch button press event
self.buttonPress(editor, id);
});
toolbar.push(id);
}
}
// add a new line in the toolbar
cfg.toolbar.push(toolbar);
};
Forms._pluginInfo = {
name : "Forms",
origin : "version: 1.0, by Nelson Bright, BrightWork, Inc., http://www.brightworkweb.com",
version : "2.0",
developer : "Udo Schmal",
developer_url : "",
sponsor : "L.N.Schaffrath NeueMedien",
sponsor_url : "http://www.schaffrath-neuemedien.de/",
c_owner : "Udo Schmal & Schaffrath-NeueMedien",
license : "htmlArea"
};
// the list of buttons added by this plugin
Forms.btnList = [
// form properties button
null, // separator
["form", "Form"],
null, // separator
// form elements
["textarea", "Textarea"],
["select", "Selection Field"],
["checkbox", "Checkbox"],
["radio", "Radio Button"],
["text", "Text Field"],
["password", "Password Field"],
["file", "File Field"],
["button", "Button"],
["submit", "Submit Button"],
["reset", "Reset Button"],
["image", "Image Button"],
["hidden", "Hidden Field"],
["label", "Label"],
["fieldset", "Field Set"]
];
Forms.prototype._lc = function(string) {
return HTMLArea._lc(string, 'Forms');
}
Forms.prototype.onGenerate = function() {
var style_id = "Form-style"
var style = this.editor._doc.getElementById(style_id);
if (style == null) {
style = this.editor._doc.createElement("link");
style.id = style_id;
style.rel = 'stylesheet';
style.href = _editor_url + 'plugins/Forms/forms.css';
this.editor._doc.getElementsByTagName("HEAD")[0].appendChild(style);
}
}
Forms.prototype.buttonPress = function(editor,button_id, node) {
function optionValues(text,value) {
this.text = text;
this.value = value;
}
var outparam = new Object();
var type = button_id;
var sel = editor._getSelection();
var range = editor._createRange(sel);
if (button_id=="form") { //Form
// see if selection is inside an existing 'form' tag
var pe = editor.getParentElement();
var frm = null;
while (pe && (pe.nodeType == 1) && (pe.tagName.toLowerCase() != 'body')) {
if(pe.tagName.toLowerCase() == "form") {
frm = pe;
break;
} else
pe = pe.parentNode;
}
if (frm) {
outparam.f_name = frm.name;
outparam.f_action = frm.action;
outparam.f_method = frm.method;
outparam.f_enctype = frm.enctype;
outparam.f_target = frm.target;
} else {;
outparam.f_name = "";
outparam.f_action = "";
outparam.f_method = "";
outparam.f_enctype = "";
outparam.f_target = "";
}
editor._popupDialog("plugin://Forms/form", function(param) {
if (param) {
if(frm) {
frm.name = param["f_name"];
setAttr(frm, "action", param["f_action"]);
setAttr(frm, "method", param["f_method"]);
setAttr(frm, "enctype",param["f_enctype"]);
setAttr(frm, "target", param["f_target"]);
} else {
frm = '<form name="' + param["f_name"] + '"';
if (param["f_action"] != "") frm += ' action="' + param["f_action"] + '"';
if (param["f_method"] != "") frm += ' method="' + param["f_method"] + '"';
if (param["f_enctype"] != "") frm += ' enctype="' + param["f_enctype"] + '"';
if (param["f_target"] != "") frm += ' target="' + param["f_target"] + '"';
frm += '>';
editor.surroundHTML(frm, '&nbsp;</form>');
}
}
}, outparam);
} else { // form element (checkbox, radio, text, password, textarea, select, button, submit, reset, image, hidden)
var tagName = "";
// see if selection is an form element
if (typeof node == "undefined") {
node = editor.getParentElement();
var tag = node.tagName.toLowerCase()
if (node && (tag == "legend")) {
node = node.parentElement;
tag = node.tagName.toLowerCase();
}
if (node && !(tag == "textarea" || tag == "select" || tag == "input" || tag == "label" || tag == "fieldset"))
node = null;
}
if(node) {
type = node.tagName.toLowerCase();
outparam.f_name = node.name;
tagName = node.tagName;
if (type == "input") {
outparam.f_type = node.type;
type = node.type;
}
switch (type) {
case "textarea":
outparam.f_cols = node.cols;
outparam.f_rows = node.rows;
outparam.f_text = node.innerHTML;
outparam.f_wrap = node.getAttribute("wrap");
outparam.f_readOnly = node.getAttribute("readOnly");
outparam.f_disabled = node.getAttribute("disabled");
outparam.f_tabindex = node.getAttribute("tabindex");
outparam.f_accesskey = node.getAttribute("accesskey");
break;
case "select":
outparam.f_size = parseInt(node.size);
outparam.f_multiple = node.getAttribute("multiple");
outparam.f_disabled = node.getAttribute("disabled");
outparam.f_tabindex = node.getAttribute("tabindex");
var a_options = new Array();
for (var i=0; i<=node.options.length-1; i++) {
a_options[i] = new optionValues(node.options[i].text, node.options[i].value);
};
outparam.f_options = a_options;
break;
case "text":
case "password":
outparam.f_value = node.value;
outparam.f_size = node.size;
outparam.f_maxLength = node.maxLength;
outparam.f_readOnly = node.getAttribute("readOnly");
outparam.f_disabled = node.getAttribute("disabled");
outparam.f_tabindex = node.getAttribute("tabindex");
outparam.f_accesskey = node.getAttribute("accesskey");
break;
case "hidden":
outparam.f_value = node.value;
break;
case "submit":
case "reset":
outparam.f_value = node.value;
outparam.f_disabled = node.getAttribute("disabled");
outparam.f_tabindex = node.getAttribute("tabindex");
outparam.f_accesskey = node.getAttribute("accesskey");
break;
case "checkbox":
case "radio":
outparam.f_value = node.value;
outparam.f_checked = node.checked;
outparam.f_disabled = node.getAttribute("disabled");
outparam.f_tabindex = node.getAttribute("tabindex");
outparam.f_accesskey = node.getAttribute("accesskey");
break;
case "button":
outparam.f_value = node.value;
outparam.f_onclick = node.getAttribute("onclick");
outparam.f_disabled = node.getAttribute("disabled");
outparam.f_tabindex = node.getAttribute("tabindex");
outparam.f_accesskey = node.getAttribute("accesskey");
break;
case "image":
outparam.f_value = node.value;
outparam.f_src = node.src;
outparam.f_disabled = node.getAttribute("disabled");
outparam.f_tabindex = node.getAttribute("tabindex");
outparam.f_accesskey = node.getAttribute("accesskey");
break;
case "file":
outparam.f_disabled = node.getAttribute("disabled");
outparam.f_tabindex = node.getAttribute("tabindex");
outparam.f_accesskey = node.getAttribute("accesskey");
break;
case "label":
outparam.f_text = node.innerHTML;
outparam.f_for = node.getAttribute("for");
outparam.f_accesskey = node.getAttribute("accesskey");
break;
case "fieldset":
if(node.firstChild.tagName.toLowerCase()=="legend")
outparam.f_text = node.firstChild.innerHTML;
else
outparam.f_text = "";
break;
}
} else {
outparam.f_name = "";
switch (button_id) {
case "textarea":
case "select":
case "label":
case "fieldset":
tagName = button_id;
break;
default:
tagName = "input";
outparam.f_type = button_id;
break;
}
outparam.f_options = "";
outparam.f_cols = "20";
outparam.f_rows = "4";
outparam.f_multiple = "false";
outparam.f_value = "";
outparam.f_size = "";
outparam.f_maxLength = "";
outparam.f_checked = "";
outparam.f_src = "";
outparam.f_onclick = "";
outparam.f_wrap = "";
outparam.f_readOnly = "false";
outparam.f_disabled = "false";
outparam.f_tabindex = "";
outparam.f_accesskey = "";
outparam.f_for = "";
outparam.f_text = "";
outparam.f_legend = "";
};
editor._popupDialog("plugin://Forms/" + tagName + ".html", function(param) {
if (param) {
if(param["f_cols"])
if (isNaN(parseInt(param["f_cols"],10)) || parseInt(param["f_cols"],10) <= 0)
param["f_cols"] = "";
if(param["f_rows"])
if(isNaN(parseInt(param["f_rows"],10)) || parseInt(param["f_rows"],10) <= 0)
param["f_rows"] = "";
if(param["f_size"])
if(isNaN(parseInt(param["f_size"],10)) || parseInt(param["f_size"],10) <= 0)
param["f_size"] = "";
if(param["f_maxlength"])
if(isNaN(parseInt(param["f_maxLength"],10)) || parseInt(param["f_maxLength"],10) <= 0)
param["f_maxLength"] = "";
if(node) {
//prepare existing Element
for (field in param) {
alert(field.substring(2,20) + '=' + param[field]);
if ((field=="f_text") || (field=="f_options") || (field=="f_onclick") || (field=="f_checked"))continue;
if (param[field] != "")
node.setAttribute(field.substring(2,20), param[field]);
else
node.removeAttribute(field.substring(2,20));
}
if (type == "textarea") {
node.innerHTML = param["f_text"];
} else if(type == "select") {
node.options.length = 0;
var optionsList = param["f_options"];
for (i=0; i<= optionsList.length-1; i++) {
node.options[i] = new Option(optionsList[i].text, optionsList[i].value)
}
} else if(type == "label") {
node.innerHTML = param["f_text"];
} else if(type == "fieldset") {
if(outparam.f_text != "") {
if(node.firstChild.tagName.toLowerCase()=="legend")
node.firstChild.innerHTML = param["f_text"];
} else {}// not implemented jet
} else if((type == "checkbox") || (type == "radio")) { //input
if(param["f_checked"]!="")
node.checked = true;
else
node.checked = false;
} else {
if(param["f_onclick"]){
node.onclick = "";
if(param["f_onclick"]!="")
node.onclick = param["f_onclick"];
}
}
} else {
//create Element
var text = "";
for (field in param) {
if (!param[field]) continue;
if ((param[field]=="") || (field=="f_text")|| (field=="f_options"))continue;
text += " " + field.substring(2,20) + '="' + param[field] + '"';
}
if(type == "textarea") {
text = '<textarea' + text + '>' + param["f_text"] + '</textarea>';
} else if(type == "select") {
text = '<select' + text + '>';
var optionsList = param["f_options"];
for (i=0; i<= optionsList.length-1; i++) {
text += '<option value="'+optionsList[i].value+'">'+optionsList[i].text+'</option>';
}
text += '</select>';
} else if(type == "label") {
text = '<label' + text + '>' + param["f_text"] + '</label>';
} else if(type == "fieldset") {
text = '<fieldset' + text + '>';
if (param["f_legend"] != "") text += '<legend>' + param["f_text"] + '</legend>';
text += '</fieldset>';
} else {
text = '<input type="'+type+'"' + text + '>';
}
editor.insertHTML(text);
}
}
}, outparam);
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 914 B

View File

@@ -0,0 +1,46 @@
<html>
<head>
<title>Insert/Edit Form Element FIELDSET</title>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript">
function Init() {
window.resizeTo(350,320);
__dlg_translate("Forms");
__dlg_init();
var param = window.dialogArguments;
document.getElementById("f_text").value = param["f_text"];
document.getElementById("f_text").focus();
};
function onOK() {
// pass data back to the calling window
var param = new Object();
param["f_text"] = document.getElementById("f_text").value;
__dlg_close(param);
return false;
};
function onCancel() {
__dlg_close(null);
return false;
};
</script>
</head>
<body class="dialog" onload="Init()">
<div id="f_type" class="title">Form Element: FIELDSET</div>
<form action="" method="get">
<div class="fr">Legend:</div>
<input type="text" name="text" id="f_text" />
<p />
<div id="buttons">
<button type="button" name="ok" onclick="return onOK();">OK</button>
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,90 @@
<html>
<head>
<title>Insert/Edit Form</title>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript">
var fields = ["f_name", "f_action", "f_method", "f_enctype", "f_target"];
function Init() {
window.resizeTo(400, 170);
__dlg_translate("Forms");
__dlg_init();
var param = window.dialogArguments;
for (var i in fields) {
document.getElementById(fields[i]).value = param[fields[i]];
}
document.getElementById("f_name").focus();
};
function onOK() {
var required = {
"f_name": "You must enter the form name"
};
for (var i in required) {
var el = document.getElementById(i);
if (!el.value) {
alert(required[i]);
el.focus();
return false;
}
}
// pass data back to the calling window
var param = new Object();
for (var i in fields) {
param[fields[i]] = document.getElementById(fields[i]).value;
}
__dlg_close(param);
return false;
};
function onCancel() {
__dlg_close(null);
return false;
};
</script>
</head>
<body class="dialog" onload="Init()">
<div class="title">Form</div>
<form action="" method="get">
<div class="fr">Form Name:</div>
<input type="text" name="name" id="f_name" size="20" title="Name" />
<p />
<fieldset>
<legend>Form handler script</legend>
<div class="space"></div>
<div class="fr">Action URL:</div>
<input name="action" id="f_action" type="text" size="30">
<p />
<div class="fr">Method:</div>
<select name="f_method" id="f_method">
<option value=""></option>
<option value="post">Post</option>
<option value="get">Get</option>
</select>
<div class="space"></div>
<div class="fr">Encoding:</div>
<select name="enctype" id="f_enctype">
<option value=""></option>
<option value="application/x-www-form-urlencoded">HTML-Form to CGI (default)</option>
<option value="multipart/form-data">multipart Form Data (File-Upload)</option>
</select>
<p />
<div class="fr">Target Frame:</div>
<input name="target" id="f_target" type="text" size="30">
<p />
</fieldset>
<div id="buttons">
<button type="button" name="ok" onclick="return onOK();">OK</button>
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,179 @@
<html>
<head>
<title>Insert/Edit Form Element INPUT</title>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript">
var fields = null;
var type;
function Init() {
__dlg_translate("Forms");
__dlg_init();
var param = window.dialogArguments;
type = param.f_type;
document.getElementById("f_type").innerHTML = 'Form Element: INPUT (' + type + ')';
document.getElementById("txt").style.display = "none";
document.getElementById("chk").style.display = "none";
document.getElementById("btn").style.display = "none";
document.getElementById("img").style.display = "none";
switch (type) {
case "text":
case "password":
fields = ["f_name", "f_value", "f_readOnly", "f_disabled", "f_tabindex", "f_accesskey", "f_size", "f_maxLength"];
height = 350;
document.getElementById("txt").style.display = "block";
break;
case "checkbox":
case "radio":
fields = ["f_name", "f_value", "f_checked", "f_disabled", "f_tabindex", "f_accesskey"];
document.getElementById("chk").style.display = "block";
height = 280;
break;
case "button":
fields = ["f_name", "f_value", "f_disabled", "f_onclick", "f_tabindex", "f_accesskey"];
document.getElementById("btn").style.display = "block";
height = 300;
break;
case "file":
fields = ["f_name", "f_disabled", "f_tabindex", "f_accesskey"];
document.getElementById("f_value").disabled = true;
height = 280;
break;
case "image":
fields = ["f_name", "f_disabled", "f_tabindex", "f_accesskey", "f_src"];
document.getElementById("img").style.display = "block";
document.getElementById("f_value").disabled = true;
height = 300;
break;
case "reset":
case "submit":
fields = ["f_name", "f_value", "f_disabled", "f_tabindex", "f_accesskey"];
height =260;
break;
case "hidden":
fields = ["f_name", "f_value"];
document.getElementById("f_disabled").disabled = true;
document.getElementById("f_tabindex").disabled = true;
document.getElementById("f_accesskey").disabled = true;
height =260;
break;
}
for (var i in fields) {
switch (fields[i]) {
case "f_readOnly":
case "f_disabled":
case "f_checked":
document.getElementById(fields[i]).checked = (param[fields[i]]==fields[i].substring(2,20)) || (param[fields[i]] == true); break;
default:
document.getElementById(fields[i]).value = param[fields[i]]; break;
}
}
window.resizeTo(320,height);
document.getElementById("f_name").focus();
};
function onOK() {
var el = document.getElementById("f_name");
if (!el.value) {
alert("You must enter a Name");
el.focus();
return false;
}
// pass data back to the calling window
var param = new Object();
for (var i in fields) {
switch (fields[i]) {
case "f_readOnly":
case "f_disabled":
case "f_checked":
if(HTMLArea.is_ie)
param[fields[i]] = (document.getElementById(fields[i]).checked)?true:"";
else
param[fields[i]] = (document.getElementById(fields[i]).checked)?fields[i].substring(2,20):"";
break;
default:
param[fields[i]] = document.getElementById(fields[i]).value; break;
}
}
__dlg_close(param);
return false;
};
function onCancel() {
__dlg_close(null);
return false;
};
</script>
</head>
<body class="dialog" onload="Init()">
<div id="f_type" class="title"></div>
<form action="" method="get">
<div class="fr">Name/ID:</div>
<input type="text" name="name" id="f_name" title="Name of the form input" />
<p />
<div class="fr">Value:</div>
<input type="text" name="value" id="f_value" title="Value of the form input" />
<p />
<div class="fr">Disabled</div>
<input type="checkbox" name="disabled" id="f_disabled" value="disabled" />
<p />
<div id="chk">
<div class="fr">Checked</div>
<input name="checked" id="f_checked" type="checkbox" />
<p />
</div>
<div class="fr">Tab Index:</div>
<input type="text" name="tabindex" id="f_tabindex" />
<p />
<div class="fr">Access Key:</div>
<input type="text" name="accesskey" id="f_accesskey" />
<p />
<div id="txt">
<div class="fr">Read Only</div>
<input type="checkbox" name="readOnly" id="f_readOnly" value="readOnly" />
<p />
<fieldset>
<legend>Dimensions</legend>
<div class="space"></div>
<div class="fr">Size:</div>
<input type="text" name="size" id="f_size" size="5" title="Size of text box in characters" />
<div class="space"></div>
<div class="fr">Max length:</div>
<input type="text" name="maxLength" id="f_maxLength" size="5" title="Maximum number of characters accepted" />
<div class="space"></div>
</fieldset>
</div>
<div id="btn">
<fieldset>
<legend> Button Script</legend>
<div class="space"></div>
<div class="fr">'onClick'=</div>
<input type="text" name="onClick" id="f_onclick" title="Javascript for button click" />
<div class="space"></div>
</fieldset>
</div>
<div id="img">
<fieldset>
<legend>Image source</legend>
<div class="space"></div>
<div class="fr">Image URL:</div>
<input type="text" name="src" id="f_src" title="URL of image" />
<div class="space"></div>
</fieldset>
</div>
<div id="buttons">
<button type="button" name="ok" onclick="return onOK();">OK</button>
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,59 @@
<html>
<head>
<title>Insert/Edit Form Element LABEL</title>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript">
var fields = ["f_text","f_for","f_accesskey"];
function Init() {
window.resizeTo(350,320);
__dlg_translate("Forms");
__dlg_init();
var param = window.dialogArguments;
for (var i in fields) {
document.getElementById(fields[i]).value = param[fields[i]];
}
document.getElementById("f_text").focus();
};
function onOK() {
// pass data back to the calling window
// pass data back to the calling window
var param = new Object();
for (var i in fields) {
param[fields[i]] = document.getElementById(fields[i]).value;
}
__dlg_close(param);
return false;
};
function onCancel() {
__dlg_close(null);
return false;
};
</script>
</head>
<body class="dialog" onload="Init()">
<div id="f_type" class="title">Form Element: LABEL</div>
<form action="" method="get">
<div class="fr">Text:</div>
<input type="text" name="text" id="f_text" />
<p />
<div class="fr">For Control:</div>
<input type="text" name="for" id="f_for" />
<p />
<div class="fr">Access Key:</div>
<input type="text" name="accesskey" id="f_accesskey" />
<p />
<div id="buttons">
<button type="button" name="ok" onclick="return onOK();">OK</button>
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,209 @@
<html>
<head>
<title>Insert/Edit Form Element SELECT</title>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript">
var fields = ["f_name", "f_size", "f_tabindex", "f_multiple", "f_disabled"];
function Init() {
window.resizeTo(350,320);
__dlg_translate("Forms");
__dlg_init();
var param = window.dialogArguments;
for (var i in fields) {
switch (fields[i]) {
case "f_multiple":
case "f_disabled":
document.getElementById(fields[i]).checked = (param[fields[i]]==fields[i].substring(2,20)) || (param[fields[i]] == true); break;
case "f_size":
document.getElementById(fields[i]).value = (param[fields[i]]<=0)?"":param[fields[i]]; break;
default:
document.getElementById(fields[i]).value = param[fields[i]]; break;
}
}
for (var i=0; i<=param.f_options.length-1; i++) {
document.getElementById("f_select").options[i] = new Option(param.f_options[i].text, param.f_options[i].value);
}
document.getElementById("f_name").focus();
};
function onOK() {
var el = document.getElementById("f_name");
if (!el.value) {
alert("You must enter a Name");
el.focus();
return false;
}
// pass data back to the calling window
var param = new Object();
for (var i in fields) {
switch (fields[i]) {
case "f_multiple":
if (document.getElementById("f_size").value=="1")
param["f_multiple"] = "";
else
param["f_multiple"] = (document.getElementById(fields[i]).checked)?"multiple":"";
break;
case "f_disabled":
param[fields[i]] = (document.getElementById(fields[i]).checked)?"disabled":""; break;
default:
param[fields[i]] = document.getElementById(fields[i]).value; break;
}
}
function optionValues(text,value) {
this.text = text;
this.value = value;
}
optionNodes = new Array(); // for option text/value pairs
for (var i=0; i<= document.getElementById("f_select").options.length-1; i++) {
optionNodes[i] = new optionValues(document.getElementById("f_select").options[i].text, document.getElementById("f_select").options[i].value);
}
param["f_options"] = optionNodes;
__dlg_close(param);
return false;
};
function onCancel() {
__dlg_close(null);
return false;
};
//functions to build select options list
//Populates Label and Value fields with selected option values
function getValues(){
var d = document;
d.getElementById("f_optionvalue").value = d.getElementById("f_select").options[d.getElementById("f_select").selectedIndex].value;
d.getElementById("f_optiontext").value = d.getElementById("f_select").options[d.getElementById("f_select").selectedIndex].text;
d.getElementById("f_update").value ="Update Option";
}
//Add or update options to the select box
function addItem(item) {
var d = document;
if (item.f_optiontext.value =="") {alert("Please enter a Label");}
else {
if (d.getElementById("f_select").options.selectedIndex != -1) { //update item
var indx = d.getElementById("f_select").options.selectedIndex;
d.getElementById("f_select").options[indx].text=d.getElementById("f_optiontext").value;
d.getElementById("f_select").options[indx].value=d.getElementById("f_optionvalue").value;
} else { //add new item
var newItem = d.getElementById("f_select").options.length++;
d.getElementById("f_select").options[newItem].text=d.getElementById("f_optiontext").value;
d.getElementById("f_select").options[newItem].value=d.getElementById("f_optionvalue").value;
}
d.getElementById("f_select").selectedIndex = -1; //deselect
d.getElementById("f_optiontext").value="";//clean up
d.getElementById("f_optionvalue").value="";
d.getElementById("f_update").value ="Add Option";
d.getElementById("f_optiontext").focus();
}
}
//Clears selected option
function deleteItem() {
var d = document;
for (var i = d.getElementById("f_select").options.length - 1; i>=0; i--) {
var opt = d.getElementById("f_select").options[i];
if (opt.selected) {
d.getElementById("f_select").options[i] = null;
}
}
d.getElementById("f_select").selectedIndex = -1;
d.getElementById("f_optiontext").value="";
d.getElementById("f_optionvalue").value="";
d.getElementById("f_optiontext").focus();
}
//Moves selected option up
function moveOptionUp() {
var d = document;
for (i=0; i<d.getElementById("f_select").options.length; i++) {
if (d.getElementById("f_select").options[i].selected) {
if (i != 0 && !d.getElementById("f_select").options[i-1].selected) {
swapOptions(d.getElementById("f_select"),i,i-1);
d.getElementById("f_select").options[i-1].selected = true;
}
}
}
}
//Moves selected option down
function moveOptionDown() {
var d = document;
for (i=d.getElementById("f_select").options.length-1; i>=0; i--) {
if (d.getElementById("f_select").options[i].selected) {
if (i != (d.getElementById("f_select").options.length-1) && ! d.getElementById("f_select").options[i+1].selected) {
swapOptions(d.getElementById("f_select"),i,i+1);
d.getElementById("f_select").options[i+1].selected = true;
}
}
}
}
function swapOptions(obj,i,j) {
var o = obj.options;
var i_selected = o[i].selected;
var j_selected = o[j].selected;
var temp = new Option(o[i].text, o[i].value);
var temp2= new Option(o[j].text, o[j].value);
o[i] = temp2;
o[j] = temp;
o[i].selected = j_selected;
o[j].selected = i_selected;
}
</script>
</head>
<body class="dialog" onload="Init()">
<div id="f_type" class="title">Form Element: SELECT</div>
<form action="" method="get">
<div class="fr">Name/ID:</div>
<input type="text" name="name" id="f_name" title="Name of the form select" />
<p />
<div class="fr">Size:</div>
<input name="size" id="f_size" type="text" value="" size="15" />
<p />
<div class="fr"><nobr>Multiple Select</nobr></div>
<input name="multiple" id="f_multiple" type="checkbox" value="multiple" />
<p />
<div class="fr">Disabled</div>
<input type="checkbox" name="disabled" id="f_disabled" value="disabled" />
<p />
<div class="fr">Tab Index:</div>
<input type="text" name="tabindex" id="f_tabindex" />
<p />
<div class="space"></div>
<fieldset id="fldLayout">
<legend>Options</legend>
<table border="0" cellspacing="0" width="100%">
<tr>
<td align="right">
<select name="select" id="f_select" Size="6" onchange="getValues();" style="width:16em">
</select>
</td>
<td align="center">
<input type="button" name="up" value="Move Up" style="width:6em" onClick="moveOptionUp()"><br />
<input type="button" name="down" value="Move Down" style="width:6em" onClick="moveOptionDown()"><br />
<input type="button" name="delete" value="Delete" style="width:6em" onClick="deleteItem();">
</td>
</tr>
</table>
<div class="space"></div>
<table border="0" cellspacing="0" width="100%">
<tr>
<td align="right">Lable:</td>
<td><input type="text" id="f_optiontext" name="optionText" value="" size="15"></td>
<td align="right">Value:</td>
<td><input name="optionValue" id="f_optionvalue" type="text" value="" size="15"></td>
<td><input type="button" name="update" id="f_update" value="Add" onclick="addItem(document.forms[0])"></td>
</tr>
</table>
</fieldset>
<div id="buttons">
<button type="button" name="ok" onclick="return onOK();">OK</button>
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,113 @@
<html>
<head>
<title>Insert/Edit Form Element TEXTAREA</title>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript">
var fields = ["f_name", "f_text", "f_cols", "f_rows", "f_wrap", "f_tabindex", "f_accesskey", "f_readOnly", "f_disabled"];
function Init() {
window.resizeTo(280,260);
__dlg_translate("Forms");
__dlg_init();
var param = window.dialogArguments;
for (var i in fields) {
switch (fields[i]) {
case "f_readOnly":
case "f_disabled":
document.getElementById(fields[i]).checked = (param[fields[i]]==fields[i].substring(2,20)) || (param[fields[i]] == true); break;
default:
document.getElementById(fields[i]).value = param[fields[i]]; break;
}
}
document.getElementById("f_name").focus();
};
function onOK() {
var el = document.getElementById("f_name");
if (!el.value) {
alert("You must enter a Name");
el.focus();
return false;
}
// pass data back to the calling window
var param = new Object();
for (var i in fields) {
switch (fields[i]) {
case "f_readOnly":
case "f_disabled":
if(HTMLArea.is_ie)
param[fields[i]] = (document.getElementById(fields[i]).checked)?true:"";
else
param[fields[i]] = (document.getElementById(fields[i]).checked)?fields[i].substring(2,20):"";
break;
default:
param[fields[i]] = document.getElementById(fields[i]).value; break;
}
}
__dlg_close(param);
return false;
};
function onCancel() {
__dlg_close(null);
return false;
};
</script>
</head>
<body class="dialog" onload="Init()">
<div id="f_type" class="title">Form Element: TEXTAREA</div>
<form action="" method="get">
<div class="fr">Name/ID:</div>
<input type="text" name="name" id="f_name" title="name of the textarea" />
<p />
<fieldset>
<legend>Dimensions</legend>
<div class="fr">Columns:</div>
<input type="text" name="cols" id="f_cols" size="5" title="Width in number of characters" />
<p />
<div class="fr">Rows:</div>
<input type="text" name="rows" id="f_rows" size="5" title="Height in number of rows" />
<p />
</fieldset>
<div class="space"></div>
<div class="fr">Wrap Mode:</div>
<select name="wrap" id="f_wrap">
<option value=""></option>
<option value="off">Off</option>
<option value="soft">Soft</option>
<option value="hard">Hard</option>
<option value="physical">Physical</option>
<option value="virtual">Virtual</option>
<option value="normal">normal</option>
<option value="nowrap">nowrap</option>
<option value="pre">pre</option>
</select>
<p />
<div class="fr">Read Only</div>
<input type="checkbox" name="readOnly" id="f_readOnly" value="readOnly" />
<p />
<div class="fr">Disabled</div>
<input type="checkbox" name="disabled" id="f_disabled" value="disabled" />
<p />
<div class="fr">Tab Index:</div>
<input type="text" name="tabindex" id="f_tabindex" />
<p />
<div class="fr">Access Key:</div>
<input type="text" name="accesskey" id="f_accesskey" />
<p />
<div class="fr">Initial Text:</div>
<input type="text" name="text" id="f_text" title="Default text (optional)" />
<div id="buttons">
<button type="button" name="ok" onclick="return onOK();">OK</button>
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,208 @@
// FullPage Plugin for HTMLArea-3.0
// Implementation by Mihai Bazon. Sponsored by http://thycotic.com
//
// htmlArea v3.0 - Copyright (c) 2002 interactivetools.com, inc.
// This notice MUST stay intact for use (see license.txt).
//
// A free WYSIWYG editor replacement for <textarea> fields.
// For full source code and docs, visit http://www.interactivetools.com/
//
// Version 3.0 developed by Mihai Bazon for InteractiveTools.
// http://dynarch.com/mishoo
//
// $Id$
function FullPage(editor) {
this.editor = editor;
var cfg = editor.config;
cfg.fullPage = true;
var self = this;
cfg.registerButton("FP-docprop", this._lc("Document properties"), editor.imgURL("docprop.gif", "FullPage"), false,
function(editor, id) {
self.buttonPress(editor, id);
});
// add a new line in the toolbar
cfg.addToolbarElement(["separator","FP-docprop"],"separator",-1);
};
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._lc = function(string) {
return HTMLArea._lc(string, 'FullPage');
}
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 keywords = '';
var description = '';
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];
} else if (/keywords/i.test(meta.name)) {
keywords = meta.content;
} else if (/description/i.test(meta.name)) {
description = meta.content;
}
}
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,
f_keywords : keywords,
f_description : description,
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;
var keywords = null;
var description = 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;
} else if (/keywords/i.test(meta.name)) {
keywords = meta;
} else if (/description/i.test(meta.name)) {
description = meta;
}
}
function createLink(alt) {
var link = doc.createElement("link");
link.rel = alt ? "alternate stylesheet" : "stylesheet";
head.appendChild(link);
return link;
};
function createMeta(httpEquiv, name, content) {
var meta = doc.createElement("meta");
if (httpEquiv!="") meta.httpEquiv = httpEquiv;
if (name!="") meta.name = 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);
if (!keywords && params.f_keywords)
keywords = createMeta("","keywords", params.f_keywords);
else if (params.f_keywords)
keywords.content = params.f_keywords;
else if (keywords)
head.removeChild(keywords);
if (!description && params.f_description)
description = createMeta("","description", params.f_description);
else if (params.f_description)
description.content = params.f_description;
else if (description)
head.removeChild(description);
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;
}
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

View File

@@ -0,0 +1,29 @@
// I18N for the FullPage plugin
// LANG: "de", ENCODING: UTF-8
// 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.)
{
"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:",
"Character set:": "Zeichensatz",
"Description:": "Beschreibung",
"Keywords:": "Schlüsselworte",
"UTF-8 (recommended)": "UTF-8 (empfohlen)"
}

View File

@@ -0,0 +1,17 @@
// I18N for the FullPage plugin
// LANG: "fr", ENCODING: UTF-8
{
"Alternate style-sheet:": "Feuille CSS alternative",
"Background color:": "Couleur d'arrière plan",
"Cancel": "Annuler",
"DOCTYPE:": "DOCTYPE",
"Document properties": "Propriétés du document",
"Document title:": "Titre du document",
"OK": "OK",
"Primary style-sheet:": "Feuille CSS primaire",
"Text color:": "Couleur de texte",
"Character set:": "Jeu de caractères",
"Description:": "Description",
"Keywords:": "Mots clés",
"UTF-8 (recommended)": "UTF-8 (recommandé)"
}

View 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.)
{
"Alternate style-sheet:": "גיליון סגנון אחר:",
"Background color:": "צבע רקע:",
"Cancel": "ביטול",
"DOCTYPE:": "DOCTYPE:",
"Document properties": "מאפייני מסמך",
"Document title:": "כותרת מסמך:",
"OK": "אישור",
"Primary style-sheet:": "גיליון סגנון ראשי:",
"Text color:": "צבע טקסט:"
}

View File

@@ -0,0 +1,24 @@
// I18N for the FullPage plugin
// LANG: "nl", ENCODING: UTF-8
// FOR TRANSLATORS:
// Nederlands: MadMiner basura@sitter.nl [2/2005]
// 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.)
{
"Alternate style-sheet:": "Wisselen van style-sheet:",
"Background color:": "Achtergrondkleur:",
"Cancel": "Annuleren",
"DOCTYPE:": "DOCTYPE:",
"Document properties": "Documenteigenschappen",
"Document title:": "Documenttitel:",
"OK": "OK",
"Primary style-sheet:": "Primaire style-sheet:",
"Text color:": "Tekstkleur:"
}

View File

@@ -0,0 +1,15 @@
// I18N constants
// LANG: "no", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
{
"Alternate style-sheet:": "Alternativt stilsett:",
"Background color:": "Bakgrunnsfarge:",
"Cancel": "Avbryt",
"DOCTYPE:": "DOCTYPE:",
"Document properties": "Egenskaper for dokument",
"Document title:": "Tittel på dokument:",
"OK": "OK",
"Primary style-sheet:": "Stilsett:",
"Text color:": "Tekstfarge:"
}

View File

@@ -0,0 +1,29 @@
// I18N for the FullPage plugin
// LANG: "pl", ENCODING: UTF-8
// translated: Krzysztof Kotowicz, koto1sa@o2.pl, http://www.eskot.krakow.pl/portfolio
// 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.)
{
"Alternate style-sheet:": "Alternatywny arkusz stylów:",
"Background color:": "Kolor tła:",
"Cancel": "Anuluj",
"DOCTYPE:": "DOCTYPE:",
"Document properties": "Właściwości dokumentu",
"Document title:": "Tytuł dokumentu:",
"OK": "OK",
"Primary style-sheet:": "Arkusz stylów:",
"Text color:": "Kolor tekstu:",
"Character set:": "Zestaw znaków",
"Description:": "Opis",
"Keywords:": "Słowa kluczowe",
"UTF-8 (recommended)": "UTF-8 (zalecany)"
}

View File

@@ -0,0 +1,25 @@
// I18N for the FullPage plugin
// LANG: "en", 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.)
{
"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:"
}

View File

@@ -0,0 +1,142 @@
<html>
<head>
<title>Document properties</title>
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript" src="../../../popups/color_picker.js"></script>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript">
FullPage = window.opener.FullPage; // load the FullPage plugin and lang file ;-)
window.resizeTo(400, 130);
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,
f_keywords : true,
f_description : true
};
var editor = null;
function Init() {
__dlg_translate('FullPage');
__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;
var bgCol_pick = document.getElementById('bgCol_pick');
var f_body_bgcolor = document.getElementById('f_body_bgcolor');
var bgColPicker = new colorPicker({cellsize:'5px',callback:function(color){f_body_bgcolor.value=color;}});
bgCol_pick.onclick = function() { bgColPicker.open('top,right', f_body_bgcolor ); }
var fgCol_pick = document.getElementById('fgCol_pick');
var f_body_fgcolor = document.getElementById('f_body_fgcolor');
var fgColPicker = new colorPicker({cellsize:'5px',callback:function(color){f_body_fgcolor.value=color;}});
fgCol_pick.onclick = function() { fgColPicker.open('top,right', f_body_fgcolor ); }
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">
.fr { width: 11em; float: left; padding: 2px 5px; text-align: right; }
.txt { width:200px; }
div { clear:both; }
.picker { width:30px; }
</style>
</head>
<body class="dialog" onload="Init()">
<div class="title">Document properties</div>
<div>
<label class="fr" for="f_title">Document title:</label>
<input type="text" id="f_title" class="txt" />
</div>
<div>
<label class="fr" for="f_doctype">DOCTYPE:</label>
<input type="text" id="f_doctype" class="txt" />
</div>
<div>
<label class="fr" for="f_keywords">Keywords:</label>
<input type="text" id="f_keywords" class="txt" />
</div>
<div>
<label class="fr" for="f_description">Description:</label>
<input type="text" id="f_description" class="txt" />
</div>
<div>
<label class="fr" for="f_charset">Character set:</label>
<select id="f_charset" class="txt">
<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>
</div>
<div>
<label class="fr" for="f_base_style">Primary style-sheet:</label>
<input type="text" id="f_base_style" class="txt" />
</div>
<div>
<label class="fr" for="f_alt_style">Alternate style-sheet:</label>
<input type="text" id="f_alt_style" class="txt" />
</div>
<div>
<label class="fr" for="f_body_bgcolor">Background color:</label>
<input name="f_body_bgcolor" type="text" id="f_body_bgcolor" size="7" />
<button type="button" id="bgCol_pick" class="picker">...</button>
</div>
<div>
<label class="fr" for="f_body_fgcolor">Text color:</label>
<input name="f_body_fgcolor" type="text" id="f_body_fgcolor" size="7" />
<button type="button" id="fgCol_pick" class="picker">...</button>
</div>
<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>

View 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%;">
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;FullPage plugin for HTMLArea&lt;/title&gt;
&lt;link rel="alternate stylesheet" href="http://dynarch.com/mishoo/css/dark.css" /&gt;
&lt;link rel="stylesheet" href="http://dynarch.com/mishoo/css/cool-light.css" /&gt;
&lt;/head&gt;
&lt;body style="background-color: #ddddee; color: #000077;"&gt;
&lt;table style="width:60%; height: 90%; margin: 2% auto 1% auto;" align="center" border="0" cellpadding="0" cellspacing="0"&gt;
&lt;tr&gt;
&lt;td style="background-color: #ddeedd; border: 2px solid #002; height: 1.5em; padding: 2px; font: bold 24px Verdana;"&gt;
FullPage plugin
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background-color: #fff; border: 1px solid #aab; padding: 1em 3em; font: 12px Verdana;"&gt;
&lt;p&gt;
This plugin enables one to edit a full HTML file in &lt;a
href="http://dynarch.com/htmlarea/"&gt;HTMLArea&lt;/a&gt;. This is not
normally possible with just the core editor since it only
retrieves the HTML inside the &lt;code&gt;body&lt;/code&gt; tag.
&lt;/p&gt;
&lt;p&gt;
It provides the ability to change the &lt;code&gt;DOCTYPE&lt;/code&gt; of
the document, &lt;code&gt;body&lt;/code&gt; &lt;code&gt;bgcolor&lt;/code&gt; and
&lt;code&gt;fgcolor&lt;/code&gt; attributes as well as to add additional
&lt;code&gt;link&lt;/code&gt;-ed stylesheets. Cool, eh?
&lt;/p&gt;
&lt;p&gt;
The development of this plugin was initiated and sponsored by
&lt;a href="http://thycotic.com"&gt;Thycotic Software Ltd.&lt;/a&gt;.
That's also cool, isn't it? ;-)
&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</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>

View File

@@ -0,0 +1,203 @@
function FullScreen(editor, args)
{
this.editor = editor;
editor._superclean_on = false;
cfg = editor.config;
cfg.registerButton
( 'fullscreen',
this._lc("Maximize/Minimize Editor"),
[_editor_url + cfg.imgURL + 'ed_buttons_main.gif',8,0], true,
function(e, objname, obj)
{
e._fullScreen();
if(e._isFullScreen)
{
obj.swapImage([_editor_url + cfg.imgURL + 'ed_buttons_main.gif',9,0]);
}
else
{
obj.swapImage([_editor_url + cfg.imgURL + 'ed_buttons_main.gif',8,0]);
}
}
);
// See if we can find 'popupeditor' and replace it with fullscreen
cfg.addToolbarElement("fullscreen", "popupeditor", 0);
}
FullScreen._pluginInfo =
{
name : "FullScreen",
version : "1.0",
developer: "James Sleeman",
developer_url: "http://www.gogo.co.nz/",
c_owner : "Gogo Internet Services",
license : "htmlArea",
sponsor : "Gogo Internet Services",
sponsor_url : "http://www.gogo.co.nz/"
};
FullScreen.prototype._lc = function(string) {
return HTMLArea._lc(string, 'FullScreen');
}
/** fullScreen makes an editor take up the full window space (and resizes when the browser is resized)
* the principle is the same as the "popupwindow" functionality in the original htmlArea, except
* this one doesn't popup a window (it just uses to positioning hackery) so it's much more reliable
* and much faster to switch between
*/
HTMLArea.prototype._fullScreen = function()
{
var e = this;
function sizeItUp()
{
if(!e._isFullScreen || e._sizing) return false;
e._sizing = true;
// Width & Height of window
var x,y;
if (window.innerHeight) // all except Explorer
{
x = window.innerWidth;
y = window.innerHeight;
}
else if (document.documentElement && document.documentElement.clientHeight)
// Explorer 6 Strict Mode
{
x = document.documentElement.clientWidth;
y = document.documentElement.clientHeight;
}
else if (document.body) // other Explorers
{
x = document.body.clientWidth;
y = document.body.clientHeight;
}
e.sizeEditor(x + 'px',y + 'px',true,true);
e._sizing = false;
}
function sizeItDown()
{
if(e._isFullScreen || e._sizing) return false;
e._sizing = true;
e.initSize();
e._sizing = false;
}
/** It's not possible to reliably get scroll events, particularly when we are hiding the scrollbars
* so we just reset the scroll ever so often while in fullscreen mode
*/
function resetScroll()
{
if(e._isFullScreen)
{
window.scroll(0,0);
window.setTimeout(resetScroll,150);
}
}
if(typeof this._isFullScreen == 'undefined')
{
this._isFullScreen = false;
if(e.target != e._iframe)
{
HTMLArea._addEvent(window, 'resize', sizeItUp);
}
}
// Gecko has a bug where if you change position/display on a
// designMode iframe that designMode dies.
if(HTMLArea.is_gecko)
{
this.deactivateEditor();
}
if(this._isFullScreen)
{
// Unmaximize
this._htmlArea.style.position = '';
try
{
if(HTMLArea.is_ie)
{
var bod = document.getElementsByTagName('html');
}
else
{
var bod = document.getElementsByTagName('body');
}
bod[0].style.overflow='';
}
catch(e)
{
// Nutthin
}
this._isFullScreen = false;
sizeItDown();
// Restore all ancestor positions
var ancestor = this._htmlArea;
while((ancestor = ancestor.parentNode) && ancestor.style)
{
ancestor.style.position = ancestor._xinha_fullScreenOldPosition;
ancestor._xinha_fullScreenOldPosition = null;
}
window.scroll(this._unScroll.x, this._unScroll.y);
}
else
{
// Get the current Scroll Positions
this._unScroll =
{
x:(window.pageXOffset)?(window.pageXOffset):(document.documentElement)?document.documentElement.scrollLeft:document.body.scrollLeft,
y:(window.pageYOffset)?(window.pageYOffset):(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop
};
// Make all ancestors position = static
var ancestor = this._htmlArea;
while((ancestor = ancestor.parentNode) && ancestor.style)
{
ancestor._xinha_fullScreenOldPosition = ancestor.style.position;
ancestor.style.position = 'static';
}
// Maximize
window.scroll(0,0);
this._htmlArea.style.position = 'absolute';
this._htmlArea.style.zIndex = 999;
this._htmlArea.style.left = 0;
this._htmlArea.style.top = 0;
this._isFullScreen = true;
resetScroll();
try
{
if(HTMLArea.is_ie)
{
var bod = document.getElementsByTagName('html');
}
else
{
var bod = document.getElementsByTagName('body');
}
bod[0].style.overflow='hidden';
}
catch(e)
{
// Nutthin
}
sizeItUp();
}
if(HTMLArea.is_gecko)
{
this.activateEditor();
}
this.focusEditor();
}

View File

@@ -0,0 +1,17 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8
// translated: Raimund Meyer xinha@ray-of-light.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.)
{
"Maximize/Minimize Editor": "Editor maximieren/verkleinern"
}

View File

@@ -0,0 +1,17 @@
// I18N constants
// LANG: "fr", ENCODING: UTF-8
// Author: Laurent Vilday, mokhet@mokhet.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.)
{
"Maximize/Minimize Editor": "Agrandir/Réduire l'éditeur"
}

View File

@@ -0,0 +1,7 @@
// I18N constants
// LANG: "no", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
{
"Maximize/Minimize Editor": "Maksimer/Minimer WYSIWYG vindu"
}

View File

@@ -0,0 +1,17 @@
// I18N constants
// LANG: "pl", ENCODING: UTF-8
// translated: Krzysztof Kotowicz, koto1sa@o2.pl, http://www.eskot.krakow.pl/portfolio
// 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.)
{
"Maximize/Minimize Editor": "Maksymalizuj/minimalizuj edytor"
}

View 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.interactivetools.com/products/htmlarea/). 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

View 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: yes
drop-font-tags: no
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

View File

@@ -0,0 +1,68 @@
<?php
##
## 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")
);
$process = proc_open("tidy -utf8 -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";
}
if(!sizeof($srcLines)) {
echo "alert(HTMLArea._lc('Tidy failed. Check your HTML for syntax errors.', 'HtmlTidy'));\n";
} else {
?>
var ns="";
<?php echo $jsMakeSrc; ?>
editor.setHTML(ns);
<? } ?>

View File

@@ -0,0 +1,105 @@
// 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 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, this._lc("HTML Tidy"), 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 btnTxt = [this._lc("Auto-Tidy"), this._lc("Don't Tidy")];
var optionItems = new Object();
optionItems[btnTxt[0]] = "auto";
optionItems[btnTxt[1]] = "noauto";
var ht_class = {
id : "HT-auto-tidy",
options : optionItems,
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._lc = function(string) {
return HTMLArea._lc(string, 'HtmlTidy');
}
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.buttonPress = function(editor, id) {
switch (id)
{
case "HT-html-tidy":
{
var oldhtml = editor.getHTML();
if(oldhtml=="") break; //don't clean empty text
// Ask the server for some nice new html, based on the old...
HTMLArea._postback(_editor_url + 'plugins/HtmlTidy/html-tidy-logic.php', {'htisource_name' : oldhtml},
function(javascriptResponse) { eval(javascriptResponse) });
}
break;
}
};
HtmlTidy.prototype.processTidied = function(newSrc) {
editor = this.editor;
editor.setHTML(newSrc);
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

View File

@@ -0,0 +1,17 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8
// Author: Raimund Meyer ray@ray-of-light.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.)
{
"HTML Tidy": "HTML Tidy"
}

View File

@@ -0,0 +1,17 @@
// I18N constants
// LANG: "fr", ENCODING: UTF-8
// Author: Laurent Vilday, mokhet@mokhet.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.)
{
"HTML Tidy": "HTML Tidy"
}

View File

@@ -0,0 +1,16 @@
// I18N constants
// LANG: "nl", ENCODING: UTF-8
// FOR TRANSLATORS:
// Nederlands: MadMiner basura@sitter.nl [2/2005]
// 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.)
{
"HT-html-tidy": "HTML opschonen"
}

View File

@@ -0,0 +1,7 @@
// I18N constants
// LANG: "no", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
{
"HTML Tidy": "HTML Tidy"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

View File

@@ -0,0 +1,9 @@
a.anchor {
width: 18px;
height: 18px;
background-image: url(img/insert-anchor.gif);
background-repeat: no-repeat;
background-position: left top;
padding-left: 19px;
border: 1px dotted blue;
}

View File

@@ -0,0 +1,97 @@
function InsertAnchor(editor) {
this.editor = editor;
var cfg = editor.config;
var self = this;
// register the toolbar buttons provided by this plugin
cfg.registerButton({
id : "insert-anchor",
tooltip : this._lc("Insert Anchor"),
image : editor.imgURL("insert-anchor.gif", "InsertAnchor"),
textMode : false,
action : function(editor) {
self.buttonPress(editor);
}
});
cfg.addToolbarElement("insert-anchor", "createlink", 1);
}
InsertAnchor._pluginInfo = {
name : "InsertAnchor",
origin : "version: 1.0, by Andre Rabold, MR Printware GmbH, http://www.mr-printware.de",
version : "2.0",
developer : "Udo Schmal",
developer_url : "http://www.schaffrath-neuemedien.de",
c_owner : "Udo Schmal",
sponsor : "L.N.Schaffrath NeueMedien",
sponsor_url : "http://www.schaffrath-neuemedien.de",
license : "htmlArea"
};
InsertAnchor.prototype._lc = function(string) {
return HTMLArea._lc(string, 'InsertAnchor');
}
InsertAnchor.prototype.onGenerate = function() {
var style_id = "IA-style"
var style = this.editor._doc.getElementById(style_id);
if (style == null) {
style = this.editor._doc.createElement("link");
style.id = style_id;
style.rel = 'stylesheet';
style.href = _editor_url + 'plugins/InsertAnchor/insert-anchor.css';
this.editor._doc.getElementsByTagName("HEAD")[0].appendChild(style);
}
}
InsertAnchor.prototype.buttonPress = function(editor) {
var outparam = null;
var html = editor.getSelectedHTML();
var sel = editor._getSelection();
var range = editor._createRange(sel);
var a = editor._activeElement(sel);
if(!(a != null && a.tagName.toLowerCase() == 'a')) {
a = editor._getFirstAncestor(sel, 'a');
}
if (a != null && a.tagName.toLowerCase() == 'a')
outparam = { name : a.id };
else
outparam = { name : '' };
editor._popupDialog( "plugin://InsertAnchor/insert_anchor", function( param ) {
if ( param ) {
var anchor = param["name"];
if (anchor == "" || anchor == null) {
if (a) {
var child = a.innerHTML;
a.parentNode.removeChild(a);
editor.insertHTML(child);
}
return;
}
try {
var doc = editor._doc;
if (!a) {
// editor.surroundHTML('<a id="' + anchor + '" name="' + anchor + '" title="' + anchor + '" class="anchor">', '</a>');
a = doc.createElement("a");
a.id = anchor;
a.name = anchor;
a.title = anchor;
a.className = "anchor";
a.innerHTML = html;
if (HTMLArea.is_ie) {
range.pasteHTML(a.outerHTML);
} else {
editor.insertNodeAtSelection(a);
}
} else {
a.id = anchor;
a.name = anchor;
a.title = anchor;
a.className = "anchor";
}
}
catch (e) { }
}
}, outparam);
}

View File

@@ -0,0 +1,10 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8
// translated: Raimund Meyer xinha@ray-of-light.org
{
"Insert Anchor": "Anker einfügen",
"Anchor name": "Name (ID)",
"Delete": "Löschen"
}

View File

@@ -0,0 +1,7 @@
// I18N constants
// LANG: "fr", ENCODING: UTF-8
{
"Insert Anchor": "Insérer une ancre",
"Anchor name": "Nom de l'ancre",
"Delete": "Supprimer"
}

View File

@@ -0,0 +1,8 @@
// I18N constants
// LANG: "no", ENCODING: UTF-8
// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
{
"Insert Anchor": "Sett inn anker",
"Anchor name": "Anker navn (ID)"
}

View File

@@ -0,0 +1,60 @@
<html>
<head>
<title>Insert Anchor</title>
<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript">
window.resizeTo(300, 150);
function Init() {
__dlg_translate("InsertAnchor");
__dlg_init();
window.resizeTo(400, 180);
var param = window.dialogArguments;
if (param) {
document.getElementById("name").value = param["name"];
}
document.getElementById("name").focus();
};
function onOK() {
// pass data back to the calling window
var param = new Object();
param["name"] = document.getElementById("name").value;
__dlg_close(param);
return false;
};
function onDelete() {
// pass data back to the calling window
var param = new Object();
param["name"] = "";
__dlg_close(param);
return false;
};
function onCancel() {
__dlg_close(null);
return false;
};
</script>
</head>
<body class="dialog" onload="Init()">
<div class="title">Insert Anchor</div>
<form>
<table border="0" style="width: 100%;">
<tr>
<td class="label">Anchor name</td>
<td><input type="text" id="name" style="width: 100%" /></td>
</tr>
</table>
<div id="buttons">
<button type="submit" name="ok" onclick="return onOK();">OK</button>
<button type="button" name="delete" onclick="return onDelete();">Delete</button>
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,282 @@
<?PHP
//this plugin only use the relativ webpath to the picturefolder
//default ~ /htmlarea/plugins/InsertPicture/demo_pictures/
strstr( PHP_OS, "WIN") ? $strPathSeparator = "\\" : $strPathSeparator = "/";
if (isset($_REQUEST['picturepath'])) {
$getRequest = true;
$PicturePath = 'http://'.$_SERVER['HTTP_HOST'].$_REQUEST['picturepath'];
//$LocalPicturePath = $_REQUEST['localpicturepath'];
$AInsertPicturePath = explode ('/', 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/demo_pictures/');
$ALocalInsertPicturePath = explode($strPathSeparator, dirname(__FILE__).$strPathSeparator.'demo_pictures');
$APicturePath = explode('/', 'http://'.$_SERVER['HTTP_HOST'].$_REQUEST['picturepath']);
$AtheFilePath = array_values (array_diff ($APicturePath, $AInsertPicturePath));
$theFilePath = implode($strPathSeparator, $AtheFilePath).$strPathSeparator;
$AtheRootPath = array_values (array_diff ($ALocalInsertPicturePath, $AInsertPicturePath));
$theRootPath = implode($strPathSeparator, $AtheRootPath);
$LocalPicturePath = $theRootPath.$strPathSeparator.$theFilePath.$strPathSeparator;
} else {
$getRequest = false;
$PicturePath = 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/demo_pictures/';
$LocalPicturePath = dirname(__FILE__).$strPathSeparator.'demo_pictures';
}
$limitedext = array(".gif",".jpg",".png",".jpeg"); //Extensions you want files uploaded limited to.
$limitedsize = "1000000"; //size limit in bytes
$message = "";
function formatSize($size)
{
if($size < 1024)
return $size.' bytes';
else if($size >= 1024 && $size < 1024*1024)
return sprintf('%01.2f',$size/1024.0).' Kb';
else
return sprintf('%01.2f',$size/(1024.0*1024)).' Mb';
}
if (isset($_FILES['file'])) {
$file = $_FILES['file'];
$ext = strrchr($file['name'],'.');
if (!in_array($ext,$limitedext)) {
$message = "The file you are uploading doesn't have the correct extension.";
} else if (file_exists($LocalPicturePath.'\\'.$file['name'])) {
$message = "The file you are uploading already exists.";
} else if ($file['size'] > $limitedsize) {
$message = "The file you are uploading is to big. The max Filesize is</span><span> ".formatSize($limitedsize).".";
} else {
copy($file['tmp_name'], $LocalPicturePath.$strPathSeparator.$file['name']);
}
}
?>
<html>
<head>
<title>Insert Image</title>
<link rel="stylesheet" type="text/css" href="../../popups/popup.css" />
<script type="text/javascript" src="../../popups/popup.js"></script>
<script type="text/javascript">
var HTMLArea = window.opener.HTMLArea;
function i18n(str) {
return (HTMLArea._lc(str, 'HTMLArea'));
};
function Init() {
__dlg_translate("InsertPicture");
__dlg_init();
window.resizeTo(470, 490);
// Make sure the translated string appears in the drop down. (for gecko)
document.getElementById("f_align").selectedIndex = 1;
document.getElementById("f_align").selectedIndex = 5;
var param = window.dialogArguments;
if (param) {
document.getElementById("f_url").value = param["f_url"];
document.getElementById("f_alt").value = param["f_alt"];
document.getElementById("f_border").value = param["f_border"];
document.getElementById("f_align").value = param["f_align"];
document.getElementById("f_vert").value = param["f_vert"];
document.getElementById("f_horiz").value = param["f_horiz"];
window.ipreview.location.replace(param.f_url);
}
document.getElementById("f_url").focus();
};
function onOK() {
var required = {
"f_url": i18n("You must enter the URL")
};
for (var i in required) {
var el = document.getElementById(i);
if (!el.value) {
alert(required[i]);
el.focus();
return false;
}
}
// pass data back to the calling window
var fields = ["f_url", "f_alt", "f_align", "f_border",
"f_horiz", "f_vert"];
var param = new Object();
for (var i in fields) {
var id = fields[i];
var el = document.getElementById(id);
param[id] = el.value;
}
__dlg_close(param);
return false;
};
function onUpload() {
var required = {
"file": i18n("Please select a file to upload.")
};
for (var i in required) {
var el = document.getElementById(i);
if (!el.value) {
alert(required[i]);
el.focus();
return false;
}
}
submit();
return false;
}
function onCancel() {
__dlg_close(null);
return false;
};
function onPreview() {
var f_url = document.getElementById("f_url");
var url = f_url.value;
if (!url) {
alert(i18n("You must enter the URL"));
f_url.focus();
return false;
}
if (document.all) {
window.ipreview.location.replace('viewpicture.html?'+url);
} else {
window.ipreview.location.replace(url);
}
return false;
};
function CopyToURL(imgName) {
document.getElementById("f_url").value = imgName;
onPreview();
};
function openFile() {
window.open(document.getElementById("f_url").value,'','');
}
</script>
</head>
<body class="dialog" onload="Init()">
<div class="title">Insert Image</div>
<table border="0" width="100%" style="padding: 0px; margin: 0px">
<tbody>
<tr>
<td>Images on the Server:<br>
<select value="" style="width:200" size="10" onClick="CopyToURL(this[this.selectedIndex].value);">
<?php
$d = @dir($LocalPicturePath);
while (false !== ($entry = $d->read())) { //not a dot file or directory
if(substr($entry,0,1) != '.') {
echo '<OPTION value="' . $PicturePath.$entry. '">' . $entry . '(' . formatSize(filesize($LocalPicturePath.'\\'.$entry)) .')</OPTION>';
}
}
$d->close();
?>
</select>
<?php
if ($getRequest == true) {
echo '<form method="post" action="'.$_SERVER['PHP_SELF'].'?picturepath='.$_REQUEST['picturepath'].'" enctype="multipart/form-data">';
} else {
echo '<form method="post" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data">';
}
?>
<input type="file" name="file" id="file" size="30"><br>
<button type="submit" name="ok" onclick="return onUpload();">Upload file</button><br>
<span><?php echo $message ?></span>
</form>
</td>
<td valign="center" width="200" height="230">
<span>Image Preview:</span>
<a href="#" onClick="javascript:openFile();"title=" Open file in new window"><img src="img/btn_open.gif" width="18" height="18" border="0" title="Open file in new window" /></a><br />
<iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;" height="200" width="200" src=""></iframe>
</td>
</tr>
</tbody>
</table>
<form action="" method="get">
<table border="0" width="100%" style="padding: 0px; margin: 0px">
<tbody>
<tr>
<td style="width: 7em; text-align: right">Image URL:</td>
<td><input type="text" name="url" id="f_url" style="width:75%"
title="Enter the image URL here" />
<button name="preview" onclick="return onPreview();"
title="Preview the image in a new window">Preview</button>
</td>
</tr>
<tr>
<td style="width: 7em; text-align: right">Alternate text:</td>
<td><input type="text" name="alt" id="f_alt" style="width:100%"
title="For browsers that don't support images" /></td>
</tr>
</tbody>
</table>
<p />
<fieldset style="float: left; margin-left: 5px;">
<legend>Layout</legend>
<div class="space"></div>
<div class="fl">Alignment:</div>
<select size="1" name="align" id="f_align"
title="Positioning of this image">
<option value="" >Not set</option>
<option value="left" >Left</option>
<option value="right" >Right</option>
<option value="texttop" >Texttop</option>
<option value="absmiddle" >Absmiddle</option>
<option value="baseline" selected="1" >Baseline</option>
<option value="absbottom" >Absbottom</option>
<option value="bottom" >Bottom</option>
<option value="middle" >Middle</option>
<option value="top" >Top</option>
</select>
<p />
<div class="fl">Border thickness:</div>
<input type="text" name="border" id="f_border" size="5"
title="Leave empty for no border" />
<div class="space"></div>
</fieldset>
<fieldset style="float:right; margin-right: 5px;">
<legend>Spacing</legend>
<div class="space"></div>
<div class="fr">Horizontal:</div>
<input type="text" name="horiz" id="f_horiz" size="5"
title="Horizontal padding" />
<p />
<div class="fr">Vertical:</div>
<input type="text" name="vert" id="f_vert" size="5"
title="Vertical padding" />
<div class="space"></div>
</fieldset>
<br clear="all" />
<div id="buttons">
<button type="submit" name="ok" onclick="return onOK();">OK</button>
<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
</div>
</form>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,93 @@
// Insert Image plugin for HTMLArea
// Original Author - Udo Schmal
//
// (c) www.Schaffrath-NeueMedien.de 2004
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
//Usage:
// if(typeof InsertPicture != 'undefined')
// { InsertPicture.PicturePath = [webpath to imagefolder];
// InsertPicture.LocalPicturePath = [local server path to imagefolder];
// }
// for Example:
// if(typeof InsertPicture != 'undefined')
// { InsertPicture.PicturePath = _editor_url + "plugins/insertPicture/demo_pictures/";
// InsertPicture.LocalPicturePath = "d:\\inetpub\\wwwroot\\xinha\\trunk\\plugins\\insertPicture\\demo_pictures";
// }
function InsertPicture(editor) {
// nothing to do
};
InsertPicture._pluginInfo = {
name : "InsertPicture",
version : "1.0.1",
developer : "Udo Schmal",
developer_url : "http://www.Schaffrath-NeueMedien.de/",
sponsor : "L.N.Schaffrath NeueMedien",
sponsor_url : "http://www.schaffrath-neuemedien.de/",
c_owner : "Udo Schmal",
license : "htmlArea"
};
HTMLArea.prototype._insertImage = function(image) {
var editor = this;
var outparam = null;
if (typeof image == "undefined") {
image = this.getParentElement();
if (image && !/^img$/i.test(image.tagName))
image = null;
}
if (image) outparam = {
f_url : HTMLArea.is_ie ? image.src : image.getAttribute("src"),
f_alt : image.alt,
f_border : image.border,
f_align : image.align,
f_vert : image.vspace,
f_horiz : image.hspace,
f_width : image.width,
f_height : image.height
};
var manager = _editor_url + 'plugins/InsertPicture/InsertPicture.php'
+ '?picturepath=' + InsertPicture.PicturePath;
Dialog(manager, function(param) {
if (!param) { // user must have pressed Cancel
return false;
}
if (!image) {
var sel = editor._getSelection();
var range = editor._createRange(sel);
editor._doc.execCommand("insertimage", false, param.f_url);
if (HTMLArea.is_ie) {
image = range.parentElement();
// wonder if this works...
if (image.tagName.toLowerCase() != "img") {
image = image.previousSibling;
}
} else {
image = range.startContainer.previousSibling;
}
} else {
image.src = param.f_url;
}
for (field in param) {
var value = param[field];
switch (field) {
case "f_alt" : image.alt = value; break;
case "f_border" : image.border = parseInt(value || "0"); break;
case "f_align" : image.align = value; break;
case "f_vert" : image.vspace = parseInt(value || "0"); break;
case "f_horiz" : image.hspace = parseInt(value || "0"); break;
case "f_width" : image.width = parseInt(value || "0"); break;
case "f_height" : image.height = parseInt(value || "0"); break;
}
}
}, outparam);
};

Some files were not shown because too many files have changed in this diff Show More