YII Ueditor Rich Text Editor file and Image Upload configuration text tutorial, yiiueditor
After integrating Ueditor into the YII framework, you can add the desired functions to the editor by referring to the content in toolbars in editor_config.js:
Therefore, to add the file and Image Upload functions, add the following tags:
Two options are displayed in the Text Editor:
However, after you click the upload image button, you will find that the image cannot be uploaded normally and the file upload fails. The problem is that Flash Player needs to be upgraded,
Therefore, install the corresponding flash player component in Firefox and select one of them:
In this case, the file upload and Image Upload functions can be used normally:
Upload path settings:
1. Copy the PHP folder in the ueditor/ueditor1_2_2_0/folder to the root directory of the website and create an upload folder under the php folder. This folder is used to store uploaded files or images.
2. modify fileUp in the php folder. php and imageUp. in the PHP file, the upload path is "uploadPath" => "upload/", that is, the specified file upload path is under the newly created upload folder.
3.
After uploading the corresponding file or image on the page, you can see the uploaded file in the php/upload/folder:
4. Finally, to modify the file or Image Upload path, you should modify the uploadPath in the fileUp. php and imageUp. php files in the php folder under the root directory of the website:
Note that the imageUpload is a sub-folder under the php folder directory, that is, the default root directory of uploadPath is php /.
Image/File Upload result:
The above is a graphic tutorial on the configuration of Ueditor Rich Text Editor files and image uploads in YII. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!