mirror of
https://github.com/facebook/lexical.git
synced 2025-05-20 08:37:41 +08:00

* Add unstable serialization logic for node JSON parsing * Ooops * Freeze editorState * Migrate code node * Address feedback * Address feedback * Address feedback * Address more feedback * Address more feedback * Address FlowFixMes * update types * prettier * remove import * polish types * fix types * add ut for unstable APIs * fix rebase issue * oops * wip * more nodes * types * prettier * add tests for core nodes * update codes.json * Merge global files * Rename global type defs * Update packages/lexical-link/src/index.js Co-authored-by: Gerard Rovira <zurfyx@users.noreply.github.com> * fix linter an versions * more versions Co-authored-by: acywatson <acy.watson@gmail.com> Co-authored-by: John Flockton <thegreatercurve@users.noreply.github.com> Co-authored-by: Gerard Rovira <zurfyx@users.noreply.github.com>
34 lines
838 B
TypeScript
34 lines
838 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict
|
|
*/
|
|
|
|
import type {
|
|
ElementFormatType,
|
|
LexicalNode,
|
|
NodeKey,
|
|
SerializedLexicalNode,
|
|
} from 'lexical';
|
|
|
|
import {DecoratorNode} from 'lexical';
|
|
|
|
export type SerializedDecoratorBlockNode = SerializedLexicalNode & {
|
|
format: ElementFormatType;
|
|
};
|
|
|
|
declare class DecoratorBlockNode<T> extends DecoratorNode<T> {
|
|
__format: ElementFormatType;
|
|
constructor(format?: ElementFormatType | null, key?: NodeKey);
|
|
createDOM(): HTMLElement;
|
|
setFormat(format: ElementFormatType): void;
|
|
exportJSON(): SerializedDecoratorBlockNode;
|
|
}
|
|
|
|
declare function $isDecoratorBlockNode<T>(
|
|
node: LexicalNode,
|
|
): node is DecoratorBlockNode<T>;
|