amjadiqbal / laravel-tiptap
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
Requires
- php: ^8.2
- illuminate/contracts: ^11.0|^12.0
- illuminate/http: ^11.0|^12.0
- illuminate/routing: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^9.0
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^11.3|^12.0.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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
webmiddleware - 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
- Installation Guide
- Usage Examples
- Extension Creation Guide
- API Reference
- Analysis of Existing Packages
- Changelog
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
- Contributing Guide
- Code of Conduct
- Buy Me a Coffee: https://www.buymeacoffee.com/amjadiqbal
- GitHub Sponsors: https://github.com/sponsors/amjadiqbal
License
MIT
Author
Amjad Iqbal — amjad.com.pk · hi@amjad.com.pk · GitHub