Headless rich text editor built on ProseMirror with extensible architecture for building custom editors
94
A utility that inspects the current formatting state of a Tiptap editor and returns detailed information about active marks and nodes at the current selection.
@generates
import { Editor } from '@tiptap/core';
/**
* Checks if a specific mark is active at the current selection
* @param editor - The Tiptap editor instance
* @param markName - The name of the mark to check (e.g., 'bold', 'italic', 'link')
* @returns true if the mark is active, false otherwise
*/
export function isMarkActive(editor: Editor, markName: string): boolean;
/**
* Checks if a specific node type is active at the current selection
* @param editor - The Tiptap editor instance
* @param nodeName - The name of the node to check (e.g., 'heading', 'paragraph', 'bulletList')
* @returns true if the node is active, false otherwise
*/
export function isNodeActive(editor: Editor, nodeName: string): boolean;
/**
* Gets the attributes of a specific mark at the current selection
* @param editor - The Tiptap editor instance
* @param markName - The name of the mark to get attributes for
* @returns an object containing the mark's attributes, or empty object if not active
*/
export function getMarkAttributes(editor: Editor, markName: string): Record<string, any>;
/**
* Gets the attributes of a specific node at the current selection
* @param editor - The Tiptap editor instance
* @param nodeName - The name of the node to get attributes for
* @returns an object containing the node's attributes, or empty object if not active
*/
export function getNodeAttributes(editor: Editor, nodeName: string): Record<string, any>;Provides the core editor functionality and state inspection APIs
@satisfied-by
Provides common extensions including Bold, Heading, BulletList, and Link marks/nodes for testing
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-tiptap--coredocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10