Search by

amjadiqbal / laravel-tiptap

amjadiqbal

Best-in-class Laravel integration for Tiptap with fluent editor configuration, secure content handling, uploads, and multi-framework frontend components.

v1.0.0 2026-09-11 18:00 UTC

This package is auto-updated.

Last update: 2026-09-12 15:08:55 UTC


README

A modern Laravel (11+) package for Tiptap with backend-driven editor configuration, secure upload handling, and Blade/Vue/React integrations.

Why this package

  • Fluent PHP builder mirroring core Tiptap editor options
  • Dynamic extension registry for built-in and custom extensions
  • Command/event/input-rule/paste-rule serialization for frontend execution
  • JSON-first content handling with parser, transformer, and sanitizer contracts
  • Secure upload endpoint with validation, CSRF, and rate limiting

Installation

composer require amjadiqbal/laravel-tiptap
php artisan vendor:publish --tag=tiptap-config

Quick Start

use AmjadIqbal\LaravelTiptap\Facades\Tiptap;

$config = Tiptap::make()
    ->extensions(['StarterKit', 'Bold', 'Italic', 'Link'])
    ->content(['type' => 'doc', 'content' => []])
    ->editable(true)
    ->autofocus('end')
    ->editorProps(['attributes' => ['class' => 'prose']])
    ->parseOptions(['preserveWhitespace' => true])
    ->toArray();
<x-tiptap-editor name="content" id="editor" :content="$post->content" />

Built-in extension definitions

  • StarterKit
  • Bold, Italic, Heading
  • Image, Link, CodeBlock
  • Table
  • BulletList, OrderedList, ListItem

Upload endpoint

POST /tiptap/upload

Response shape:

{
  "success": true,
  "url": "...",
  "path": "...",
  "name": "...",
  "mime": "...",
  "size": 1234
}

Security

  • Sanitization contract and default HTML sanitizer
  • Upload MIME and max-size validation
  • CSRF protections via web middleware
  • Named rate limiter for uploads (tiptap-uploads)

Diagnostics

php artisan tiptap:debug

Contributor test requirements

  • Package runtime support: PHP 8.2+
  • Local package test tooling (PHPUnit 11/12): PHP 8.2+

Documentation

CI/CD and versioning

  • CI workflow runs tests, Laravel Pint, and PHPStan on PHP 8.2 and 8.3
  • Release workflow triggers on semantic version tags (v*.*.*)

Support

Community

License

MIT

Author

Amjad Iqbalamjad.com.pk · hi@amjad.com.pk · GitHub