I never imagined something like this would be so complicated, but I'm looking for a way to add text into the editor (both wysiwyg and standard editors) when clicking a link or button.
Into the editor when writing a post. Namely for the "newthread" template. I'd like to create a button which would populate/insert text into the textarea of the editor when clicked. Similarly to how you press a Smilie and it appears inside the textarea.
I'm well aware that nothing has been released, otherwise I would of already of tried it. I am trying to create one. My understanding is that it would take an OnClick event based on a javascript function to accomplish this. But my javascript coding skills are very poor so I hope someone out there can help.
There is kinda a hack like this, but it will effect all newthreads in a forum. It's call the Stencil Hack (I think). You may want to check it out and see what they do and then modify it for what you want.
Although not exactly what I need, I will certainly try it out and see if this will work for my purposes.
Quote:
The javascript is only the small part of it.
I am not looking for miracles, but in fact the javascript is all I need. I have already tested some javascript code that I found myself and managed to get a partially working version. Problem is that my lack of javascript coding skills prevent me from getting it to work 100%.
I did a version of the hack they have hear from the Unlicensed user message. I use the javascript for the pull down menu that has like 6 different messages to add to posts.
I did a version of the hack they have hear from the Unlicensed user message. I use the javascript for the pull down menu that has like 6 different messages to add to posts.
Could you share this code? It might be exactly what I need.
As for the stencil hack, although it functions as it should. The limitation is that I am forcefully restricted to 1 message, but I have at least 3 different preset text templates I would like users to chose from.