tiptap

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageResolver

type ImageResolver func(src string) []ImageVariant

ImageResolver maps an image src to its sized variants for rendering.

type ImageVariant

type ImageVariant struct {
	URL   string
	Width int
	// Height is the rendition height in pixels. Zero when unknown; the
	// renderer omits width/height attributes instead of guessing.
	Height int
}

ImageVariant is one sized rendition of an image for rendering.

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer converts TipTap JSON documents to HTML.

func NewRenderer

func NewRenderer(resolver ImageResolver) Renderer

NewRenderer builds a Renderer resolving images through resolver.

func (Renderer) Render

func (r Renderer) Render(tiptapJSON string) (string, error)

Render converts a TipTap JSON document to HTML, resolving images through the configured ImageResolver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL