JSXElement
See types for more information of JSXElement props.
<tool>
JSXElement for Editor.js Tools API.
Prop | Description | Required | Data Format | Related Docs |
---|---|---|---|---|
children | is children of PDEJS Element. | ☑️ | Array | https://preactjs.com/guide/v10/api-reference/#h--createelement |
save | extracts Block data from the UI. | ☑️ | Function | https://editorjs.io/tools-api#save |
validate | validates Block data after saving. | Function | https://editorjs.io/tools-api#validate | |
renderSettings | is object for the settings UI. | Object | https://editorjs.io/tools-api#rendersettings | |
destroy | clears Tools stuff(cache, variables, events). | Function | https://editorjs.io/tools-api#destroy | |
onPaste | handles content pasted. | Function | https://editorjs.io/tools-api#onpaste | |
merge | specifies how to merge two similar Blocks. | Function | https://editorjs.io/tools-api#merge | |
static_get_pasteConfig | allows your Tool to substitute pasted contents. | Object | https://editorjs.io/tools-api#pasteconfig | |
static_get_sanitize | allows to clean unwanted HTMLElement or attributes. | Object | https://editorjs.io/tools-api#sanitize | |
static_get_toolbox | decides icon and title. REQUIRED if Tools should be added to the toolbox. | Object | https://editorjs.io/tools-api#toolbox | |
static_get_shortcut | registers a shortcut command. | String | https://editorjs.io/tools-api#shortcut | |
static_get_conversionConfig | decides that Tool can be converted into/form anothor Tool. | Object | https://editorjs.io/tools-api#conversionconfig | |
static_get_enableLineBreaks | handles Enter keydowns if it's set true. | Boolean | https://editorjs.io/tools-api#enablelinebreaks | |
static_get_isReadOnlySupported | is a flag for supporting the read-only mode. | Boolean | https://editorjs.io/tools-api#isreadonlysupported |
<inlineTool>
JSXElement for Editor.js Inline Tools API.
Prop | Description | Required | Data Format | Related Docs |
---|---|---|---|---|
children | is children of PDEJS Element. | ☑️ | Array | https://preactjs.com/guide/v10/api-reference/#h--createelement |
surround | works with selected range. | ☑️ | Function | https://editorjs.io/inline-tools-api-1#surround |
checkState | gets Tool's activated state by selected range. | ☑️ | Function | https://editorjs.io/inline-tools-api-1#checkstate |
renderActions | create additional element. | Function | https://editorjs.io/inline-tools-api-1#renderactions | |
clear | clears Tools stuff. | Function | https://editorjs.io/inline-tools-api-1#clear | |
get_shortcut | sets a shortcut. | String | https://editorjs.io/inline-tools-api-1#shortcut | |
static_get_isInline | specifies Tool as Inline Toolbar Tool. | ☑️ | Boolean(true) | https://editorjs.io/inline-tools-api-1#isinline |
static_sanitize | sanitizer rules. | Function | https://editorjs.io/inline-tools-api-1#sanitize | |
static_title | decides Tool's title. | Function | https://editorjs.io/inline-tools-api-1#title |
<blockTune>
JSXElement for Editor.js Block Tunes API
Prop | Description | Required | Data Format | Related Docs |
---|---|---|---|---|
children | is children of PDEJS Element. | ☑️ | Array | https://preactjs.com/guide/v10/api-reference/#h--createelement |
save | saves Tune's state. | Function | https://editorjs.io/block-tunes-api#save | |
wrap | wraps Block's content element. | Function | https://editorjs.io/block-tunes-api#wrap | |
static_get_isTune | specifies Tool as Block Tune. | Boolean(true) | https://editorjs.io/block-tunes-api#static-get-istune | |
static_prepare | makes any preparations required for Tune. | Function | https://editorjs.io/block-tunes-api#prepare | |
static_reset | resets the value of static_prepare . | Function | https://editorjs.io/block-tunes-api#reset |