Create and Use Yii TinyMCE Extension

This is a simple step by step tutorial of how to use TinyMCE 4.x as Yii extension.

1. Download TinyMCE

First, download TinyMCE 4.x.x directly from TinyMCE Download page and save it to /yii-website/protected/extensions folder.
And then extract the downloaded file so that you’ll have the folder structure:

2. Create Yii TinyMCE Extension Class

Create new php file under /yii-website/protected/extensions/tinymce folder, open the new php file, add the following code and save:

3. Use TinyMCE Extension in View

Here is the example of how to use the TinyMCE extension in any view files.