fix: super improvements (#1995)
* feat(super): autolink selection with cmd + k * feat: super note importer * feat: handle html import * fix: ignore load change event emitted by on change plugin
This commit is contained in:
@@ -7,17 +7,19 @@ import {Klass, LexicalNode} from 'lexical';
|
||||
type BlocksEditorComposerProps = {
|
||||
initialValue: string;
|
||||
children: React.ReactNode;
|
||||
nodes: Array<Klass<LexicalNode>>;
|
||||
nodes?: Array<Klass<LexicalNode>>;
|
||||
readonly?: boolean;
|
||||
};
|
||||
|
||||
export const BlocksEditorComposer: FunctionComponent<
|
||||
BlocksEditorComposerProps
|
||||
> = ({initialValue, children, nodes}) => {
|
||||
> = ({initialValue, children, readonly, nodes = []}) => {
|
||||
return (
|
||||
<LexicalComposer
|
||||
initialConfig={{
|
||||
namespace: 'BlocksEditor',
|
||||
theme: BlocksEditorTheme,
|
||||
editable: !readonly,
|
||||
onError: (error: Error) => console.error(error),
|
||||
editorState:
|
||||
initialValue && initialValue.length > 0 ? initialValue : undefined,
|
||||
|
||||
Reference in New Issue
Block a user