@contentful/field-editor-rich-text 2.0.0-next.23 → 2.0.0-next.24
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/dist/field-editor-rich-text.cjs.development.js +61 -26
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +61 -26
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/editor.d.ts +1 -1
- package/dist/plugins/Hyperlink/HyperlinkModal.d.ts +2 -1
- package/dist/test-utils/jsx.d.ts +1 -1
- package/package.json +1 -1
package/dist/helpers/editor.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function isBlockSelected(editor: PlateEditor, type: string): bool
|
|
|
8
8
|
export declare function isRootLevel(path: Path): boolean;
|
|
9
9
|
declare type NodeEntry = [CustomElement, Path];
|
|
10
10
|
declare type NodeType = BLOCKS | INLINES;
|
|
11
|
-
export declare function getNodeEntryFromSelection(editor: RichTextEditor, nodeTypeOrTypes: NodeType | NodeType[]): NodeEntry | [];
|
|
11
|
+
export declare function getNodeEntryFromSelection(editor: RichTextEditor, nodeTypeOrTypes: NodeType | NodeType[], path?: Path): NodeEntry | [];
|
|
12
12
|
export declare function isNodeTypeSelected(editor: RichTextEditor, nodeType: BLOCKS | INLINES): boolean;
|
|
13
13
|
export declare function moveToTheNextLine(editor: RichTextEditor): void;
|
|
14
14
|
export declare function moveToTheNextChar(editor: RichTextEditor): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Link } from '@contentful/field-editor-reference/dist/types';
|
|
2
2
|
import { FieldExtensionSDK } from '@contentful/field-editor-shared';
|
|
3
|
+
import { Path } from 'slate';
|
|
3
4
|
import { TrackingPluginActions } from '../../plugins/Tracking';
|
|
4
5
|
import { RichTextEditor } from '../../types';
|
|
5
6
|
interface HyperlinkModalProps {
|
|
@@ -11,5 +12,5 @@ interface HyperlinkModalProps {
|
|
|
11
12
|
sdk: FieldExtensionSDK;
|
|
12
13
|
}
|
|
13
14
|
export declare function HyperlinkModal(props: HyperlinkModalProps): JSX.Element;
|
|
14
|
-
export declare function addOrEditLink(editor: RichTextEditor, sdk: FieldExtensionSDK, logAction: TrackingPluginActions['onToolbarAction'] | TrackingPluginActions['onShortcutAction'] | TrackingPluginActions['onViewportAction']): Promise<void>;
|
|
15
|
+
export declare function addOrEditLink(editor: RichTextEditor, sdk: FieldExtensionSDK, logAction: TrackingPluginActions['onToolbarAction'] | TrackingPluginActions['onShortcutAction'] | TrackingPluginActions['onViewportAction'], targetPath?: Path): Promise<void>;
|
|
15
16
|
export {};
|
package/dist/test-utils/jsx.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Add items as needed. Don't forget to adjust hyperscript.d.ts
|
|
5
5
|
*/
|
|
6
|
-
export declare const jsx: <S extends "
|
|
6
|
+
export declare const jsx: <S extends "selection" | "text" | "element" | "editor" | "focus" | "anchor" | "cursor" | "fragment">(tagName: S, attributes?: Object | undefined, ...children: any[]) => ReturnType<({
|
|
7
7
|
anchor: typeof import("slate-hyperscript/dist/creators").createAnchor;
|
|
8
8
|
cursor: typeof import("slate-hyperscript/dist/creators").createCursor;
|
|
9
9
|
editor: (tagName: string, attributes: {
|