Options
All
  • Public
  • Public/Protected
  • All
Menu

Properties for Rooster react component

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: PasteTypeOrGetter

Default paste type or function that returns the 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
deprecated

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 editorCreator

editorCreator: (div: HTMLDivElement, options: EditorOptions) => IEditor

Type declaration

    • Creator function used for creating the instance of roosterjs editor. Use this callback when you have your own sub class of roosterjs Editor or force trigging a reset of editor

      Parameters

      Returns IEditor

Optional experimentalFeatures

experimentalFeatures: string[]

Enabled experimental features

Optional focusOnInit

focusOnInit: boolean

Whether editor should get focus once it is created Changing of this value after editor is created will not reset editor

Optional generateColorKey

generateColorKey: ColorTransformFunction

A util function to generate color key for dark mode color. By default, the color key is generated from the light mode color. For example, color "#123456" will have the key "--darkColor__123456", and color "rgb(0,0,0)" will have key "--darkColor_rgb_0_0_0_". Pass in this function to customize this behavior. The return value must be a valid CSS variable, starts with "--"

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 initialModel

initialModel: ContentModelDocument

Initial Content Model

Optional knownColors

knownColors: Record<string, Colors>

Existing known color pairs

Optional onFixUpModel

onFixUpModel: (model: ReadonlyContentModelDocument) => void

Type declaration

    • An optional callback function that will be invoked before write content model back to editor. This is used for make sure model can satisfy some customized requirement

      Parameters

      Returns void

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 tableCellSelectionBackgroundColor

tableCellSelectionBackgroundColor: string

Background color of a selected table cell. Default color: '#C6C6C6'

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