draft-js-plugins-editor
- Version 3.0.0
- Published
- 65.2 kB
- 2 dependencies
- MIT license
Install
npm i draft-js-plugins-editoryarn add draft-js-plugins-editorpnpm add draft-js-plugins-editorOverview
Editor for DraftJS Plugins
Index
Functions
Classes
Interfaces
EditorPlugin
- blockRendererFn()
- blockStyleFn()
- customStyleFn
- decorators
- getAccessibilityProps
- handleBeforeInput()
- handleDrop()
- handleDroppedFiles()
- handleKeyCommand()
- handlePastedFiles()
- handlePastedText()
- handleReturn()
- initialize
- keyBindingFn()
- onBlur()
- onChange
- onDownArrow()
- onEscape()
- onFocus()
- onLeftArrow()
- onRightArrow()
- onTab()
- onUpArrow()
- willUnmount
Functions
function composeDecorators
composeDecorators: (...decorators: DraftDecorator[]) => DraftDecorator;Classes
class PluginEditor
class PluginEditor extends Component<PluginEditorProps> {}method blur
blur: () => void;method focus
focus: () => void;method getEditorRef
getEditorRef: () => Editor | undefined;method getPluginMethods
getPluginMethods: () => PluginFunctions;method getPlugins
getPlugins: () => EditorPlugin[];Interfaces
interface EditorPlugin
interface EditorPlugin {}property customStyleFn
customStyleFn?: ( style: DraftInlineStyle, block: ContentBlock, pluginFunctions: PluginFunctions) => DraftStyleMap;property decorators
decorators?: DraftDecorator[];property getAccessibilityProps
getAccessibilityProps?: () => { ariaHasPopup: string; ariaExpanded: string;};property initialize
initialize?: (pluginFunctions: PluginFunctions) => void;property onChange
onChange?: ( editorState: EditorState, pluginFunctions: PluginFunctions) => EditorState;property willUnmount
willUnmount?: (pluginFunctions: PluginFunctions) => void;method blockRendererFn
blockRendererFn: (block: ContentBlock, pluginFunctions: PluginFunctions) => any;method blockStyleFn
blockStyleFn: (block: ContentBlock, pluginFunctions: PluginFunctions) => string;method handleBeforeInput
handleBeforeInput: ( chars: string, editorState: EditorState, eventTimeStamp: number, pluginFunctions: PluginFunctions) => DraftHandleValue;method handleDrop
handleDrop: ( selection: SelectionState, dataTransfer: Object, isInternal: DraftDragType, pluginFunctions: PluginFunctions) => DraftHandleValue;method handleDroppedFiles
handleDroppedFiles: ( selection: SelectionState, files: Array<Blob>, pluginFunctions: PluginFunctions) => DraftHandleValue;method handleKeyCommand
handleKeyCommand: ( command: DraftEditorCommand, editorState: EditorState, eventTimeStamp: number, pluginFunctions: PluginFunctions) => DraftHandleValue;method handlePastedFiles
handlePastedFiles: ( files: Array<Blob>, pluginFunctions: PluginFunctions) => DraftHandleValue;method handlePastedText
handlePastedText: ( text: string, html: string | undefined, editorState: EditorState, pluginFunctions: PluginFunctions) => DraftHandleValue;method handleReturn
handleReturn: ( e: KeyboardEvent, editorState: EditorState, pluginFunctions: PluginFunctions) => DraftHandleValue;method keyBindingFn
keyBindingFn: ( e: KeyboardEvent, pluginFunctions: PluginFunctions) => DraftEditorCommand | null;method onBlur
onBlur: (e: SyntheticEvent, pluginFunctions: PluginFunctions) => void;method onDownArrow
onDownArrow: (e: KeyboardEvent, pluginFunctions: PluginFunctions) => void;method onEscape
onEscape: (e: KeyboardEvent, pluginFunctions: PluginFunctions) => void;method onFocus
onFocus: (e: SyntheticEvent, pluginFunctions: PluginFunctions) => void;method onLeftArrow
onLeftArrow: (e: KeyboardEvent, pluginFunctions: PluginFunctions) => void;method onRightArrow
onRightArrow: (e: KeyboardEvent, pluginFunctions: PluginFunctions) => void;method onTab
onTab: (e: KeyboardEvent, pluginFunctions: PluginFunctions) => void;method onUpArrow
onUpArrow: (e: KeyboardEvent, pluginFunctions: PluginFunctions) => void;interface PluginEditorProps
interface PluginEditorProps extends EditorProps {}property decorators
decorators?: DraftDecorator[];property defaultBlockRenderMap
defaultBlockRenderMap?: boolean;property defaultKeyBindings
defaultKeyBindings?: boolean;property defaultKeyCommands
defaultKeyCommands?: boolean;property plugins
plugins?: EditorPlugin[];interface PluginFunctions
interface PluginFunctions {}method getEditorRef
getEditorRef: () => Ref<any>;method getEditorState
getEditorState: () => EditorState;method getPlugins
getPlugins: () => EditorPlugin[];method getProps
getProps: () => any;method getReadOnly
getReadOnly: () => boolean;method setEditorState
setEditorState: (editorState: EditorState) => void;method setReadOnly
setReadOnly: (readOnly: boolean) => void;Package Files (1)
Dependencies (2)
Dev Dependencies (1)
Peer Dependencies (3)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/draft-js-plugins-editor.
- Markdown[](https://www.jsdocs.io/package/draft-js-plugins-editor)
- HTML<a href="https://www.jsdocs.io/package/draft-js-plugins-editor"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2113 ms. - Missing or incorrect documentation? Open an issue for this package.
