How to add TinyMCE and quicktags to WordPress?

How to add TinyMCE and quicktags to WordPress?

Since WordPress 3.3 we have wp_editor () function whose idea is to simplify adding visual editor instance for developers not familiar with TinyMCE and Quicktags Javascript code. This function does this job perfectly but it has its own flaws.

How to add TinyMCE visual editor to WordPress?

If your theme author has created comment form him self you just need to look for inside your theme files (most probably comments.php or functions.php) and replace it with something like this:

How to customize visual editor in WordPress theme?

For wp_editor () customization please take a look at reference documentation or its source code inside wp-includes/class-wp-editor.php. Also keep in mind that visual text editor lives inside div tag and that theme authors usually place textarea inline element inside paragraph tag or similar.

Can a TinyMCE be moved around in Dom?

TinyMCE isn’t designed to be moved around in DOM once initialized. WordPress comment-reply.js code does just that when you click on reply/cancel reply link on threaded comments powered WordPress site.

How to add TinyMCE editor in PHP or HTML?

Extract the zip file and paste the whole folder within your project root folder. Also, you can get all files together in source code from the below download link. So, let’s go add TinyMCE editor. The first thing you need to do is include the JS library of the TinyMCE editor into your PHP or HTML or web page.

How to add TinyMCE back to WordPress comments?

I will also present ways to add TinyMCE back once your comments textarea has settled on new place inside DOM after you click on reply/cancel reply link on your comments board. This part largely depends on your WordPress theme.

How to replace a textarea in WordPress TinyMCE?

Now this is pretty obvious as outlined in the Codex: http://codex.wordpress.org/Function_Reference/wp_editor What is a little confusing (the source of my problem) is $editor_id may only contain lowercase letters. So if your form processing script is looking for something with underscores in it (as mine was) then you’ll need to do this: