OverviewDocsPreviewsBuilder

API Reference & Types

Complete typescript props, types, and configurations available in Tiptide.

Tiptide is designed to be highly typed and fully compatible with React. Below are the key types, properties, and configurations.

TextEditorProps (Props for <TiptideEditor /> & <TiptideProvider />)

PropTypeDefaultDescription
contentTiptideContentTypenullInitial editor content (HTML string or JSONContent).
onChange(editor: Editor) => voidundefinedTriggered on every keystroke/editor change.
placeholderstring"Start writing..."Text shown when the editor canvas is empty.
hideBubbleMenuOnTouchbooleantrueHides the floating bubble menu on mobile touch pointer devices.
hideTooltipbooleanfalseDisable toolbar tooltips entirely.
onUpload(file: File) => Promise<string>undefinedAsync function returning URL to upload images locally or to CDN.
imagePlaceholderBlockReact.ComponentTypeundefinedCustom loader template when rendering dynamic image uploading state.
onMount(editor: Editor) => voidundefinedFired when the underlying Tiptap editor mounts.

Exported Types

  • TiptideContentType: string | JSONContent | null
  • TiptideEditorType: Direct alias of Tiptap's core Editor class.
  • TiptideJSONContentType: Direct alias of Tiptap's JSONContent type structure.

Example

tsx
import { 
  type TiptideEditorType, 
  type TiptideContentType 
} from 'tiptide';

// Example defining types in custom hooks or utility helpers
export function getWordCount(editor: TiptideEditorType): number {
  return editor.storage.characterCount?.words() || 0;
}