How to add a WYSIWYG text editor to the Category Edit Screen

I’ve been working lots with categories lately, what with the increased awareness and demand for themed or silo’d site structures.

To that end, I’m looking to enhance my category landing pages by relabeling the “Description” field as “Summary Description” and adding a new field called “Detailed Description”.

Read More

I will be using the “Summary Description” field on my category index page (a listing of all my site’s categories) and I want to use this new “Detailed Description” field to show on the landing page for each category.

So I need a rich text edit field added to the Category Edit Screen.

Does WordPress make it easy to create an instance of a rich text edit field, perhaps pulling a light version of the post/page editor? I probably don’t need a toolbar, but it might be nice to have some basic formatting buttons like B, I, U, hyperlink, etc…

Related posts

Leave a Reply

4 comments

  1. It’s actually quite easy to create your own TinyMCE instance, it’s really only problematic when trying to render additional(and differing) instances on a page where one exists already.

    The following blog covers all the necessary information for creating a TinyMCE instance in a WordPress plugin, but could just as easily be applied to an existing admin page, such as the category page.

    http://www.keighl.com/2010/01/tinymce-in-wordpress-plugins/

    The only differing factor for your usage would be this line.

    add_action("admin_print_scripts", "js_libs");
    

    I can’t think why anyone would ever want to enqueue tinymce across every admin page, so i’d recommend changing that line regardless and hooking it to the required page. For the category page, off the top of my head you could use something along the lines of..

    add_action("admin_print_scripts-edit-tags.php", "js_libs");
    

    The rest is pretty self evident but if there’s something you’re unclear on(RE: Creating a TinyMCE instance), post a comment to this answer.

    You can also find some previous TinyMCE related discussion here.
    Is there a way to get N number of WYSIWYG editors in a custom post type?

    Hope that helps..

  2. You should be able to work something out using my code given here;

    http://ypraise.com/2012/01/wordpress-plugin-categorytinymce/

    I’ve added an extra tinymce box into the category edit pages with a tinymce editor but it’s saved to the orginal description field. you’ll need to change the decription field to description1 or something to contain the daa and keep the original box.

    Removee the hide box script so this should then give you your standard text box for your summary description and the second textbox for your detailed description.

    you’ll then need to hide your summary description in the category archive page probably through a jquery filter.

  3. This plugin makes the category and tag description boxes WYSIWYG:

    https://wordpress.org/plugins/rich-text-tags/

    This plugin ads a WYSIWYG editor to the category editor screen only:

    https://wordpress.org/plugins/categorytinymce/

    A more updated version of the same plugin that’s paid, but cheap (5.5GBP) (I did not try this):

    http://wp.ypraise.com/shop/wordpress-plugins/category-tinymce/

    A plugin that does other things, too, but is more expensive (18USD) (I did not try this):

    https://codecanyon.net/item/category-article-pro/6845628?ref=belgen77