Skip to content

Documentation for SoEditor 1.2.1

Configuration

CreateClassicEditorOptions is the readonly creation configuration. These are common CMS fields; installed declarations remain the complete type reference.

FieldPurpose
locale / translationsLocale and host translations
dataInitial HTML
readonlyInitial readonly state
minHeight / maxHeightEditing area height constraints
toolbar / toolbarLayoutToolbar items and layout
editingModes / initialEditingModeModes for the optional entry
sourceSource enhancements
saveHost save adapter for the optional entry
onChange / onErrorChange and error callbacks

The default entry rejects options that require optional runtimes. Use the correct entry rather than bypassing the error with a type assertion.

Checked code

ts
export const configuration = {
    locale: 'zh-CN',
    ariaLabel: 'Article content',
    minHeight: 280,
    readonly: false,
    placeholder: 'Start writing…',
    toolbarLayout: { collapsible: true, overflow: 'wrap', sticky: true },
    onChange: ({ source }) => {
        console.info('Canonical HTML:', source);
    },
} satisfies CreateClassicEditorOptions;

Checked against the published types; see imports and types for imports.

Next steps

Examples · Configuration · Troubleshooting

HTML editing for website CMS · MIT