Usage

Props

NameTypeRequiredDefaultDescription
disabled
boolean
false
since

10.19.0

error
boolean
false
since

10.19.0

init
RawEditorOptions & {}
false

Config for when the editor is initialized. Changes after the editor has initialized are ignored.

link

TinyMCE React Init

unsupported

Use at your own risk. DST makes no guarantees about this API, and is subject to removal at any point without warning or deprecation.

since

10.19.0

initialValue
string
false
deprecated

initialValue has been deprecated and will be removed in a future version. Please use the value prop instead

The first value passed into value prop will be the TextEditor initial value. Changing the value will update the text of the TextEditor. The editor should be controlled via the combination of value and onChange props.

Before

<TextEditor initialValue="Hello World" />

After

<TextEditor value="Hello World" />

deprecatedsince

10.20.0

since

10.19.0

locale
Locale
false

Locale which will be used used for localization. Can be passed directly or set by wrapping components in I18n provider. Icelandic (is-IS) is not actually supported by TinyMCE, so it is defaulted to english.

since

10.19.0

plugins
string[]
false
Array of plugins to use with the editor in addition to the defaults. Can be any of:
[{plugins.map((plugin) => `'${plugin}'`).join(', ')}]
since

10.19.0

onChange
Function
false
onChange event handler for text editor area
(content: string) => void
since

10.19.0

I18n

Multiple

Context

Provider Props

Expect context to change the init config of the below TextEditors. Changes after the editor has initialized are ignored.

link

TinyMCE React Init

link

TinyMCE React configure editor

NameTypeRequiredDefaultDescription
children
ReactNode
true
features
TextEditorFeatureToggle
false
  • stickyToolbar - Have the editor toolbar stick to the top when content is longer than the page length.
  • tabAsNavigation - Have Tab key exit the editor. Support Alt/Opt + Tab as triple space indent.