Skip to content

Rich Text Editor HTML_EDITOR

A WYSIWYG rich text editor. Content is stored as an HTML string, suitable for long-form content with mixed text and images.

html-editor

Basic Usage

java
@Lob
@EruptField(
    views = @View(title = "Rich Text"),
    edit = @Edit(title = "Rich Text", type = EditType.HTML_EDITOR,
                 htmlEditorType = @HtmlEditorType(value = HtmlEditorType.Type.CKEDITOR))
)
private String htmlContent;

It is recommended to add the @Lob annotation to the field to avoid content exceeding the default column length limit of the database.

Configuration

java
public @interface HtmlEditorType {

    Type value(); // Editor type (required)

    String path() default ""; // Storage sub-path for uploaded files

    enum Type {
        CKEDITOR, // CKEditor
        UEDITOR,  // UEditor (Baidu)
    }

}

Contributors

The avatar of contributor named as YuePeng YuePeng
The avatar of contributor named as Claude Opus 5 (1M context) Claude Opus 5 (1M context)

Changelog

Released under the Apache-2.0 License.