@lexical/html 0.12.3 → 0.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LexicalHtml.js.flow +2 -4
- package/index.d.ts +2 -2
- package/package.json +4 -4
package/LexicalHtml.js.flow
CHANGED
|
@@ -8,13 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type {
|
|
11
|
+
BaseSelection,
|
|
11
12
|
LexicalEditor,
|
|
12
13
|
LexicalNode,
|
|
13
14
|
EditorState,
|
|
14
15
|
EditorThemeClasses,
|
|
15
|
-
RangeSelection,
|
|
16
|
-
NodeSelection,
|
|
17
|
-
GridSelection,
|
|
18
16
|
} from 'lexical';
|
|
19
17
|
|
|
20
18
|
export type FindCachedParentDOMNode = (
|
|
@@ -25,7 +23,7 @@ export type FindCachedParentDOMNodeSearchFn = (node: Node) => boolean;
|
|
|
25
23
|
|
|
26
24
|
declare export function $generateHtmlFromNodes(
|
|
27
25
|
editor: LexicalEditor,
|
|
28
|
-
selection?:
|
|
26
|
+
selection?: BaseSelection | null,
|
|
29
27
|
): string;
|
|
30
28
|
|
|
31
29
|
declare export function $generateNodesFromDOM(
|
package/index.d.ts
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
import type {
|
|
9
|
+
import type { BaseSelection, LexicalEditor, LexicalNode } from 'lexical';
|
|
10
10
|
/**
|
|
11
11
|
* How you parse your html string to get a document is left up to you. In the browser you can use the native
|
|
12
12
|
* DOMParser API to generate a document (see clipboard.ts), but to use in a headless environment you can use JSDom
|
|
13
13
|
* or an equivilant library and pass in the document here.
|
|
14
14
|
*/
|
|
15
15
|
export declare function $generateNodesFromDOM(editor: LexicalEditor, dom: Document): Array<LexicalNode>;
|
|
16
|
-
export declare function $generateHtmlFromNodes(editor: LexicalEditor, selection?:
|
|
16
|
+
export declare function $generateHtmlFromNodes(editor: LexicalEditor, selection?: BaseSelection | null): string;
|
package/package.json
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"html"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "0.12.
|
|
11
|
+
"version": "0.12.5",
|
|
12
12
|
"main": "LexicalHtml.js",
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"lexical": "0.12.
|
|
14
|
+
"lexical": "0.12.5"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"directory": "packages/lexical-html"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@lexical/selection": "0.12.
|
|
23
|
-
"@lexical/utils": "0.12.
|
|
22
|
+
"@lexical/selection": "0.12.5",
|
|
23
|
+
"@lexical/utils": "0.12.5"
|
|
24
24
|
}
|
|
25
25
|
}
|