@worktile/theia 1.2.6 → 1.2.10
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/bundles/worktile-theia.umd.js +1151 -478
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/components/inline-toolbar/inline-toolbar.component.d.ts +24 -0
- package/components/inline-toolbar/inline-toolbar.component.scss +18 -0
- package/components/nav-split-line/nav-split-line.component.d.ts +6 -1
- package/components/toolbar-dropdown/toolbar-dropdown.component.scss +3 -0
- package/components/toolbar-item/toolbar-item.component.d.ts +14 -5
- package/constants/code.d.ts +7 -7
- package/constants/default.d.ts +1 -1
- package/constants/node-types.d.ts +8 -8
- package/constants/toolbar.d.ts +6 -2
- package/custom-types.d.ts +5 -1
- package/editor.component.d.ts +6 -4
- package/editor.module.d.ts +59 -52
- package/esm2015/components/color-select/color-select.component.js +3 -2
- package/esm2015/components/conversion-hint/conversion-hint.component.js +2 -2
- package/esm2015/components/inline-toolbar/inline-toolbar.component.js +123 -0
- package/esm2015/components/nav-split-line/nav-split-line.component.js +26 -5
- package/esm2015/components/toolbar/toolbar.component.js +7 -9
- package/esm2015/components/toolbar-base-item/toolbar-base-item.component.js +4 -3
- package/esm2015/components/toolbar-dropdown/toolbar-dropdown.component.js +1 -1
- package/esm2015/components/toolbar-item/toolbar-item.component.js +70 -24
- package/esm2015/constants/auto-format-rules.js +2 -2
- package/esm2015/constants/code.js +7 -7
- package/esm2015/constants/default.js +2 -2
- package/esm2015/constants/node-types.js +1 -2
- package/esm2015/constants/toolbar.js +38 -5
- package/esm2015/custom-types.js +1 -1
- package/esm2015/editor.component.js +26 -21
- package/esm2015/editor.module.js +20 -8
- package/esm2015/interfaces/editor.js +2 -4
- package/esm2015/interfaces/toolbar.js +1 -1
- package/esm2015/interfaces/valid-children-types.js +8 -2
- package/esm2015/plugins/align/align.editor.js +5 -2
- package/esm2015/plugins/align/align.plugin.js +2 -2
- package/esm2015/plugins/autoformat/autoformat.plugin.js +2 -2
- package/esm2015/plugins/autoformat/transforms/auto-format-inline.js +2 -2
- package/esm2015/plugins/blockquote/blockquote.editor.js +2 -2
- package/esm2015/plugins/blockquote/blockquote.plugin.js +11 -29
- package/esm2015/plugins/blockquote/options.js +2 -2
- package/esm2015/plugins/code/code.component.js +14 -9
- package/esm2015/plugins/code/code.editor.js +2 -2
- package/esm2015/plugins/code/options.js +2 -2
- package/esm2015/plugins/color/color.editor.js +4 -1
- package/esm2015/plugins/common/auto-insert-data..js +4 -5
- package/esm2015/plugins/common/block-card.plugin.js +8 -4
- package/esm2015/plugins/common/get-fragment.plugin.js +5 -5
- package/esm2015/plugins/common/move-selection.plugin.js +2 -2
- package/esm2015/plugins/common/remove-empty.plugin.js +2 -2
- package/esm2015/plugins/common/remove-void.plugin.js +2 -2
- package/esm2015/plugins/common/reset-type.plugin.js +2 -2
- package/esm2015/plugins/deserializers/deserialize-html.plugin.js +9 -2
- package/esm2015/plugins/deserializers/deserialize-md.plugin.js +2 -2
- package/esm2015/plugins/heading/heading.plugin.js +2 -2
- package/esm2015/plugins/heading/options.js +2 -2
- package/esm2015/plugins/hr/hr.editor.js +2 -2
- package/esm2015/plugins/hr/options.js +2 -2
- package/esm2015/plugins/image/image.component.js +10 -10
- package/esm2015/plugins/image/image.editor.js +10 -4
- package/esm2015/plugins/image/image.plugin.js +1 -2
- package/esm2015/plugins/indent/indent.plugin.js +1 -1
- package/esm2015/plugins/indent/on-keydown-indent.js +1 -1
- package/esm2015/plugins/index.js +9 -5
- package/esm2015/plugins/link/edit/link-edit.component.js +3 -2
- package/esm2015/plugins/link/link.plugin.js +7 -2
- package/esm2015/plugins/list/list.editor.js +3 -3
- package/esm2015/plugins/list/list.plugin.js +11 -11
- package/esm2015/plugins/list/normalizers/normalize-no.js +3 -3
- package/esm2015/plugins/list/on-key-down-list.js +2 -2
- package/esm2015/plugins/list/queries/get-list-item-entry.js +2 -2
- package/esm2015/plugins/list/queries/get-start-list-item.js +9 -2
- package/esm2015/plugins/list/queries/is-in-list.js +2 -2
- package/esm2015/plugins/list/queries/is-node-type-list.js +1 -1
- package/esm2015/plugins/list/queries/is-selection-at-list-item-start.js +2 -2
- package/esm2015/plugins/list/queries/is-selection-in-same-list-item.js +17 -0
- package/esm2015/plugins/list/transforms/insert-list-data.js +2 -2
- package/esm2015/plugins/list/transforms/insert-list-item.js +2 -2
- package/esm2015/plugins/list/transforms/move-list-item-sublist-items-to-list-item-sublist.js +2 -2
- package/esm2015/plugins/list/transforms/move-list-item-sublist-items-to-list.js +2 -2
- package/esm2015/plugins/list/transforms/move-list-item-up.js +2 -2
- package/esm2015/plugins/list/transforms/unwrap-list.js +2 -2
- package/esm2015/plugins/mark/mark.editor.js +6 -2
- package/esm2015/plugins/node-id/node-id.plugin.js +9 -4
- package/esm2015/plugins/normalizers/insert-paragraph-nodes.js +2 -2
- package/esm2015/plugins/normalizers/trailing-node.plugin.js +2 -2
- package/esm2015/plugins/paint-format/options.js +54 -0
- package/esm2015/plugins/paint-format/paint-format.editor.js +67 -0
- package/esm2015/plugins/placeholder/placeholder.component.js +75 -0
- package/esm2015/plugins/public-api.js +2 -1
- package/esm2015/plugins/quick-insert/components/quick-insert.component.js +76 -0
- package/esm2015/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.js +75 -0
- package/esm2015/plugins/quick-insert/quick-insert.editor.js +61 -0
- package/esm2015/plugins/quick-insert/quick-insert.plugint.js +37 -0
- package/esm2015/plugins/table/components/row/row.component.js +3 -1
- package/esm2015/plugins/table/components/table.component.js +11 -7
- package/esm2015/plugins/table/components/td/td.component.js +2 -1
- package/esm2015/plugins/table/components/toolbar/table-toolbar.component.js +5 -4
- package/esm2015/plugins/table/table.editor.js +3 -3
- package/esm2015/plugins/table/table.plugin.js +8 -7
- package/esm2015/plugins/table/toolbar-item.component.js +3 -3
- package/esm2015/plugins/table/transforms/insert-table.js +3 -3
- package/esm2015/plugins/table/utils/calc-anchor-position.js +6 -5
- package/esm2015/plugins/table/utils/merge-cell.js +3 -3
- package/esm2015/plugins/table/utils/split-cell.js +3 -3
- package/esm2015/plugins/todo-item/todo-item.component.js +2 -2
- package/esm2015/plugins/todo-item/todo-item.editor.js +2 -2
- package/esm2015/plugins/todo-item/todo-item.plugin.js +2 -2
- package/esm2015/plugins/vertical-align/toolbar-item.component.js +12 -4
- package/esm2015/public-api.js +4 -3
- package/esm2015/queries/get-container-blocks.js +3 -3
- package/esm2015/queries/get-selection-nodes-by-type.js +1 -1
- package/esm2015/queries/index.js +2 -58
- package/esm2015/queries/is-block-active.js +1 -1
- package/esm2015/queries/is-include-types.js +1 -1
- package/esm2015/services/context.service.js +9 -2
- package/esm2015/services/toolbar.service.js +5 -5
- package/esm2015/transforms/apply-deep-to-nodes.js +2 -2
- package/esm2015/transforms/delete-element.js +2 -2
- package/esm2015/transforms/handle-continual-delete-backward.js +18 -0
- package/esm2015/transforms/handle-continual-insert-break.js +23 -0
- package/esm2015/transforms/index.js +4 -20
- package/esm2015/transforms/insert-element-next.js +2 -2
- package/esm2015/transforms/insert-elements.js +2 -2
- package/esm2015/transforms/move-children.js +2 -2
- package/esm2015/transforms/on-keydown-reset-block-type.js +2 -2
- package/esm2015/transforms/set-node.js +2 -2
- package/esm2015/transforms/split-node.js +2 -2
- package/esm2015/transforms/un-wrap.js +1 -1
- package/esm2015/utils/auto-focus.js +2 -2
- package/esm2015/utils/fragment.js +3 -3
- package/esm2015/utils/is-clean-empty-paragraph.js +32 -0
- package/esm2015/utils/weak-maps.js +2 -1
- package/fesm2015/worktile-theia.js +1195 -534
- package/fesm2015/worktile-theia.js.map +1 -1
- package/interfaces/editor.d.ts +1 -96
- package/interfaces/toolbar.d.ts +3 -2
- package/interfaces/valid-children-types.d.ts +4 -4
- package/package.json +1 -1
- package/plugins/code/code.component.d.ts +3 -2
- package/plugins/color/color.editor.d.ts +1 -1
- package/plugins/common/get-fragment.plugin.d.ts +2 -2
- package/plugins/image/image.component.d.ts +1 -0
- package/plugins/image/image.component.scss +11 -1
- package/plugins/indent/indent.plugin.d.ts +2 -2
- package/plugins/indent/on-keydown-indent.d.ts +2 -2
- package/plugins/list/queries/get-start-list-item.d.ts +8 -2
- package/plugins/list/queries/is-selection-in-same-list-item.d.ts +5 -0
- package/plugins/mark/mark.editor.d.ts +1 -1
- package/plugins/normalizers/insert-paragraph-nodes.d.ts +2 -2
- package/plugins/normalizers/trailing-node.plugin.d.ts +2 -2
- package/plugins/paint-format/options.d.ts +2 -0
- package/plugins/paint-format/paint-format.editor.d.ts +7 -0
- package/{components → plugins}/placeholder/placeholder.component.d.ts +5 -6
- package/{components → plugins}/placeholder/placeholder.component.scss +0 -0
- package/plugins/public-api.d.ts +1 -0
- package/plugins/quick-insert/components/quick-insert.component.d.ts +25 -0
- package/plugins/quick-insert/components/quick-insert.component.scss +21 -0
- package/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.d.ts +29 -0
- package/plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.scss +21 -0
- package/plugins/quick-insert/quick-insert.editor.d.ts +8 -0
- package/plugins/quick-insert/quick-insert.plugint.d.ts +2 -0
- package/plugins/table/components/table.component.d.ts +1 -0
- package/plugins/table/components/table.component.scss +1 -1
- package/plugins/table/toolbar-item.component.d.ts +1 -2
- package/plugins/table/utils/split-cell.d.ts +1 -2
- package/plugins/todo-item/todo-item.component.scss +0 -6
- package/plugins/vertical-align/toolbar-item.component.d.ts +1 -0
- package/public-api.d.ts +3 -2
- package/queries/get-container-blocks.d.ts +2 -2
- package/queries/get-selection-nodes-by-type.d.ts +2 -2
- package/queries/index.d.ts +55 -73
- package/queries/is-block-active.d.ts +2 -2
- package/queries/is-include-types.d.ts +2 -2
- package/services/context.service.d.ts +9 -0
- package/services/toolbar.service.d.ts +1 -1
- package/styles/editor.scss +41 -15
- package/styles/index.scss +5 -2
- package/styles/typo.scss +4 -2
- package/transforms/handle-continual-delete-backward.d.ts +3 -0
- package/transforms/handle-continual-insert-break.d.ts +3 -0
- package/transforms/index.d.ts +20 -27
- package/transforms/split-node.d.ts +2 -2
- package/transforms/un-wrap.d.ts +2 -2
- package/utils/is-clean-empty-paragraph.d.ts +8 -0
- package/utils/weak-maps.d.ts +1 -0
- package/esm2015/components/placeholder/placeholder.component.js +0 -88
package/interfaces/editor.d.ts
CHANGED
|
@@ -14,105 +14,10 @@ export interface TheEditor extends AngularEditor, HistoryEditor {
|
|
|
14
14
|
[key: string]: any;
|
|
15
15
|
}
|
|
16
16
|
export declare const TheEditor: {
|
|
17
|
-
setMarks: (editor: TheEditor, marks: {
|
|
18
|
-
bold?: any;
|
|
19
|
-
italic?: any;
|
|
20
|
-
underlined?: any;
|
|
21
|
-
strike?: any;
|
|
22
|
-
color?: any;
|
|
23
|
-
"background-color"?: any;
|
|
24
|
-
"code-line"?: any;
|
|
25
|
-
}, at?: Path | import("slate").BaseRange | import("slate").BasePoint) => void;
|
|
26
|
-
clearMarks: (editor: TheEditor) => void;
|
|
27
|
-
insertElement: (editor: TheEditor, element: import("@worktile/theia").CustomElement) => void;
|
|
28
|
-
insertElementNext: (editor: TheEditor, node: import("@worktile/theia").CustomElement) => void;
|
|
29
|
-
insertParagraph: (editor: TheEditor, at: import("slate").Location) => void;
|
|
30
|
-
setNode: (editor: TheEditor, props: Partial<import("@worktile/theia").CustomElement>, origin: import("@worktile/theia").CustomElement) => void;
|
|
31
|
-
unwrapNodesByType: (editor: TheEditor, types: string | string[], options?: Omit<WrapOptions, "match">) => void;
|
|
32
|
-
onKeyDownResetBlockType: ({ rules }: import("./reset-block-type-plugin-options").ResetBlockTypePluginOptions) => (event: KeyboardEvent, editor: TheEditor) => boolean;
|
|
33
|
-
moveChildren: (editor: TheEditor, { at, to, match, start }: import("../transforms/move-children").MoveChildrenOptions) => number;
|
|
34
|
-
applyDeepToNodes: ({ node, source, apply, query }: import("../transforms/apply-deep-to-nodes").ApplyDeepToNodesOptions) => void;
|
|
35
|
-
mergeDeepToNodes: (options: Omit<import("../transforms/apply-deep-to-nodes").ApplyDeepToNodesOptions, "apply">) => void;
|
|
36
|
-
unWrap: (editor: TheEditor, kind: import("@worktile/theia").BlockElementKinds) => void;
|
|
37
|
-
splitNode: (editor: TheEditor, indivisibleTypes: import("@worktile/theia").ElementKinds[]) => Path;
|
|
38
|
-
deleteElement: (editor: TheEditor, element: import("@worktile/theia").CustomElement) => void;
|
|
39
|
-
setEndSelection: (editor: TheEditor) => void;
|
|
40
|
-
insertTheElements: (editor: TheEditor, nodes: import("@worktile/theia").CustomElement[]) => void;
|
|
41
|
-
closeConversionHint: (editor: TheEditor) => void;
|
|
42
|
-
getLastNode: (editor: TheEditor, level: number) => NodeEntry<Node>;
|
|
43
|
-
getAnchorBlockEntry: (editor: TheEditor, at?: Path | import("slate").BasePoint) => NodeEntry<import("@worktile/theia").CustomElement>;
|
|
44
|
-
getAboveByType: (editor: TheEditor, types: string | string[], options?: Omit<EditorAboveOptions<Ancestor>, "match">) => NodeEntry<Ancestor>;
|
|
45
|
-
getNodes: (editor: TheEditor, options?: EditorNodesOptions & import("../transforms/un-hang-range").UnhangRangeOptions) => Generator<NodeEntry<Node>, void, undefined>;
|
|
46
|
-
getNodesByType: (editor: TheEditor, types: string | string[], options?: Omit<EditorNodesOptions, "match">) => Generator<NodeEntry<Node>, void, undefined>;
|
|
47
|
-
getBlockAbove: (editor: TheEditor, options?: Omit<EditorAboveOptions<Ancestor>, "match">) => NodeEntry<Ancestor>;
|
|
48
|
-
getPreviousPath: (path: Path) => Path;
|
|
49
|
-
getNode: (editor: TheEditor, path: Path) => Node;
|
|
50
|
-
getParent: (editor: TheEditor, at: import("slate").Location, options?: EditorParentOptions) => NodeEntry<Ancestor>;
|
|
51
|
-
getLastChild: (nodeEntry: NodeEntry<Ancestor>) => NodeEntry<import("slate").Descendant>;
|
|
52
|
-
getLastChildPath: (nodeEntry: NodeEntry<Ancestor>) => Path;
|
|
53
|
-
getNextSiblingNodes: (ancestorEntry: NodeEntry<Ancestor>, path: Path) => import("slate").Descendant[];
|
|
54
|
-
getAbove: <T = Ancestor>(editor: TheEditor, options?: EditorAboveOptions<T>) => NodeEntry<Ancestor>;
|
|
55
|
-
getChildren: (nodeEntry: NodeEntry<Node>) => NodeEntry<Node>[];
|
|
56
|
-
getPointBefore: (editor: TheEditor, at: import("slate").Location, options?: import("../queries/get-point-before").PointBeforeOptions) => any;
|
|
57
|
-
getSelectionNodesByType: (editor: TheEditor, fragmentData: import("slate").Descendant[], types?: import("@worktile/theia").ElementKinds[]) => Node;
|
|
58
|
-
getText: (editor: TheEditor, at?: import("slate").Location) => string;
|
|
59
|
-
getPointFromLocation: (editor: TheEditor, { at, focus }?: {
|
|
60
|
-
at?: import("slate").Location;
|
|
61
|
-
focus?: boolean;
|
|
62
|
-
}) => import("slate").BasePoint;
|
|
63
|
-
getRangeFromBlockStart: (editor: TheEditor, options?: Omit<EditorAboveOptions<Ancestor>, "match">) => false | {
|
|
64
|
-
anchor: import("slate").BasePoint;
|
|
65
|
-
focus: import("slate").BasePoint;
|
|
66
|
-
};
|
|
67
|
-
getRangeBefore: (editor: TheEditor, at: import("slate").Location, options?: import("../queries/get-point-before").PointBeforeOptions) => import("slate").BaseRange;
|
|
68
|
-
getBlockCardCenterCursor: (editor: TheEditor) => import("slate").BasePoint;
|
|
69
|
-
getBlockCardAbove: (editor: TheEditor, options?: Omit<EditorAboveOptions<Ancestor>, "match">) => NodeEntry<Ancestor>;
|
|
70
|
-
getPlainText: (editor: TheEditor, format?: string) => string;
|
|
71
|
-
getSelectionMarks: (editor: TheEditor) => {
|
|
72
|
-
bold?: any;
|
|
73
|
-
italic?: any;
|
|
74
|
-
underlined?: any;
|
|
75
|
-
strike?: any;
|
|
76
|
-
color?: any;
|
|
77
|
-
"background-color"?: any;
|
|
78
|
-
"code-line"?: any;
|
|
79
|
-
};
|
|
80
|
-
getContainerBlocks: (editor: TheEditor) => import("@worktile/theia").ElementKinds[];
|
|
81
|
-
isAncestor: (node: Node) => node is Ancestor;
|
|
82
|
-
isCollapsed: (range?: import("slate").BaseRange) => boolean;
|
|
83
|
-
isEmptyParagraph: (editor: TheEditor, at?: Path | import("slate").BasePoint) => boolean;
|
|
84
|
-
isParagraph: (editor: TheEditor) => boolean;
|
|
85
|
-
isBlockActive: (editor: TheEditor, format: import("@worktile/theia").BlockElementKinds) => boolean;
|
|
86
|
-
isIncludeTypes: (editor: TheEditor, types: import("@worktile/theia").ElementKinds[]) => boolean;
|
|
87
|
-
isAncestorEmpty: (editor: TheEditor, node: Ancestor) => boolean;
|
|
88
|
-
isBlockAboveEmpty: (editor: TheEditor) => boolean;
|
|
89
|
-
isNodeTypeIn: (editor: TheEditor, types: string | string[], options?: Omit<EditorNodesOptions, "match">) => boolean;
|
|
90
|
-
isFirstChild: (path: Path) => boolean;
|
|
91
|
-
isPointAtRoot: (point: import("slate").BasePoint) => boolean;
|
|
92
|
-
isRangeAtRoot: (range: import("slate").BaseRange) => boolean;
|
|
93
|
-
isBlockTextEmptyAfterSelection: (editor: TheEditor) => boolean;
|
|
94
|
-
isStart: (editor: TheEditor, point: import("slate").BasePoint, at: import("slate").Location) => boolean;
|
|
95
|
-
isRangeAcrossBlocks: (editor: TheEditor, { at, ...options }?: Omit<EditorAboveOptions<Ancestor>, "match" | "at"> & {
|
|
96
|
-
at?: import("slate").BaseRange;
|
|
97
|
-
}) => boolean;
|
|
98
|
-
isDescendant: (node: any) => node is import("slate").Descendant;
|
|
99
|
-
isNodeType: (entry?: NodeEntry<Node>, { filter, allow, exclude }?: QueryOptions) => boolean;
|
|
100
|
-
isAcrossBlocks: (editor: TheEditor, fragment: import("@worktile/theia").CustomElement[]) => boolean;
|
|
101
|
-
isBlockCardCursor: (editor: TheEditor) => boolean;
|
|
102
|
-
isEmptyContent: (children: import("slate").Descendant[]) => boolean;
|
|
103
|
-
isEmptyParagraphByPath: (editor: TheEditor, at: Path) => boolean;
|
|
104
|
-
isContainer: (editor: TheEditor, value: import("@worktile/theia").CustomElement) => boolean;
|
|
105
|
-
anchorBlock: (editor: TheEditor) => import("@worktile/theia").CustomElement;
|
|
106
|
-
anchorBlockEntry: (editor: TheEditor, at?: Path | import("slate").BasePoint) => NodeEntry<import("@worktile/theia").CustomElement>;
|
|
107
|
-
anchorInlineEntry: (editor: TheEditor) => NodeEntry<import("@worktile/theia").CustomElement>;
|
|
108
|
-
anchorInline: (editor: TheEditor) => import("@worktile/theia").CustomElement;
|
|
109
|
-
findPath: (editor: AngularEditor, node: Node) => Path;
|
|
110
|
-
findNode: <T_1 extends Node = Node>(editor: TheEditor, options: import("../queries/find-node").FindNodeOptions<T_1>) => NodeEntry<T_1>;
|
|
111
|
-
findDescendant: <T_2 extends Node = Node>(editor: TheEditor, options: import("../queries/find-node").FindNodeOptions<T_2>) => NodeEntry<T_2>;
|
|
112
|
-
someNode: <T_3 extends Node = Node>(editor: TheEditor, options: import("../queries/find-node").FindNodeOptions<T_3>) => boolean;
|
|
113
17
|
getWindow(editor: AngularEditor): Window;
|
|
114
18
|
findKey(editor: AngularEditor, node: Node): import("slate-angular").Key;
|
|
115
19
|
onError(errorData: import("slate-angular").SlateError): void;
|
|
20
|
+
findPath(editor: AngularEditor, node: Node): Path;
|
|
116
21
|
findDocumentOrShadowRoot(editor: AngularEditor): Document | ShadowRoot;
|
|
117
22
|
isFocused(editor: AngularEditor): boolean;
|
|
118
23
|
isReadonly(editor: AngularEditor): boolean;
|
package/interfaces/toolbar.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare enum ToolbarAlignment {
|
|
|
14
14
|
export declare type ToolbarDefinition = {
|
|
15
15
|
global?: string[];
|
|
16
16
|
inline?: string[];
|
|
17
|
-
|
|
17
|
+
quick?: string[];
|
|
18
18
|
};
|
|
19
19
|
interface ToolbarItemBase {
|
|
20
20
|
key: ToolbarKey;
|
|
@@ -29,6 +29,7 @@ interface ToolbarItemBase {
|
|
|
29
29
|
}
|
|
30
30
|
export interface CustomizeToolbarItem extends ToolbarItemBase {
|
|
31
31
|
iconComponent?: ComponentType<any>;
|
|
32
|
+
quickItemComponent?: ComponentType<any>;
|
|
32
33
|
type?: ToolbarItemType;
|
|
33
34
|
dropdownMode?: DropdownMode;
|
|
34
35
|
}
|
|
@@ -41,7 +42,7 @@ export declare type ToolbarItem = CustomizeToolbarItem & DefaultToolbarItem;
|
|
|
41
42
|
export declare type ToolbarEntity = {
|
|
42
43
|
global?: ToolbarItem[];
|
|
43
44
|
inline?: ToolbarItem[];
|
|
44
|
-
|
|
45
|
+
quick?: ToolbarItem[];
|
|
45
46
|
};
|
|
46
47
|
export interface ToolbarInitOption {
|
|
47
48
|
toolbarDefinition: ToolbarDefinition;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomElementKinds } from '../custom-types';
|
|
2
2
|
export interface ElementOptionsInfo {
|
|
3
|
-
type:
|
|
4
|
-
inValidChildrenTypes:
|
|
3
|
+
type: CustomElementKinds;
|
|
4
|
+
inValidChildrenTypes: CustomElementKinds[];
|
|
5
5
|
isIndivisible?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare const inValidTypes:
|
|
7
|
+
export declare const inValidTypes: CustomElementKinds[];
|
|
8
8
|
export declare const DefaultElementOptions: ElementOptionsInfo[];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { ElementRef, ChangeDetectorRef, OnInit, AfterViewInit, NgZone } from '@a
|
|
|
2
2
|
import { ThyNotifyService } from 'ngx-tethys/notify';
|
|
3
3
|
import { Editor } from 'slate';
|
|
4
4
|
import { CodeMirrorComponent } from 'ng-codemirror';
|
|
5
|
-
import { DropdownMode } from '../../constants';
|
|
5
|
+
import { DropdownMode, CodeMode } from '../../constants';
|
|
6
6
|
import { DefaultToolbarItem, TheBaseElementComponent } from '../../interfaces';
|
|
7
7
|
import { CodeElement } from '../../custom-types';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
@@ -11,6 +11,7 @@ export declare class TheCodeComponent extends TheBaseElementComponent<CodeElemen
|
|
|
11
11
|
cdr: ChangeDetectorRef;
|
|
12
12
|
private thyNotifyService;
|
|
13
13
|
private ngZone;
|
|
14
|
+
private mode;
|
|
14
15
|
startRenderCodemirror: boolean;
|
|
15
16
|
dropdownMode: typeof DropdownMode;
|
|
16
17
|
maxHeight: number;
|
|
@@ -32,7 +33,7 @@ export declare class TheCodeComponent extends TheBaseElementComponent<CodeElemen
|
|
|
32
33
|
get code(): string;
|
|
33
34
|
codemirror: CodeMirrorComponent;
|
|
34
35
|
onContextChange(): void;
|
|
35
|
-
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyNotifyService: ThyNotifyService, ngZone: NgZone);
|
|
36
|
+
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyNotifyService: ThyNotifyService, ngZone: NgZone, mode: CodeMode);
|
|
36
37
|
ngOnInit(): void;
|
|
37
38
|
ngAfterViewInit(): void;
|
|
38
39
|
renderCodemirror(): void;
|
|
@@ -2,7 +2,7 @@ import { Editor } from 'slate';
|
|
|
2
2
|
import { ColorType } from '../../constants/color-select';
|
|
3
3
|
import { MarkTypes } from '../../constants/node-types';
|
|
4
4
|
export declare const ColorEditor: {
|
|
5
|
-
getActiveColor(editor:
|
|
5
|
+
getActiveColor(editor: Editor, type: MarkTypes.color | MarkTypes.backgroundColor): string;
|
|
6
6
|
setColor(editor: Editor, color: ColorType, type: MarkTypes.color | MarkTypes.backgroundColor): void;
|
|
7
7
|
selectColor(editor: Editor, type: MarkTypes.color | MarkTypes.backgroundColor): void;
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const withGetFragment: (elementKinds?:
|
|
1
|
+
import { CustomElementKinds } from '../../custom-types';
|
|
2
|
+
export declare const withGetFragment: (elementKinds?: CustomElementKinds[]) => <T extends import("@worktile/theia").TheEditor>(editor: T) => T;
|
|
@@ -16,6 +16,7 @@ export declare class TheImageComponent extends TheBaseElementComponent<ImageElem
|
|
|
16
16
|
imageEntry: ImageEntry;
|
|
17
17
|
uploading: boolean;
|
|
18
18
|
percentage: number;
|
|
19
|
+
file: File;
|
|
19
20
|
private uploadingSubscription;
|
|
20
21
|
private mouseMoveSubscription;
|
|
21
22
|
private mouseUpSubscription;
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
border: 0.5px solid rgba(0, 0, 0, 0.05);
|
|
112
112
|
border-radius: 3px;
|
|
113
113
|
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.1);
|
|
114
|
-
background:
|
|
114
|
+
background: $white;
|
|
115
115
|
color: grey;
|
|
116
116
|
font-weight: 500;
|
|
117
117
|
text-align: center;
|
|
@@ -169,6 +169,16 @@
|
|
|
169
169
|
cursor: pointer;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
+
|
|
173
|
+
.image-loading {
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
width: 100%;
|
|
178
|
+
height: 280px;
|
|
179
|
+
background: rgb(244, 245, 247);
|
|
180
|
+
color: $gray-500;
|
|
181
|
+
}
|
|
172
182
|
}
|
|
173
183
|
|
|
174
184
|
.image-container:hover .layer {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const withIndent: (kinds:
|
|
1
|
+
import { CustomElementKinds } from '../../custom-types';
|
|
2
|
+
export declare const withIndent: (kinds: CustomElementKinds[]) => <T extends import("@worktile/theia").TheEditor>(editor: T) => T;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
|
-
import {
|
|
3
|
-
export declare const onKeydownIndent: (editor: Editor, event: KeyboardEvent, kinds:
|
|
2
|
+
import { CustomElementKinds } from '../../custom-types';
|
|
3
|
+
export declare const onKeydownIndent: (editor: Editor, event: KeyboardEvent, kinds: CustomElementKinds[]) => boolean;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Element } from 'slate';
|
|
2
|
+
/**
|
|
3
|
+
* 获取 List 中 ListItems,过滤掉空列表嵌套
|
|
4
|
+
* @param node
|
|
5
|
+
* @param initialValue
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const getStartListItem: (node: Element[], initialValue?: Element[]) => import("@worktile/theia").CustomElement[];
|
|
@@ -3,6 +3,6 @@ export interface MarkEditor extends Editor {
|
|
|
3
3
|
removeMark: (key: string, shouldChange?: boolean) => void;
|
|
4
4
|
}
|
|
5
5
|
export declare const MarkEditor: {
|
|
6
|
-
isMarkActive(editor:
|
|
6
|
+
isMarkActive(editor: Editor, format: any): boolean;
|
|
7
7
|
toggleMark(editor: any, format: any): void;
|
|
8
8
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ElementKinds } from '../../constants';
|
|
2
1
|
import { TransformEditor } from '../common/transforms.plugin';
|
|
3
|
-
|
|
2
|
+
import { CustomElementKinds } from '../../custom-types';
|
|
3
|
+
export declare const withInsertParagraphNodes: (types?: CustomElementKinds[]) => <T extends import("@worktile/theia").TheEditor & TransformEditor>(editor: T) => T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { QueryOptions } from '../../interfaces';
|
|
2
|
-
import { ElementKinds } from '../../constants';
|
|
3
2
|
import { TransformEditor } from '../common/transforms.plugin';
|
|
3
|
+
import { CustomElementKinds } from '../../custom-types';
|
|
4
4
|
export interface WithTrailingNode extends QueryOptions {
|
|
5
|
-
type?:
|
|
5
|
+
type?: CustomElementKinds;
|
|
6
6
|
level?: number;
|
|
7
7
|
}
|
|
8
8
|
export declare const withTrailingNode: ({ type, level, ...query }?: WithTrailingNode) => <T extends import("../../interfaces").TheEditor & TransformEditor>(editor: T) => T;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TheEditor } from '../../interfaces';
|
|
2
|
+
export declare const PaintFormatEditor: {
|
|
3
|
+
formatBrush(editor: TheEditor): void;
|
|
4
|
+
isActive(editor: TheEditor): boolean;
|
|
5
|
+
enableFormatBrush(editor: TheEditor): void;
|
|
6
|
+
cancelFormatBrushStatus(editor: TheEditor): void;
|
|
7
|
+
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
import { Editor
|
|
2
|
+
import { Editor } from 'slate';
|
|
3
|
+
import { TheOptions } from '../../interfaces';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class ThePlaceholderComponent {
|
|
5
6
|
private renderer;
|
|
6
7
|
private elementRef;
|
|
7
8
|
editor: Editor;
|
|
8
|
-
|
|
9
|
-
placeholder: string;
|
|
9
|
+
options: TheOptions;
|
|
10
10
|
isHide: boolean;
|
|
11
|
-
get selection(): import("slate").BaseRange;
|
|
12
11
|
handleCompositionStart(): void;
|
|
13
12
|
handleCompositionEnd(event: any): void;
|
|
14
13
|
constructor(renderer: Renderer2, elementRef: ElementRef);
|
|
15
|
-
checkStatus(
|
|
14
|
+
checkStatus(): void;
|
|
16
15
|
private updatePosition;
|
|
17
16
|
private hide;
|
|
18
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ThePlaceholderComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ThePlaceholderComponent, "div[thePlaceholder]", never, { "editor": "editor"; "
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ThePlaceholderComponent, "div[thePlaceholder]", never, { "editor": "editor"; "options": "options"; }, {}, never, never>;
|
|
20
19
|
}
|
|
File without changes
|
package/plugins/public-api.d.ts
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ElementRef, Renderer2, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { Editor } from 'slate';
|
|
3
|
+
import { ToolbarItem } from '../../../interfaces/toolbar';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class TheQuickInsertComponent {
|
|
6
|
+
private renderer;
|
|
7
|
+
private elementRef;
|
|
8
|
+
private cdr;
|
|
9
|
+
editor: Editor;
|
|
10
|
+
quickToolbarItems: ToolbarItem[];
|
|
11
|
+
isHide: boolean;
|
|
12
|
+
defaultIconName: string;
|
|
13
|
+
iconNameFill: string;
|
|
14
|
+
displayIconName: string;
|
|
15
|
+
iconElement: ElementRef<any>;
|
|
16
|
+
handleMousedownNativeElement(event: any): void;
|
|
17
|
+
constructor(renderer: Renderer2, elementRef: ElementRef, cdr: ChangeDetectorRef);
|
|
18
|
+
checkStatus(): void;
|
|
19
|
+
private updatePosition;
|
|
20
|
+
mouseEnter(event: MouseEvent): void;
|
|
21
|
+
mouseLeave(event: MouseEvent): void;
|
|
22
|
+
handleClick(event: MouseEvent): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TheQuickInsertComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheQuickInsertComponent, "[theQuickInsert]", never, { "editor": "editor"; "quickToolbarItems": "quickToolbarItems"; }, {}, never, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.the-quick-insert {
|
|
2
|
+
position: absolute;
|
|
3
|
+
width: calc(100% - 30px);
|
|
4
|
+
|
|
5
|
+
&.hide {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.quick-insert-icon {
|
|
10
|
+
position: absolute;
|
|
11
|
+
left: -25px;
|
|
12
|
+
top: 3px;
|
|
13
|
+
font-size: 18px !important;
|
|
14
|
+
color: #CACACA !important;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: $primary !important;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, ElementRef } from '@angular/core';
|
|
2
|
+
import { MixinBase } from 'ngx-tethys/core';
|
|
3
|
+
import { ThyPopoverRef } from 'ngx-tethys/popover';
|
|
4
|
+
import { Editor } from 'slate';
|
|
5
|
+
import { ToolbarItem } from '../../../../interfaces/toolbar';
|
|
6
|
+
import { ToolbarActionTypes } from '../../../../constants/node-types';
|
|
7
|
+
import { ToolbarItemMode } from '../../../../constants/toolbar';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
declare const TheQuickToolbarComponent_base: import("ngx-tethys/core").Constructor<import("ngx-tethys/core").ThyUnsubscribe> & typeof MixinBase;
|
|
10
|
+
export declare class TheQuickToolbarComponent extends TheQuickToolbarComponent_base implements OnInit, OnDestroy {
|
|
11
|
+
private popoverRef;
|
|
12
|
+
elementRef: ElementRef;
|
|
13
|
+
editor: Editor;
|
|
14
|
+
quickToolbarItems: ToolbarItem[];
|
|
15
|
+
editorElement: HTMLElement;
|
|
16
|
+
ToolbarItemMode: typeof ToolbarItemMode;
|
|
17
|
+
ToolbarActionTypes: typeof ToolbarActionTypes;
|
|
18
|
+
handleMouseDown(event: MouseEvent): void;
|
|
19
|
+
handleEnter(): void;
|
|
20
|
+
constructor(popoverRef: ThyPopoverRef<TheQuickToolbarComponent>, elementRef: ElementRef);
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
stopPropagation(event: any): void;
|
|
23
|
+
selectionChange(event: any): void;
|
|
24
|
+
removeHotKey(): void;
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TheQuickToolbarComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheQuickToolbarComponent, "the-quick-toolbar", never, { "editor": "editor"; "quickToolbarItems": "quickToolbarItems"; }, {}, never, never>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.the-quick-toolbar {
|
|
2
|
+
width: 200px;
|
|
3
|
+
height: 400px;
|
|
4
|
+
padding: 10px 0;
|
|
5
|
+
overflow-y: scroll;
|
|
6
|
+
|
|
7
|
+
.quick-toolbar-icon {
|
|
8
|
+
margin-right: 8px;
|
|
9
|
+
color: $gray-600;
|
|
10
|
+
}
|
|
11
|
+
.quick-toolbar-name {
|
|
12
|
+
flex: 1;
|
|
13
|
+
color: $gray-800;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-container {
|
|
17
|
+
.thy-popover-container {
|
|
18
|
+
min-width: auto;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { Editor } from 'slate';
|
|
3
|
+
import { ToolbarItem } from '../../interfaces/toolbar';
|
|
4
|
+
export declare const QuickInsertEditor: {
|
|
5
|
+
openQuickToolbar(editor: Editor, toolbarItems: ToolbarItem[], origin: HTMLElement | ElementRef): void;
|
|
6
|
+
closeQuickToolbar(editor: Editor): void;
|
|
7
|
+
isOpenToolbar(editor: Editor, opTypes?: string[]): boolean;
|
|
8
|
+
};
|
|
@@ -45,6 +45,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
45
45
|
useTableWrapperWidth(): void;
|
|
46
46
|
subscribeCellsChange(): void;
|
|
47
47
|
useRowControls(): void;
|
|
48
|
+
detectChanges(): void;
|
|
48
49
|
calculateMinRowSpanCellForRows(): {
|
|
49
50
|
cell?: TableCellElement;
|
|
50
51
|
rowIndex: number;
|
|
@@ -215,7 +215,7 @@ $control-corner-width: 12px;
|
|
|
215
215
|
|
|
216
216
|
&::after {
|
|
217
217
|
background-color: #d8d8d8;
|
|
218
|
-
border-radius: ($dot-size + 1)
|
|
218
|
+
border-radius: math.div($dot-size + 1, 2);
|
|
219
219
|
box-shadow: inset $dot-padding-top 0 0 0 #d8d8d8, inset (-$dot-padding-top) 0 0 0 #d8d8d8, inset 0 (-$dot-shadow-top) 0 0 #d8d8d8,
|
|
220
220
|
inset 0 $dot-shadow-top 0 0 #d8d8d8;
|
|
221
221
|
height: $dot-size;
|
|
@@ -3,7 +3,6 @@ import { ThyPopover, ThyPopoverRef } from 'ngx-tethys';
|
|
|
3
3
|
import { Editor } from 'slate';
|
|
4
4
|
import { TheToolbarBaseItemComponent } from '../../components/toolbar-base-item/toolbar-base-item.component';
|
|
5
5
|
import { TheTableSelectComponent } from '../../components/table-select/table-select.component';
|
|
6
|
-
import { ElementKinds } from '../../constants';
|
|
7
6
|
import { DefaultToolbarItem } from '../../interfaces';
|
|
8
7
|
import { TableOptions } from './table.types';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
@@ -18,7 +17,7 @@ export declare class TheTableToolbarItemComponent extends TheToolbarBaseItemComp
|
|
|
18
17
|
constructor(thyPopover: ThyPopover, overlay: Overlay);
|
|
19
18
|
statusChange(editor: Editor): void;
|
|
20
19
|
execute(event: MouseEvent): void;
|
|
21
|
-
toggleTableSelect(event: MouseEvent,
|
|
20
|
+
toggleTableSelect(event: MouseEvent, optionsParam?: TableOptions): ThyPopoverRef<TheTableSelectComponent, unknown, unknown>;
|
|
22
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableToolbarItemComponent, never>;
|
|
23
22
|
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableToolbarItemComponent, "the-table-toolbar-item", never, { "item": "item"; "editor": "editor"; }, {}, never, never>;
|
|
24
23
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
2
|
import { TableCellElement, TableElement } from '../../../custom-types';
|
|
3
|
-
|
|
4
|
-
export declare function splitCell(editor: Editor): TheEditor;
|
|
3
|
+
export declare function splitCell(editor: Editor): import("@worktile/theia").TheEditor;
|
|
5
4
|
export declare function resetTableCell(editor: Editor, table: TableElement, cell: TableCellElement, cellRow: number, cellCol: number): void;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
height: auto;
|
|
3
3
|
line-height: 24px;
|
|
4
4
|
padding-left: 2em;
|
|
5
|
-
margin-left: 0px; // compat theia todo-item style and will be removed in the future
|
|
6
|
-
margin-bottom: 4px !important;
|
|
7
5
|
position: relative;
|
|
8
6
|
|
|
9
7
|
.todo-item-status {
|
|
@@ -18,8 +16,4 @@
|
|
|
18
16
|
transform: translateY(3px);
|
|
19
17
|
margin-top: 0;
|
|
20
18
|
}
|
|
21
|
-
|
|
22
|
-
& + div:not(.the-check-item) {
|
|
23
|
-
margin-top: 8px;
|
|
24
|
-
}
|
|
25
19
|
}
|
|
@@ -19,6 +19,7 @@ export declare class TheVerticalToolbarItemComponent extends TheToolbarBaseItemC
|
|
|
19
19
|
toolbarItem: ToolbarItem;
|
|
20
20
|
template: TemplateRef<any>;
|
|
21
21
|
get isOpened(): boolean;
|
|
22
|
+
handleDocumentMouseDown(event: MouseEvent): void;
|
|
22
23
|
constructor(elementRef: ElementRef, thyPopover: ThyPopover, viewContainerRef: ViewContainerRef);
|
|
23
24
|
ngOnInit(): void;
|
|
24
25
|
statusChange(editor: Editor): void;
|
package/public-api.d.ts
CHANGED
|
@@ -8,11 +8,12 @@ export * from './plugins/image/image.component';
|
|
|
8
8
|
export * from './services/toolbar.service';
|
|
9
9
|
export * from './editor.component';
|
|
10
10
|
export * from './components/toolbar/toolbar.component';
|
|
11
|
+
export * from './components/toolbar-base-item/toolbar-base-item.component';
|
|
11
12
|
export * from './components/toolbar-dropdown/toolbar-dropdown.component';
|
|
12
13
|
export * from './components/toolbar-group/toolbar-group.component';
|
|
13
14
|
export * from './components/toolbar-item/toolbar-item.component';
|
|
14
15
|
export * from './components/element/element.component';
|
|
15
|
-
export * from './queries/index';
|
|
16
|
-
export * from './transforms/index';
|
|
16
|
+
export * as TheQueries from './queries/index';
|
|
17
|
+
export * as TheTransforms from './transforms/index';
|
|
17
18
|
export * from './utils/index';
|
|
18
19
|
export * from './services/context.service';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getContainerBlocks: (editor:
|
|
1
|
+
import { Editor } from 'slate';
|
|
2
|
+
export declare const getContainerBlocks: (editor: Editor) => (import("../constants/node-types").ElementKinds.image | import("../constants/node-types").ElementKinds.paragraph | import("../constants/node-types").ElementKinds.heading_1 | import("../constants/node-types").ElementKinds.heading_2 | import("../constants/node-types").ElementKinds.heading_3 | import("../constants/node-types").ElementKinds.heading_4 | import("../constants/node-types").ElementKinds.heading_5 | import("../constants/node-types").ElementKinds.heading_6 | import("../constants/node-types").ElementKinds.numberedList | import("../constants/node-types").ElementKinds.bulletedList | import("../constants/node-types").ElementKinds.listItem | import("../constants/node-types").ElementKinds.checkItem | import("../constants/node-types").ElementKinds.table | import("../constants/node-types").ElementKinds.tableRow | import("../constants/node-types").ElementKinds.tableCell | import("../constants/node-types").ElementKinds.code | import("../constants/node-types").ElementKinds.blockquote | import("../constants/node-types").ElementKinds.hr | import("../constants/node-types").ElementKinds.link)[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Node, Descendant, Editor } from 'slate';
|
|
2
|
-
import {
|
|
3
|
-
export declare const getSelectionNodesByType: (editor: Editor, fragmentData: Descendant[], types?:
|
|
2
|
+
import { CustomElementKinds } from '../custom-types';
|
|
3
|
+
export declare const getSelectionNodesByType: (editor: Editor, fragmentData: Descendant[], types?: CustomElementKinds[]) => Node;
|