I hate javascript...
I read files and it led me to jquery.sceditor.elkarte.js. Then I added there my code just after end of pre tag, but my button is still not visible.
Just can't figure out how to add this button :|
To add new BBC's there are a few steps.
1) add code to parse_bbc so the page parser knows what to do with it
2) add item icon to the toolbar
3) add item code to the JS so it can be
- added to the textarea when the toolbar icon is clicked in both standard and wysiwyg modes
- rendered via the JS so you can see what it looks (mostly) like what parse_bbc would do with the code, so it toggles the bbc<->html in the JS depending on what viewing mode you are in the editor.
The only thing needed is item 1) ... 2 and 3 are optional but complete a fully integrated button. I'll try to come up with a quick example to show how this done (unless
@emanuele has one already)
I added bbcode with hook (integrate_bbc_codes), but only button is making me problems :/
Nope, no examples handy...
Here is a quick example, hope it helps: http://www.elkarte.net/community/index.php?topic=1750
Thanks :) Now I know where was my mistake ::)
Thank you for this. I want to add a couple of custom buttons and I think this will help.