dudelisius / livewire-tiptap
Easily integrate the Tiptap editor into your livewire projects
                                    Fund package maintenance!
                                                                            
                                                                                                                                        :vendor_name
                                                                                    
                                                                
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 4
pkg:composer/dudelisius/livewire-tiptap
Requires
- php: ^8.3
 - illuminate/contracts: ^10.0||^11.0||^12.0
 - livewire/livewire: ^3.6
 - secondnetwork/blade-tabler-icons: ^3.34
 - spatie/laravel-package-tools: ^1.16
 
Requires (Dev)
- larastan/larastan: ^2.0 || ^3.5
 - laravel/pint: ^1.14
 - nunomaduro/collision: ^8.1.1||^7.10.0
 - orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
 - pestphp/pest: ^2.8 || ^3.0
 - pestphp/pest-plugin-arch: ^2.0 || ^3.0
 - pestphp/pest-plugin-laravel: ^2.0 || ^3.0
 - pestphp/pest-plugin-type-coverage: ^2.0 || ^3.5
 - phpstan/extension-installer: ^1.3||^2.0
 - phpstan/phpstan-deprecation-rules: ^1.1||^2.0
 - phpstan/phpstan-phpunit: ^1.3||^2.0
 - vimeo/psalm: ^6.12
 
This package is auto-updated.
Last update: 2025-10-07 14:36:13 UTC
README
Easily integrate the Tiptap rich-text editor into your Laravel Livewire projects, with full customization, dropdowns, and translation support.
📋 Prerequisites
Livewire Tiptap requires the following before installing:
- PHP ≥ 8.3
 - Laravel ≥ 11.x
 - Livewire ≥ 3.6
 
🚀 Installation
composer require dudelisius/livewire-tiptap:"0.1.0-alpha.3"
Optional; publish the assets, views, and config:
php artisan vendor:publish --tag=livewire-tiptap-config php artisan vendor:publish --tag=livewire-tiptap-views php artisan vendor:publish --tag=livewire-tiptap-assets
⚙️ Configuration
All settings live in config/livewire-tiptap.php. The defaults are opinionated but sensible. You can override:
toolbar: list of tokens, separators (|), spacers (~), or dropdown groups ([...]).use_default_classes: turn the built-in Tailwind classes on/off.classes: define your own class names or target elements via fallback keys.icons: map tokens to Blade component aliases (Tabler, Heroicons, or your own SVG).buttons: configure per-button icon, label, etc.extensions: pass through Tiptap extension options (e.g. Link). See for example the Tiptap Link docs.
🎨 Usage
Include the styles & scripts in your layout:
@livewireTiptapStyles @livewireStyles <livewire-tiptap:editor wire:model="content" /> @livewireScripts @livewireTiptapScripts
🛠 The Toolbar
The toolbar lets users style content. You can configure it in several ways:
Simple Buttons
Just add the token for each extension:
'toolbar' => 'bold italic underline strike'
Separator
Group buttons with a vertical bar:
'toolbar' => 'bold italic | underline strike'
Spacer
Push later buttons to the right:
'toolbar' => 'bold italic ~ undo redo'
Dropdown Groups
Group options in a dropdown by wrapping tokens in [...].
The dropdown shows the first icon by default, and updates to reflect the active formatting.
'toolbar' => '[paragraph heading-1 heading-2 heading-3] | bold italic'
Per-Component Override
Override the toolbar when rendering:
<livewire-tiptap:editor wire:model="content" toolbar="bold italic | link unlink | undo redo" />
🎨 Styling
All default classes use Tailwind and live in the config under classes.
If you prefer your own CSS, either customize each key or disable defaults:
'use_default_classes' => false,
🔧 Advanced
Extension Overrides
Pass extension options at render time:
<livewire-tiptap:editor wire:model="content" :extensions="[ 'link' => ['autolink' => false], ]" />
Or edit them in your published config:
'extensions' => [ 'link' => [ 'autolink' => false, // … ], ],
Supported Extensions
- paragraph
 - heading-1
 - heading-2
 - heading-3
 - heading-4
 - heading-5
 - heading-6
 - bold
 - italic
 - underline
 - strike
 - blockquotes
 - code
 - highlight
 - hardBreak
 - horizontalRule
 - bulletList
 - orderedList
 - subscript
 - superscript
 - emojis
 - link
 - unlink
 - undo
 - red
 
More coming soon!
🌐 Translations
This package ships with English, Dutch, French, and Spanish translations. To add your own, submit a PR or drop a file into:
resources/lang/livewire-tiptap/{locale}.php
🤝 Contributing & Testing
PRs are very welcome! Please run the full QA suite before submitting:
composer qa
📈 Roadmap
- Additional Tiptap extensions (blockquote, image, tables, etc.)
 - Image uploads & drag-drop support
 - Autosave & Ctrl+S handling
 - Bubble menus & tooltips
 - Improved documentation & examples
 - First stable (1.0) release