Home » Wordpress » How to reuse the WordPress text editor outside WordPress

How to reuse the WordPress text editor outside WordPress

Posted by: admin November 30, 2017 Leave a comment

Questions:

WordPress 3 has a beautiful implementation of TinyMCE that, I believe, works far more smoothly than the original TinyMCE on which it is based.

Things that are great:
– The HTML/source view as a tab rather than a popup
– An attractive skin
– Great image handling, including crop and resize

What do I need to ‘steal’ from WP to get a working version of WordPress TinyMCE for use outside WordPress, i.e. in a custom application? Obviously the image processing is done in PHP too…

Thanks.

Answers:

This would involve an entire open source project in itself, which is outside the scope of Stack Overflow. I would stay away from the crop and image processing features as that’s done in the Thickbox lightbox, and just focus on the javascript only sections.

I would start by saving the file as a html file, as you won’t need server side scripting to run javascript. Then you can delete parts of the code that are useless, isolating only the parts required to make the WordPress specific TinyMCE work.