@flogeez/angular-tiptap-editor 3.5.3 → 3.5.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/CHANGELOG.md +17 -0
- package/esm2022/lib/components/bubble-menus/color/ate-color-bubble-menu.component.mjs +12 -2
- package/esm2022/lib/components/bubble-menus/link/ate-link-bubble-menu.component.mjs +22 -2
- package/esm2022/lib/components/editor/angular-tiptap-editor.component.mjs +12 -4
- package/esm2022/lib/extensions/ate-link-shortcut.extension.mjs +50 -0
- package/esm2022/lib/utils/ate-equality.utils.mjs +14 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/flogeez-angular-tiptap-editor.mjs +103 -5
- package/fesm2022/flogeez-angular-tiptap-editor.mjs.map +1 -1
- package/lib/components/bubble-menus/color/ate-color-bubble-menu.component.d.ts +1 -0
- package/lib/components/bubble-menus/link/ate-link-bubble-menu.component.d.ts +1 -0
- package/lib/extensions/ate-link-shortcut.extension.d.ts +15 -0
- package/lib/utils/ate-equality.utils.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -55,6 +55,7 @@ export declare class AteColorBubbleMenuComponent extends AteBaseSubBubbleMenu {
|
|
|
55
55
|
activeMode: import("@angular/core").WritableSignal<"highlight" | "text">;
|
|
56
56
|
protected onStateChange(): void;
|
|
57
57
|
shouldShow(): boolean;
|
|
58
|
+
private findColoredElementInContent;
|
|
58
59
|
getSelectionRect(): DOMRect;
|
|
59
60
|
protected onTippyShow(_instance: TippyInstance): void;
|
|
60
61
|
protected onTippyHide(_instance: TippyInstance): void;
|
|
@@ -38,6 +38,7 @@ export declare class AteLinkBubbleMenuComponent extends AteBaseSubBubbleMenu {
|
|
|
38
38
|
linkInput: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
39
39
|
editUrl: import("@angular/core").WritableSignal<string>;
|
|
40
40
|
constructor();
|
|
41
|
+
private focusInputWhenVisible;
|
|
41
42
|
protected onStateChange(): void;
|
|
42
43
|
shouldShow(): boolean;
|
|
43
44
|
getSelectionRect(): DOMRect;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Editor, Extension } from "@tiptap/core";
|
|
2
|
+
export interface AteLinkShortcutOptions {
|
|
3
|
+
/** Whether a link can be set or edited at the current selection */
|
|
4
|
+
canOpen: () => boolean;
|
|
5
|
+
/** Opens the link editor */
|
|
6
|
+
open: (editor: Editor) => void;
|
|
7
|
+
}
|
|
8
|
+
/** Matches the bare `Mod+K` chord (`Cmd+K` on macOS, `Ctrl+K` elsewhere) */
|
|
9
|
+
export declare function isLinkShortcut(event: KeyboardEvent): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* `Mod+K` opens the link editor when text is selected or the cursor is on a link.
|
|
12
|
+
* With an empty selection outside a link the event is left alone, so host-level `Mod+K`
|
|
13
|
+
* shortcuts (search, command palettes) keep working.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AteLinkShortcut: Extension<AteLinkShortcutOptions, any>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export * from "./lib/extensions/calculators/ate-selection.calculator";
|
|
|
24
24
|
export * from "./lib/extensions/calculators/ate-structure.calculator";
|
|
25
25
|
export * from "./lib/extensions/calculators/ate-table.calculator";
|
|
26
26
|
export { AtePastedImage, classifyPastedImageSrc, dataUriToFile, sanitizePastedImages, type AtePastedImageOptions, type AtePastedImageSource, } from "./lib/extensions/ate-pasted-image.extension";
|
|
27
|
+
export { AteLinkShortcut, isLinkShortcut, type AteLinkShortcutOptions, } from "./lib/extensions/ate-link-shortcut.extension";
|
|
27
28
|
export * from "./lib/models/ate-toolbar.model";
|
|
28
29
|
export * from "./lib/models/ate-image.model";
|
|
29
30
|
export * from "./lib/models/ate-bubble-menu.model";
|