@samhammer/tiptob 2.3.38 → 2.3.41
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/README.md +9 -2
- package/dist/extensions.d.ts +2 -1
- package/dist/extensions.js +196 -159
- package/dist/extensions.js.map +1 -1
- package/dist/plugins/InternalLink/InternalLinkExtension.d.ts +13 -0
- package/dist/web-components.js +2462 -2168
- package/dist/web-components.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ You can now use the provided custom elements in your HTML:
|
|
|
48
48
|
Import the extensions bundle to use with your TipTap editor instance:
|
|
49
49
|
|
|
50
50
|
```js
|
|
51
|
-
import { ImageExtension, KnowledgeExtension, SelectionDecoration, TableBubbleMenuExtension } from '@samhammer/tiptob/extensions';
|
|
51
|
+
import { ImageExtension, InternalLinkExtension, KnowledgeExtension, SelectionDecoration, TableBubbleMenuExtension } from '@samhammer/tiptob/extensions';
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
---
|
|
@@ -73,6 +73,7 @@ TipToB provides the following web components:
|
|
|
73
73
|
| `<tiptob-undo-button>` | `@tiptap/extensions (UndoRedo)` |
|
|
74
74
|
| `<tiptob-remove-format-button>`||
|
|
75
75
|
| `<tiptob-hyperlink-button>` | `@tiptap/extension-link (Link)` |
|
|
76
|
+
| `<tiptob-internal-link-button>` | `InternalLinkExtension` (from TipToB), plus `fetchSuggestions`, `fetchTitle`, and `getPreviewUrl` callback properties |
|
|
76
77
|
| `<tiptob-table-button>` | `@tiptap/extension-table (Table, TableCell, TableHeader, TableRow)`|
|
|
77
78
|
| `<tiptob-table-bubble-menu>`| `TableBubbleMenuExtension` (from TipToB), `@tiptap/extension-table (Table, TableCell, TableHeader, TableRow)` |
|
|
78
79
|
| `<tiptob-text-align-button>`| `@tiptap/extension-text-align (TextAlign)` |
|
|
@@ -85,6 +86,12 @@ TipToB provides the following web components:
|
|
|
85
86
|
```js
|
|
86
87
|
uploadInlineImage(file: File): Promise<string>;
|
|
87
88
|
```
|
|
89
|
+
- **InternalLinkExtension**: Add support for `<internallink internallinkid="...">` marks. The `<tiptob-internal-link-button>` component requires these callback properties:
|
|
90
|
+
```js
|
|
91
|
+
fetchSuggestions(term: string, signal?: AbortSignal): Promise<{ label: string; value: string }[]>;
|
|
92
|
+
fetchTitle(id: string, signal?: AbortSignal): Promise<string>;
|
|
93
|
+
getPreviewUrl(id: string): string;
|
|
94
|
+
```
|
|
88
95
|
- **TableBubbleMenuExtension**: Bubble Menu for table editing support.
|
|
89
96
|
|
|
90
97
|
---
|
|
@@ -168,7 +175,7 @@ imageButton.imageUpload = uploadInlineImage;
|
|
|
168
175
|
<tiptob-image-button></tiptob-image-button>
|
|
169
176
|
```
|
|
170
177
|
|
|
171
|
-
> **Note:** For components like `<tiptob-image-button>`, you must provide
|
|
178
|
+
> **Note:** For components like `<tiptob-image-button>` and `<tiptob-internal-link-button>`, you must provide their callback properties before users interact with them.
|
|
172
179
|
|
|
173
180
|
---
|
|
174
181
|
|
package/dist/extensions.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ImageExtension from "./plugins/Image/ImageExtension";
|
|
2
|
+
import InternalLinkExtension from "./plugins/InternalLink/InternalLinkExtension";
|
|
2
3
|
import KnowledgeExtension from "./plugins/KnowledgeMark/KnowledgeMarkExtension";
|
|
3
4
|
import { getBubbleMenuExtension as TableBubbleMenuExtension } from "./plugins/Table/TableExtension";
|
|
4
5
|
import { SelectionDecoration } from "./plugins/Selection/SelectionPlugin";
|
|
@@ -12,4 +13,4 @@ interface CustomHTMLElement extends HTMLElement {
|
|
|
12
13
|
editor: Editor;
|
|
13
14
|
imageUpload: (file: File) => Promise<string>;
|
|
14
15
|
}
|
|
15
|
-
export { ImageExtension, KnowledgeExtension, SelectionDecoration, TableBubbleMenuExtension, ExtendedHighlight, ExtendedColor, TokenExtension, FontSizeExtension, SignatureExtension, type CustomHTMLElement, };
|
|
16
|
+
export { ImageExtension, InternalLinkExtension, KnowledgeExtension, SelectionDecoration, TableBubbleMenuExtension, ExtendedHighlight, ExtendedColor, TokenExtension, FontSizeExtension, SignatureExtension, type CustomHTMLElement, };
|