tiptap

package
v0.0.0-...-b3bc5c9 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tiptap implements the TipTap WYSIWYG editor.Provider for the CMS engine.

TipTap is a MIT-licensed ProseMirror-based editor for the JS side. On the Go side, we serialize block trees as the canonical JSON shape that ProseMirror documents use:

{
  "type": "doc",
  "content": [
    { "type": "paragraph", "content": [ {"type": "text", "text": "Hi"} ] }
  ]
}

This implementation handles the common subset: doc / paragraph / text / heading / bullet_list / ordered_list / list_item / blockquote. Marks supported on text: bold, italic, code, link.

Per gocodealone-multisite SPEC.md V10, V14: deterministic server-side render; ⊥ client-side JS fetch unless explicit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider implements editor.Provider for TipTap.

func New

func New() *Provider

New returns a zero-config TipTap provider.

func (*Provider) EmptyBlocks

func (p *Provider) EmptyBlocks() json.RawMessage

func (*Provider) FrontendBundleID

func (p *Provider) FrontendBundleID() string

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) Render

func (p *Provider) Render(blocks json.RawMessage) (string, bool)

Render walks the document tree and emits HTML.

func (*Provider) Validate

func (p *Provider) Validate(blocks json.RawMessage) error

Validate returns nil iff blocks parses to a doc node with a known top type. Deeper validation (child legality) is intentionally permissive; Render gracefully handles unknown nodes by skipping them.

Jump to

Keyboard shortcuts

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