Add htmlarea http://www.htmlarea.com/ tool to appdb

This commit is contained in:
WineHQ
2005-02-02 01:11:59 +00:00
parent da42397711
commit 6beff0b816
197 changed files with 15756 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
// Character Map plugin for HTMLArea
// Sponsored by http://www.systemconcept.de
// Implementation by Holger Hees based on HTMLArea XTD 1.5 (http://mosforge.net/projects/htmlarea3xtd/)
// Original Author - Bernhard Pfeifer novocaine@gmx.net
//
// (c) systemconcept.de 2004
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
function CharacterMap(editor) {
this.editor = editor;
var cfg = editor.config;
var toolbar = cfg.toolbar;
var self = this;
var i18n = CharacterMap.I18N;
cfg.registerButton({
id : "insertcharacter",
tooltip : i18n["CharacterMapTooltip"],
image : editor.imgURL("ed_charmap.gif", "CharacterMap"),
textMode : false,
action : function(editor) {
self.buttonPress(editor);
}
})
var a, i, j, found = false;
for (i = 0; !found && i < toolbar.length; ++i) {
a = toolbar[i];
for (j = 0; j < a.length; ++j) {
if (a[j] == "inserthorizontalrule") {
found = true;
break;
}
}
}
if (found)
a.splice(j, 0, "insertcharacter");
else{
toolbar[1].splice(0, 0, "separator");
toolbar[1].splice(0, 0, "insertcharacter");
}
};
CharacterMap._pluginInfo = {
name : "CharacterMap",
version : "1.0",
developer : "Holger Hees & Bernhard Pfeifer",
developer_url : "http://www.systemconcept.de/",
c_owner : "Holger Hees & Bernhard Pfeifer",
sponsor : "System Concept GmbH & Bernhard Pfeifer",
sponsor_url : "http://www.systemconcept.de/",
license : "htmlArea"
};
CharacterMap.prototype.buttonPress = function(editor) {
editor._popupDialog( "plugin://CharacterMap/select_character", function( entity )
{
if ( !entity )
{
//user must have pressed Cancel
return false;
}
editor.insertHTML( entity );
}, null);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

View File

@@ -0,0 +1,16 @@
// I18N constants
// LANG: "de", ENCODING: UTF-8 | ISO-8859-1
// Sponsored by http://www.systemconcept.de
// Author: Holger Hees, <hhees@systemconcept.de>
//
// (c) systemconcept.de 2004
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
CharacterMap.I18N = {
"CharacterMapTooltip" : "Sonderzeichen einf<6E>gen",
"Insert special character" : "Sonderzeichen einf<6E>gen",
"HTML value:" : "HTML Wert:",
"Cancel" : "Abbrechen"
};

View File

@@ -0,0 +1,16 @@
// I18N constants
// LANG: "en", ENCODING: UTF-8 | ISO-8859-1
// Sponsored by http://www.systemconcept.de
// Author: Holger Hees, <hhees@systemconcept.de>
//
// (c) systemconcept.de 2004
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).
CharacterMap.I18N = {
"CharacterMapTooltip" : "Insert special character",
"Insert special character" : "Insert special character",
"HTML value:" : "HTML value:",
"Cancel" : "Cancel"
};

View File

@@ -0,0 +1,251 @@
<html>
<head>
<title>Insert special character</title>
<style type="text/css">
@import url(../../../htmlarea.css);
td.character {
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 14px;
font-weight: bold;
text-align: center;
background: #FFF;
padding: 4px;
}
td.character-hilite {
background: Highlight;
color: HighlightText;
}
html, body {
background: ButtonFace;
color: ButtonText;
font: 11px Tahoma,Verdana,sans-serif;
margin: 0px;
padding: 0px;
}
body { padding: 5px; }
table {
font: 11px Tahoma,Verdana,sans-serif;
}
select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
button { width: 70px; }
table .label { text-align: right; width: 8em; }
.title { background: none; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
border-bottom: 1px solid black; letter-spacing: 2px;
}
#buttons {
margin-top: 1em; border-top: 1px solid #999;
padding: 2px; text-align: right;
}
</style>
<script type="text/javascript" src="../../../popups/popup.js"></script>
<script type="text/javascript">
// HTMLSource based on HTMLArea XTD 1.5 (http://mosforge.net/projects/htmlarea3xtd/) modified by Holger Hees
// Original Author - Bernhard Pfeifer novocaine@gmx.net
CharacterMap = window.opener.CharacterMap; // load the CharacterMap plugin and lang file ;-)
window.resizeTo(480, 300);
// center on parent
var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2;
var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2;
window.moveTo(x, y);
function _CloseOnEsc()
{
if ( event.keyCode == 27 )
{
window.close();
return;
}
}
function Init() // run on page load
{
__dlg_translate(CharacterMap.I18N);
__dlg_init();
document.body.onkeypress = _CloseOnEsc;
var character = ''; // set default input to empty
View( null, character );
}
var oldView = null;
function View( td, character ) // preview character
{
if (oldView)
oldView.className = oldView.className.replace(/\s+character-hilite/, '');
document.getElementById( 'characterPreview' ).value = character;
document.getElementById( 'showCharacter' ).value = character;
if (td)
(oldView = td).className += " character-hilite";
}
function Set( string ) // return character
{
var character = string;
__dlg_close( character );
}
function onCancel() // cancel selection
{
__dlg_close( null );
return false;
};
</script>
</head>
<body style="background: Buttonface; margin: 0px; padding: 0px" onload="Init();self.focus();">
<form method="get" style="margin:2px; padding:2px" onSubmit="Set(document.getElementById('showCharacter').value); return false;">
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tr>
<td style="background: Buttonface" valign="center"><div style="padding: 1px; white-space: nowrap; font-family: tahoma,arial,sans-serif; font-size: 11px; font-weight: normal;">HTML value:<div id="characterPreview"></div></div></td>
<td style="background: Buttonface" valign="center"><input type="text" name="showcharacter" id="showCharacter" value="" size="15" style="background: #fff; font-size: 11px;" /></td>
<td style="background: Buttonface" width="100%"></td>
</tr>
</table>
</form>
<table border="0" cellspacing="1" cellpadding="0" width="100%" style="cursor: pointer; background: #ADAD9C; border: 1px inset;">
<tr>
<td class="character" onMouseOver="View(this,'&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>