Options
All
  • Public
  • Public/Protected
  • All
Menu

Options for editor adapter

Hierarchy

Index

Properties

Optional allowedCustomPasteType

allowedCustomPasteType: string[]

Allowed custom content type when paste besides text/plain, text/html and images Only text types are supported, and do not add "text/" prefix to the type values

Optional announcerStringGetter

announcerStringGetter: (key: KnownAnnounceStrings) => string

Type declaration

    • A callback to help get string template to announce, used for accessibility

      Parameters

      Returns string

      A template string to announce, use placeholder such as "{0}" for variables if necessary

Optional coreApiOverride

coreApiOverride: Partial<CoreApiMap>

A function map to override default core API implementation Default value is null

Optional defaultDomToModelOptions

defaultDomToModelOptions: DomToModelOption

Default options used for DOM to Content Model conversion

Optional defaultModelToDomOptions

defaultModelToDomOptions: ModelToDomOption

Default options used for Content Model to DOM conversion

Optional defaultPasteType

defaultPasteType: PasteType

Default paste type. By default will use the normal (as-is) paste type.

Optional defaultSegmentFormat

defaultSegmentFormat: ContentModelSegmentFormat

Default format of editor content. This will be applied to empty content. If there is already content inside editor, format of existing content will not be changed. Default value is the computed style of editor content DIV

Optional disableCache

disableCache: boolean

Whether content model should be cached in order to improve editing performance. Pass true to disable the cache.

default

false

Optional disposeErrorHandler

disposeErrorHandler: (plugin: EditorPlugin, error: Error) => void

Type declaration

    • A callback to be invoked when any exception is thrown during disposing editor

      Parameters

      • plugin: EditorPlugin

        The plugin that causes exception

      • error: Error

        The error object we got

      Returns void

Optional doNotAdjustEditorColor

doNotAdjustEditorColor: boolean

Whether to skip the adjust editor process when for light/dark mode

Optional experimentalFeatures

experimentalFeatures: ExperimentalFeatures[]

Specify the enabled experimental features

Optional getDarkColor

A util function to transform light mode color to dark mode color Default value is to return the original light color

Optional imageSelectionBorderColor

imageSelectionBorderColor: string

Color of the border of a selectedImage. Default color: '#DB626C'

Optional inDarkMode

inDarkMode: boolean

If the editor is currently in dark mode

Optional initialContent

initialContent: string

Initial HTML content Default value is whatever already inside the editor content DIV

Optional initialModel

initialModel: ContentModelDocument

Initial Content Model

Optional knownColors

knownColors: Record<string, Colors>

Existing known color pairs

Optional legacyPlugins

legacyPlugins: EditorPlugin[]

Legacy plugins using IEditor interface

Optional plugins

plugins: EditorPlugin[]

List of plugins. The order of plugins here determines in what order each event will be dispatched. Plugins not appear in this list will not be added to editor, including built-in plugins. Default value is empty array.

Optional scrollContainer

scrollContainer: HTMLElement

The scroll container to get scroll event from. By default, the scroll container will be the same with editor content DIV

Optional snapshots

snapshots: Snapshots

Undo snapshot. Use this parameter to provide an external storage of undo snapshots

Optional trustedHTMLHandler

trustedHTMLHandler: TrustedHTMLHandler

Customized trusted type handler used for sanitizing HTML string before assign to DOM tree This is required when trusted-type Content-Security-Policy (CSP) is enabled. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/trusted-types

Generated using TypeDoc