Configuration
CreateClassicEditorOptions is the readonly creation configuration. These are common CMS fields; installed declarations remain the complete type reference.
| Field | Purpose |
|---|---|
| locale / translations | Locale and host translations |
| data | Initial HTML |
| readonly | Initial readonly state |
| minHeight / maxHeight | Editing area height constraints |
| toolbar / toolbarLayout | Toolbar items and layout |
| editingModes / initialEditingMode | Modes for the optional entry |
| source | Source enhancements |
| save | Host save adapter for the optional entry |
| onChange / onError | Change 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.