That's a nice idea! First I have get this javascript-Things to work and then I'll do that tutorial. But I think it would be better when I write in german and some multilingual guy could translate it. My englisch is not good enough to prevent from mistakes.
If you send me your tutorial, I'll make up an English language version, then send it back to you so you can post it on your site or on the wiki.
I'm going to index my own tutorals soon and put them into a static page on my site. Once that's done, I'll also be indexing tutorials from other sites with links to the original article.
You've got to include the JavaScript in the backend, where the editor can call it. I checked serendipity_event_fckeditor, and it uses the backend_wysiwyg hook to do the job. The _emoticonchooser plugin (which I consider much closer to what you want, since it deals with toolbar buttons) uses backend_entry_toolbar_body instead.
Without using a plugin, you'd have to modify the code.
Hi Judebert, thanks for reply but I already inserted the code in a plugin. I used the event_typesetbuttons plugin and I already have "the button" in my backend but I want the button showing a window where you can insert the filename and this window takes this infor,ation back to the text editor wrapped with the code.
As you can see above I already found the "prompt()". What I want to know is how can I send the result of the function back to the textarea of s9y so that my code is inside the textfield?
Works fine... When I push the button called flash, it prompts for the "Filename". When I insert e.g. "Steve" in the prompt() window and push enter the result is an alert-window with: "Hello Steve". Fine. But now I don't want to have the result in an alert window. I want to have the result been inserted in the texteditors textarea. What should I do?
You can see where they were using an alert, too, and changed it around. If your dialog puts the "Steve" into a variable called "v", then I think this'll do ya: