PHP YII

TinyMce with Image Upload

TinyMce with Image Upload

Hi, In this tutorial we are going to see how to upload local images or image upload to TinyMce Editor. In Old version of tinymce editor we need to install image upload plugin and call it to tinymce init function. To overcome this now tinymce has predefined image upload option. which will convert image as blog and base64 format and store to local server. Lets see how to work on it. We can use this for normal html, php as well as frameworks.

Download Latest version of TinyMce Here

Extract downloaded file to your project folder.

 

The structure will be

Tinymce
–js
–tinymce
— *********
— tinymce.min.js

Call tinymce.min.js file to your project file.

Init tinymce to textarea

file_picker_callback Which will used to store local images.

Full Source Code :

 

Thats all now you can use this script to store local images.

Thats it now you can access this for YII2 also.
Thanks for reading this article.
If you like this article donr forget to share and comment.
Happy Coding!!!,