@samhammer/tiptob
Advanced tools
| import { Mark } from "@tiptap/core"; | ||
| declare module "@tiptap/core" { | ||
| interface Commands<ReturnType> { | ||
| internalLink: { | ||
| setInternalLink: (id: string, text?: string) => ReturnType; | ||
| unsetInternalLink: () => ReturnType; | ||
| }; | ||
| } | ||
| } | ||
| export interface InternalLinkAttrs { | ||
| internalLinkId: string | null; | ||
| } | ||
| export default function getInternalLinkExtension(): Mark; |
| import ImageExtension from "./plugins/Image/ImageExtension"; | ||
| import InternalLinkExtension from "./plugins/InternalLink/InternalLinkExtension"; | ||
| import KnowledgeExtension from "./plugins/KnowledgeMark/KnowledgeMarkExtension"; | ||
@@ -15,2 +16,2 @@ import { getBubbleMenuExtension as TableBubbleMenuExtension } from "./plugins/Table/TableExtension"; | ||
| } | ||
| export { ImageExtension, KnowledgeExtension, SelectionDecoration, TableBubbleMenuExtension, ExtendedHighlight, ExtendedColor, TokenExtension, FontSizeExtension, SignatureExtension, type CustomHTMLElement, }; | ||
| export { ImageExtension, InternalLinkExtension, KnowledgeExtension, SelectionDecoration, TableBubbleMenuExtension, ExtendedHighlight, ExtendedColor, TokenExtension, FontSizeExtension, SignatureExtension, type CustomHTMLElement, }; |
+1
-1
| { | ||
| "name": "@samhammer/tiptob", | ||
| "version": "2.3.38", | ||
| "version": "2.3.40", | ||
| "description": "TipTap ToolBox", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+9
-2
@@ -51,3 +51,3 @@ # @samhammer/TipToB | ||
| ```js | ||
| import { ImageExtension, KnowledgeExtension, SelectionDecoration, TableBubbleMenuExtension } from '@samhammer/tiptob/extensions'; | ||
| import { ImageExtension, InternalLinkExtension, KnowledgeExtension, SelectionDecoration, TableBubbleMenuExtension } from '@samhammer/tiptob/extensions'; | ||
| ``` | ||
@@ -77,2 +77,3 @@ | ||
| | `<tiptob-hyperlink-button>` | `@tiptap/extension-link (Link)` | | ||
| | `<tiptob-internal-link-button>` | `InternalLinkExtension` (from TipToB), plus `fetchSuggestions`, `fetchTitle`, and `getPreviewUrl` callback properties | | ||
| | `<tiptob-table-button>` | `@tiptap/extension-table (Table, TableCell, TableHeader, TableRow)`| | ||
@@ -90,2 +91,8 @@ | `<tiptob-table-bubble-menu>`| `TableBubbleMenuExtension` (from TipToB), `@tiptap/extension-table (Table, TableCell, TableHeader, TableRow)` | | ||
| ``` | ||
| - **InternalLinkExtension**: Add support for `<internallink internallinkid="...">` marks. The `<tiptob-internal-link-button>` component requires these callback properties: | ||
| ```js | ||
| fetchSuggestions(term: string, signal?: AbortSignal): Promise<{ label: string; value: string }[]>; | ||
| fetchTitle(id: string, signal?: AbortSignal): Promise<string>; | ||
| getPreviewUrl(id: string): string; | ||
| ``` | ||
| - **TableBubbleMenuExtension**: Bubble Menu for table editing support. | ||
@@ -174,3 +181,3 @@ | ||
| > **Note:** For components like `<tiptob-image-button>`, you must provide an `imageUpload` function that returns a Promise resolving to the image URL. | ||
| > **Note:** For components like `<tiptob-image-button>` and `<tiptob-internal-link-button>`, you must provide their callback properties before users interact with them. | ||
@@ -177,0 +184,0 @@ --- |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
2624489
1.49%21
5%16521
2.13%200
3.63%17
6.25%