Sorry, I’ve no detailed reference for you. I believe you can remove the TinyMCE editor entirely with remove_post_type_support(). You can then place your own editor in a custom meta box, which despite its name, does not need to be only for meta data. Because WP thinks editing is no longer supported, you’ll need custom code to place the new editor content into the DB when the post is saved or updated.
At least a starting point I hope.
Thanks bcworkz! remove_post_type_support() helped a lot. I already built the editor and im using a meta box to do so I got everything working except being able to save the content. Would you know how I would go about saving the content into the DB? That’s the last thing I need to make this work 🙂
Yes, I do know! And you apparently do not really need much detail 🙂 Nice work!
There are a few actions you can hook to manage this, the obvious one is ‘save_post’. There are other actions fired through wp_transition_post_status(), some of which are dynamic actions that fire only under specific conditions, which offers us greater control of when our code actually needs to execute. I suspect ‘save_post’ will work for you, the rest is probably just FYI.
As you likely know, you can get the form’s content through $_POST. What you shouldn’t do is call wp_update_post() to insert the form content because it’ll call your action callback and start an infinite loop! While there’s ways to prevent that, I think the simplest is to use the global $wpdb database interface object to directly update the appropriate post line in the DB.
Be sure you validate and sanitize the form content before placing it in your DB! Confusing the issue is most $wpdb methods require the use of $wpdb->prepare(), however update and insert do not. It’s best to examine the wpdb class definition to assure yourself this is indeed the case.