@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
255 lines (250 loc) • 4.72 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "RichTextEditor",
"members": [
{
"kind": "field",
"name": "value",
"type": {
"text": "string | undefined"
},
"description": "Indicates the rich text editor's value.",
"privacy": "public"
},
{
"kind": "field",
"name": "#editor",
"privacy": "private",
"type": {
"text": "ProseMirrorFacade | undefined"
}
},
{
"kind": "field",
"name": "#editorWrapperElement",
"privacy": "private",
"type": {
"text": "HTMLElement"
},
"readonly": true
},
{
"kind": "field",
"name": "selectionStart",
"type": {
"text": "number | null"
},
"default": "null"
},
{
"kind": "method",
"name": "selectionStartChanged"
},
{
"kind": "field",
"name": "#updateEditorSelection",
"privacy": "private"
},
{
"kind": "field",
"name": "selectionEnd",
"type": {
"text": "number | null"
},
"default": "null"
},
{
"kind": "method",
"name": "selectionEndChanged"
},
{
"kind": "field",
"name": "placeholder",
"type": {
"text": "string | undefined"
}
},
{
"kind": "method",
"name": "placeholderChanged"
},
{
"kind": "field",
"name": "#handleSelectionChange",
"privacy": "private"
},
{
"kind": "field",
"name": "#handleChange",
"privacy": "private"
},
{
"kind": "field",
"name": "#handleInput",
"privacy": "private"
},
{
"kind": "method",
"name": "setTextBlock",
"parameters": [
{
"name": "blockType",
"type": {
"text": "'title' | 'subtitle' | 'body'"
}
}
]
},
{
"kind": "method",
"name": "setSelectionDecoration",
"parameters": [
{
"name": "decoration",
"type": {
"text": "string"
}
}
]
},
{
"kind": "method",
"name": "setSelectionTextSize",
"parameters": [
{
"name": "textSize",
"type": {
"text": "RICH_TEXT_EDITOR_MENUBAR_TEXT_SIZES"
}
}
]
},
{
"kind": "field",
"name": "selectionStyles",
"type": {
"text": "SelectionStyles"
},
"readonly": true
},
{
"kind": "method",
"name": "focus"
},
{
"kind": "field",
"name": "#editableAreaElement",
"privacy": "private",
"type": {
"text": "HTMLElement"
},
"readonly": true
},
{
"kind": "method",
"name": "scrollToAttachments",
"parameters": [
{
"name": "additionalPixels",
"default": "0"
}
]
},
{
"kind": "method",
"name": "addInlineImage",
"parameters": [
{
"name": "imageProps",
"type": {
"text": "{\n\t\tfile: File;\n\t\tposition?: number;\n\t\talt?: string;\n\t}"
}
}
],
"async": true
},
{
"kind": "field",
"name": "VIVID_VERSION",
"static": true,
"default": "__PACKAGE_VERSION__",
"description": "The current version of the Vivid library, which is useful for debugging.\nIt can be accessed from any Vivid element via `<el>.constructor.VIVID_VERSION`.",
"type": {
"text": "string"
},
"inheritedFrom": {
"name": "VividElement",
"module": "src/shared/foundation/vivid-element/vivid-element.ts"
}
},
{
"kind": "field",
"name": "componentName",
"type": {
"text": "string"
},
"static": true,
"description": "Core component name, without prefix",
"inheritedFrom": {
"name": "VividElement",
"module": "src/shared/foundation/vivid-element/vivid-element.ts"
}
}
],
"attributes": [
{
"name": "selection-start",
"type": {
"text": "number | null"
},
"default": "null",
"fieldName": "selectionStart"
},
{
"name": "selection-end",
"type": {
"text": "number | null"
},
"default": "null",
"fieldName": "selectionEnd"
},
{
"name": "placeholder",
"type": {
"text": "string | undefined"
},
"fieldName": "placeholder"
}
],
"mixins": [
{
"name": "Localized",
"module": "/src/shared/patterns"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "rich-text-editor"
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerRichTextEditor } from '@vonage/vivid'
registerRichTextEditor('vvd3')
const VwcRichTextEditor = wrapper(`vvd3-rich-text-editor`, {
events: [],
attributes: [],
properties: ['value', 'selectionStart', 'selectionEnd', 'placeholder', 'VIVID_VERSION', 'componentName']
})
VwcRichTextEditor.displayName = 'VwcRichTextEditor'
export default VwcRichTextEditor