Current Location: Home> Latest Articles> PHPCMS Integration with UEditor: Enhance Content Editing Easily

PHPCMS Integration with UEditor: Enhance Content Editing Easily

M66 2025-10-15

Introduction

UEditor is a powerful rich text editor that can be easily integrated into PHPCMS, making content editing more efficient and intuitive.

Integration Steps

Download UEditor

Download the latest version from the official UEditor website.

Upload Files

Extract the downloaded files and upload the ueditor directory to the statics directory of PHPCMS.

Modify Configuration File

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/"

Add Template File

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>

Modify Content Model

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 Changes

Save the modifications to the content model to ensure all settings take effect.

Use UEditor

Once integrated, UEditor can be used in the content editing page. Click the editor icon in the text field to start editing.

Tips

  • Ensure the image upload directory has proper storage and access permissions.
  • Refer to the official UEditor documentation for advanced configuration and features.