tiptap

package
v0.0.0-...-e64b6cb Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func New

func New() *Builder

func (*Builder) AutoComponentFunc

func (b *Builder) AutoComponentFunc(field *presets.FieldContext, ctx *web.EventContext) (r h.HTMLComponent)

func (*Builder) Build

func (b *Builder) Build(mode presets.FieldMode) *Builder

func (*Builder) ComponentFunc

func (b *Builder) ComponentFunc(mode presets.FieldMode) presets.FieldComponentFunc

func (*Builder) DetailComponentFunc

func (b *Builder) DetailComponentFunc(field *presets.FieldContext, ctx *web.EventContext) (r h.HTMLComponent)

func (*Builder) Fields

func (b *Builder) Fields(fieldNames ...string) *Builder

func (*Builder) MaxEditHeight

func (b *Builder) MaxEditHeight(height int) *Builder

func (*Builder) MaxViewHeight

func (b *Builder) MaxViewHeight(height int) *Builder

func (*Builder) Model

func (b *Builder) Model(mb *presets.ModelBuilder) *Builder

func (*Builder) SetFieldsComponentFunc

func (b *Builder) SetFieldsComponentFunc(fb *presets.FieldsBuilder, mode presets.FieldMode)

func (*Builder) Store

func (b *Builder) Store(saver Storer) *Builder

func (*Builder) StoreImages

func (b *Builder) StoreImages(ctx context.Context, value []byte) (r *StoreImagesResult, err error)

func (*Builder) TableComponentFunc

func (b *Builder) TableComponentFunc(*presets.FieldContext, *web.EventContext) (r h.HTMLComponent)

func (*Builder) Updator

func (b *Builder) Updator(f func(t *Builder, do presets.DataOperator) presets.DataOperator) *Builder

func (*Builder) WithValidateScript

func (b *Builder) WithValidateScript(f presets.FieldValidatorFunc) *Builder

func (*Builder) WrapComp

func (b *Builder) WrapComp(f func(ctx *presets.FieldContext, comp h.HTMLComponent) h.HTMLComponent) *Builder

func (*Builder) WrapEditor

func (b *Builder) WrapEditor(f func(ctx *presets.FieldContext, comp *vx.VXTipTapEditorBuilder)) *Builder

func (*Builder) WrapReadonly

func (b *Builder) WrapReadonly(f func(ctx *presets.FieldContext, value string) (string, error)) *Builder

func (*Builder) WrapSaver

func (b *Builder) WrapSaver(wraper func(saver Storer) Storer) *Builder

type StoreFunc

type StoreFunc func(ctx context.Context, format string, data []byte, alt string) (url string, err error)

func (StoreFunc) Store

func (f StoreFunc) Store(ctx context.Context, format string, data []byte, alt string) (string, error)

type StoreImagesEntry

type StoreImagesEntry struct {
	Format string
	Url    string
	Data   []byte
}

type StoreImagesResult

type StoreImagesResult struct {
	NewValue []byte
	Images   []*StoreImagesEntry
}

func (*StoreImagesResult) Changed

func (r *StoreImagesResult) Changed() bool

type Storer

type Storer interface {
	Store(ctx context.Context, format string, data []byte, alt string) (url string, err error)
}

func MediaLibraryStorer

func MediaLibraryStorer(b *media.Builder, dbKey any) Storer

Jump to

Keyboard shortcuts

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