Hey, I just got this working!
After posting to this thread last year, I finally decided to give it a shot today, and it was dead easy!
Here's my process:
1. Copied the sample script from the BBCode example on the TinyMCE website and pasted at the top of the template files Forum_editpost.ss, Forum_reply.ss and Forum_starttopic.ss (or as an Include)
2. Updated the tiny_mce.js source location to framework/thirdparty/tinymce/tiny_mce.js
2. Changed the mode to "textareas" in the script.
And bingo - it works! Can happily format text, add links and images, etc with no probs.
Can someone much more clued-up than me please check this and let me know if there are any security issues or other problems with what I've done?
Have hit a glitch with the validation when replying to a post. It seems the validation is being parsed before the TinyMCE editor renders the content into BBcode or some such thing, so it thinks the "Content" field is empty. My nasty solution is to remove the validation but it seems to allow all "Content" fields to be left empty, not just ones on reply. Approx line 822 of Forum.php:
$required = $addMode === true ? new RequiredFields("Title", "Content") : new RequiredFields(/*"Content"*/);// --- Second "Content" validation instance commented out to make compatible with TinyMCE plugin. ---
A better solution would be appreciated.
I've made a few other tweaks to improve this implementation:
1. Removed the styleselect
item from the theme_advanced_buttons1
line of the script as this functionality is only supported by the PunBB dialect.
2. Added the following text to Forum_BBCodeHint.ss: Note: Some BB Code tags are not available from the tool bar. To manually add other BB Code tags to your content, click the HMTL button in the toolbar first.