Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tiptap Php Laravel Package

ueberdosis/tiptap-php

Convert Tiptap content between HTML and JSON in PHP. Set content, get documents, JSON, or HTML, sanitize and modify content, and extend it with custom nodes and marks. A PHP port of the Tiptap editor API.

View on GitHub
Deep Wiki
Context7

A PHP package to work with Tiptap content

Frequently asked questions about Tiptap Php
How do I install ueberdosis/tiptap-php in a Laravel app?
Install it with Composer by running composer require ueberdosis/tiptap-php. It is a native PHP package with no frontend dependency, so you can instantiate Tiptap\Editor directly in controllers, jobs, or services. For cleaner Laravel code, bind it as a singleton or wrap it in a small service provider.
Can I convert Tiptap JSON to HTML in Laravel with this package?
Yes. Pass a Tiptap/ProseMirror JSON string or PHP array to setContent() and call getHTML() to render HTML. This is useful for API responses, Blade views, or cached previews, but sanitize user-generated content before output.
How do I convert HTML from a Laravel request into Tiptap JSON?
Use setContent() with the submitted HTML and call getJSON() for a JSON string or getDocument() for a PHP array. Validate the incoming request first and sanitize the content if it comes from untrusted users. Store the resulting Tiptap document in a JSON column or as your application requires.
Does tiptap-php sanitize rich text to prevent XSS?
The package includes HTML sanitization aimed at XSS risks in user-generated content. You should still apply Laravel validation and a defense-in-depth output policy, especially for CMS or forum content. Test your specific extensions and allowed marks/nodes because sanitization depends on your schema.
Which PHP and Laravel versions does ueberdosis/tiptap-php support?
The package is native PHP and has dropped PHP 7.4 support, so use a modern PHP version supported by your Laravel release. It can fit Laravel 8+ projects where Composer's PHP constraints are satisfied. Always check the current composer.json or Packagist metadata for exact version requirements.
How can I extract plain text from Tiptap content for search or metadata?
The package supports plain text extraction, which is useful for search indexing, excerpts, and analytics. Parse and sanitize the Tiptap JSON first, then store the extracted plain_text alongside the JSON document. Cache the plain text if you generate it frequently for listings or search.
Can I add custom nodes, marks, or extensions with tiptap-php?
Yes, the package supports custom extensions and ProseMirror-like node and mark manipulation, so you can model custom blocks and nested structures. Keep in mind that schema adherence is not complete in every edge case, such as marks inside CodeBlock. Validate custom output against your frontend Tiptap schema and add tests for schema drift.
Do I need Node.js to use tiptap-php?
No. Core Tiptap JSON parsing, HTML conversion, sanitization, and plain text extraction run in PHP. Node.js is only needed if you choose the Shiki-based syntax highlighter; highlight.php is a PHP-native alternative for simpler code highlighting.
How should I store Tiptap JSON content in a Laravel database?
Store the Tiptap document in a JSON column and consider keeping separate content_json and plain_text fields for querying and search. PostgreSQL jsonb can be efficient for JSON queries, while MySQL JSON columns work for typical Laravel storage. Cache rendered HTML or extracted text with Laravel's cache to reduce repeated processing.
Is ueberdosis/tiptap-php production-ready and maintained?
It is an official Tiptap package with a test suite, but it has few active dependents, so evaluate it against your schema complexity and operational needs. Pin the Composer version, test HTML-to-JSON and JSON-to-HTML round trips, and monitor for breaking changes. For production, add validation, sanitization, caching, and coverage for any custom extensions you rely on.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin