You are not logged in.
Pages: 1
Hi guys.
I'm not much of a javascript programmer, however I managed to build a smiley-plugin for HtmlArea with a lot of trial and error. I am very excited about Xinha so naturally I tried to implement my smiley-thingy. But it won't pop up :-( Could someone please have a look at my code and see what's wrong with it ? It works in HtmlArea 3..
This actually shows the smiley-button :
smilie: [ "Smiley", "smiles.gif", false, function(e) {e.execCommand("Smilie");} ],
but nothing happens when you press it :
// Called when the user clicks on "Smilie" button
HTMLArea.prototype._Smilie = function()
{
var editor = this; // for nested functions
this._popupDialog( "smilies.php", function( entity )
{
if ( !entity )
{
//user must have pressed Cancel
return false;
}
editor.insertHTML( entity );
}, null);
};
Many thanks !
Offline
Unfortunately this doesn't do the trick. As a matter of fact, I can remove the smiley-function, doesn't make a difference.
Perhaps it is better for me to use the plugin-approach. With a lot of trial of error :-(
Offline
Unfortunately this doesn't do the trick. As a matter of fact, I can remove the smiley-function, doesn't make a difference.
Perhaps it is better for me to use the plugin-approach. With a lot of trial of error :-(
That would be great, then you can contribute it to Xinha! Probably the closest plugin to base smilie off is CharacterMap, it pops up a window and allows to insert various characters, you'rs wants to popup a window and allows to insert various images. Should be almost identical
James Sleeman
Offline
BTW I have some sort of a preview available at http://www.400bis.nl/1liner/index.php?editor=wysiwyg (Internet Explorer only); just press the smiley. There's about 2600 of them.
Offline
I've put a preliminary, not even bèta, "works for me " version at http://www.eccovogels.nl/xinha/
Last edited by Ecco (2005-03-27 10:31:38)
Offline
Why did I make a database-based smiley-replacement function? I could have waited for your plugin. I won't include it in our actual project, but will surely use it in future projects when needed
Offline
THANK YOU!! Not for the smilies so much as for providing an example - between you and CharacterMap, I managed to get my "InsertField" plugin working.
Offline
Pages: 1