tessl install tessl/npm-tiptap--extension-typography@3.4.0Typography extension for Tiptap that automatically converts common text input patterns into proper typographic characters.
Agent Success
Agent success rate when using this tile
73%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.86x
Baseline
Agent success rate without this tile
85%
Build a link management utility for a rich text editor that allows users to insert, update, and query hyperlinks with proper URL and attribute handling.
The implementation should create a wrapper around the editor's link management capabilities that provides a clean API for common link operations.
@generates
import { Editor } from '@tiptap/core';
/**
* Link management utility for rich text editors
*/
export class LinkManager {
/**
* Creates a new LinkManager instance
* @param editor - The editor instance to manage links for
*/
constructor(editor: Editor);
/**
* Inserts or updates a link at the current selection
* @param url - The URL for the link
* @param options - Optional link attributes
* @returns true if successful, false otherwise
*/
setLink(url: string, options?: { target?: string; rel?: string }): boolean;
/**
* Removes the link at the current selection while preserving text
* @returns true if successful, false otherwise
*/
removeLink(): boolean;
/**
* Checks if the current selection contains an active link
* @returns true if a link is active, false otherwise
*/
hasActiveLink(): boolean;
/**
* Gets the attributes of the link at the current selection
* @returns Object containing link attributes (href, target, rel) or null
*/
getLinkAttributes(): { href: string; target?: string; rel?: string } | null;
/**
* Updates specific attributes of an existing link
* @param attributes - Attributes to update
* @returns true if successful, false otherwise
*/
updateLinkAttributes(attributes: { href?: string; target?: string; rel?: string }): boolean;
}Provides the core editor framework and extension system.
Provides link node type and link-specific commands for creating and managing hyperlinks in the editor.
Provides basic editor functionality including document structure, paragraphs, and text formatting.