UEditor is a powerful rich text editor that can be easily integrated into PHPCMS, making content editing more efficient and intuitive.
Download the latest version from the official UEditor website.
Extract the downloaded files and upload the ueditor directory to the statics directory of PHPCMS.
In the statics/ueditor/php/config.json file, locate the imageUrlPrefix option and modify it to the URL prefix for uploaded images. For example:
"imageUrlPrefix": "http://www.example.com/statics/upload/"
Create a new template file in the template directory of PHPCMS, for example ueditor.html. Load the UEditor JavaScript files and initialize the editor:
<script type="text/javascript" src="statics/ueditor/ueditor.config.js"></script> <script type="text/javascript" src="statics/ueditor/ueditor.all.min.js"></script> <script type="text/javascript"> var ue = UE.getEditor('editor'); </script>
In the PHPCMS admin panel, find the content model where you want to use UEditor. Add a new text field and set its type to UEditor.
Save the modifications to the content model to ensure all settings take effect.
Once integrated, UEditor can be used in the content editing page. Click the editor icon in the text field to start editing.