AppThemes

How to Add TinyMCE to ClassiPress

This is a feature that everyone has been asking for and I’ve finally got around to implementing it. You can now add an HTML WYSIWYG editor to the new ad submission description field. So if you’ve enabled the “Allow HTML Code” option in CP, your customers will be able to do some basic html markup to their ad submission!

This feature will be in v2.9.3 but if you wanted to get a head start and use it now, you can easily add it to your site. Use at your own risk though. This code worked fine for me but your configuration might be different.

All you need to do is edit post-form.php and paste in the following code at the top.


if ( get_option('filter_html') == "yes" ) { 




} 


You might need to change your .js paths or some of the parameters but this should work. I’ve set it up to use the existing tinyMCE code bundled with WordPress so you don’t need to download or install the core tinyMCE package.

If you get everything working properly, it should look like this:

Then try submitting a new ad and see how it works out. For examples and additional parameters you can add/remove, go visit the tinyMCE example page and have at it.

Your rating: none
Rating: 5 - 1 vote