Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

custom page - how to include smf bbcode editor

Started by EmilioGaviria, February 12, 2024, 04:14:20 PM

Previous topic - Next topic


lets just say I have textarea

something like this
<textarea name="description" id="description"  class="input_text"></textarea>
how do I add BBCode Editor?


See the quick start part here: You will need to change the URL for the javascript and CSS files to use the ones in SMF though, and change the id in the code to match the id of your textarea.
Michael Eshom
Christian Metal Fans


Inside SMF you need to load Subs-Editor.php and call create_control_richedit() with the right options. See Display.php for a simpler example of this.

Then on saving I forget the exact order but I think you htmlspecialchars the spring (using smcFunc's version) then preparsecode() it then save it to the database.