Skip to main content

JSXElement

See types for more information of JSXElement props.

<tool>

JSXElement for Editor.js Tools API.

PropDescriptionRequiredData FormatRelated Docs
childrenis children of PDEJS Element.☑️Arrayhttps://preactjs.com/guide/v10/api-reference/#h--createelement
saveextracts Block data from the UI.☑️Functionhttps://editorjs.io/tools-api#save
validatevalidates Block data after saving.Functionhttps://editorjs.io/tools-api#validate
renderSettingsis object for the settings UI.Objecthttps://editorjs.io/tools-api#rendersettings
destroyclears Tools stuff(cache, variables, events).Functionhttps://editorjs.io/tools-api#destroy
onPastehandles content pasted.Functionhttps://editorjs.io/tools-api#onpaste
mergespecifies how to merge two similar Blocks.Functionhttps://editorjs.io/tools-api#merge
static_get_pasteConfigallows your Tool to substitute pasted contents.Objecthttps://editorjs.io/tools-api#pasteconfig
static_get_sanitizeallows to clean unwanted HTMLElement or attributes.Objecthttps://editorjs.io/tools-api#sanitize
static_get_toolboxdecides icon and title. REQUIRED if Tools should be added to the toolbox.Objecthttps://editorjs.io/tools-api#toolbox
static_get_shortcutregisters a shortcut command.Stringhttps://editorjs.io/tools-api#shortcut
static_get_conversionConfigdecides that Tool can be converted into/form anothor Tool.Objecthttps://editorjs.io/tools-api#conversionconfig
static_get_enableLineBreakshandles Enter keydowns if it's set true.Booleanhttps://editorjs.io/tools-api#enablelinebreaks
static_get_isReadOnlySupportedis a flag for supporting the read-only mode.Booleanhttps://editorjs.io/tools-api#isreadonlysupported

<inlineTool>

JSXElement for Editor.js Inline Tools API.

PropDescriptionRequiredData FormatRelated Docs
childrenis children of PDEJS Element.☑️Arrayhttps://preactjs.com/guide/v10/api-reference/#h--createelement
surroundworks with selected range.☑️Functionhttps://editorjs.io/inline-tools-api-1#surround
checkStategets Tool's activated state by selected range.☑️Functionhttps://editorjs.io/inline-tools-api-1#checkstate
renderActionscreate additional element.Functionhttps://editorjs.io/inline-tools-api-1#renderactions
clearclears Tools stuff.Functionhttps://editorjs.io/inline-tools-api-1#clear
get_shortcutsets a shortcut.Stringhttps://editorjs.io/inline-tools-api-1#shortcut
static_get_isInlinespecifies Tool as Inline Toolbar Tool.☑️Boolean(true)https://editorjs.io/inline-tools-api-1#isinline
static_sanitizesanitizer rules.Functionhttps://editorjs.io/inline-tools-api-1#sanitize
static_titledecides Tool's title.Functionhttps://editorjs.io/inline-tools-api-1#title

<blockTune>

JSXElement for Editor.js Block Tunes API

PropDescriptionRequiredData FormatRelated Docs
childrenis children of PDEJS Element.☑️Arrayhttps://preactjs.com/guide/v10/api-reference/#h--createelement
savesaves Tune's state.Functionhttps://editorjs.io/block-tunes-api#save
wrapwraps Block's content element.Functionhttps://editorjs.io/block-tunes-api#wrap
static_get_isTunespecifies Tool as Block Tune.Boolean(true)https://editorjs.io/block-tunes-api#static-get-istune
static_preparemakes any preparations required for Tune.Functionhttps://editorjs.io/block-tunes-api#prepare
static_resetresets the value of static_prepare.Functionhttps://editorjs.io/block-tunes-api#reset