TravelersHub Logo

This is for testing purpuse heading

This structure is flexible and compatible with all Tiptap / ProseMirror node types — you can safely use it for rich text fields from Storyblok, Sanity, or a Tiptap editor.

Explanation:

  • TiptapDoc is the root object (always { type: 'doc', content: [...] }).

  • TiptapNode can represent any node type (e.g. heading, paragraph, bullet_list, list_item, text, etc.).

  • marks handles inline styles like bold, italic, underline, etc.

  • attrs holds node attributes (like heading level, alignment, etc.).

This structure is flexible and compatible with all Tiptap / ProseMirror node types — you can safely use it for rich text fields from Storyblok, Sanity, or a Tiptap editor.

https://milanzivanov.com

Would you like me to show a stricter version that includes specific node types (e.g. HeadingNode, ParagraphNode, etc.) for better type safety in editors?