[kupu-dev] Add charmap to kupu
Guido Wesdorp
johnny at johnnydebris.net
Wed Aug 20 12:06:14 CEST 2008
Jordi Martinez wrote:
> Could someone point me to the right direction please?
>
>
I think regarding the dialog, you just want to add some HTML that gets
displayed/hidden with a button, and add both the HTML and the button
stuff into .kupu files for the XSL make system. Then when the user
chooses a symbol to add, do something like (assuming you have the
character is 'mychar'):
var sel = kupu.getSelection();
var tnode = kupu.getInnerDocument().createTextNode(mychar);
sel.replaceWithNode(tnode, true);
This should replace the current selection with a text node, and select
the added node.
I hope this helps (and indeed works, didn't actually try)... ;)
Cheers,
Guido
More information about the kupu-dev
mailing list