You are not logged in.
Pages: 1
Hi
Me again.
I created successfully a plugin in a popup window. But my target is to create one in a dialog (? right name?).
So I found a plugin which it using the dialog mode, too: Insert Special Chars.
I tried to copy the plugin and edit the plugin name from "CharacterMap" to "TestPlugin" and so on I changed the prototypnames.
But I find no second Icon in the menu. There is only the one which opens the original "CharacterMap".
My questions:
What do I have to do to create a plugin which opens in a dialog?
This Tutorial teaches you only how to create a plugin in popup-mode:
http://xinha.webfactional.com/wiki/PluginTutorial
Thx in ahead for your answers ![]()
Edit:
So ... now its possible to use the plugin. i edited the line with addtoolbarelement. ... but there is a big question ... how can I load the popupwindow into the container?
Is there somewhere a good tutorial about this?
Or is there a good tutorial?
Last edited by LeMacabre (2010-10-11 07:52:47)
Offline
CharacterMap is a very good and simple example, look at the prepareDialog method, and the addEntity method, you can't get much more simple.
You supply the HTML of your dialog to the dialog:
this.dialog = new Xinha.Dialog(editor, html, 'CharacterMap',{width:300},{modal:false});How you create that html, is up to you, if you have it in an external file you might do like
Xinha._getback( Xinha.getPluginDir("YourPlugin") + '/dialog.html', function(html) { /* do something with html here */ } );(See Linker for an example).
James Sleeman
Offline
ah this should help ![]()
it was possible to open an Dialog but only with the code inside the function. there was no external file which was loaded.
I will try the code and make a response ;D
Offline
Pages: 1