nowo-tech / tiptap-editor-bundle
Symfony form type for rich text using Tiptap (HTML in textarea). Vite-built widget, Docker makefile workflow.
Package info
github.com/nowo-tech/TiptapEditorBundle
Type:symfony-bundle
pkg:composer/nowo-tech/tiptap-editor-bundle
Requires
- php: >=8.2 <8.6
- symfony/config: ^6.4 || ^7.0 || ^8.0
- symfony/dependency-injection: ^6.4 || ^7.0 || ^8.0
- symfony/form: ^6.4 || ^7.0 || ^8.0
- symfony/framework-bundle: ^6.4 || ^7.0 || ^8.0
- symfony/http-foundation: ^6.4 || ^7.0 || ^8.0
- symfony/http-kernel: ^6.4 || ^7.0 || ^8.0
- symfony/routing: ^6.4 || ^7.0 || ^8.0
- symfony/twig-bundle: ^6.4 || ^7.0 || ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-symfony: ^2.0
- phpunit/phpunit: ^11.0
- rector/rector: ^2.0
- symfony/yaml: ^6.4 || ^7.0 || ^8.0
README
Found this useful? Install from Packagist · Star the repo on GitHub.
Symfony form type for rich text using Tiptap (ProseMirror). Stores HTML in the underlying textarea — comparable to embedding CKEditor-style WYSIWYG fields. Assets are built with Vite (IIFE bundle in Resources/public/).
FrankenPHP worker mode: Supported for production-style demo runs (worker-enabled Caddyfile). Development demos use classic php_server without worker so PHP/Twig changes apply on refresh — see docs/DEMO-FRANKENPHP.md.
Features
TiptapEditorTypeextendingTextareaType— value is HTML string.- Optional formatting toolbar (bold, italic, bullet/ordered lists, undo/redo).
- Twig themes aligned with common Symfony layouts (Bootstrap 3–5, Foundation, Tailwind 2, table layout).
nowo_tiptap_editor_asset_path()Twig helper forassets:installpaths (bundles/nowotiptapeditor/).- pnpm + Vite frontend; Vitest coverage on shared logger utilities.
- Dockerfile + Makefile workflow matching other Nowo bundles.
- Demos: Symfony 7 & 8 under
demo/(FrankenPHP).
Quick start
composer require nowo-tech/tiptap-editor-bundle:^1.0 php bin/console assets:install public
In Twig layout:
<script src="{{ asset(nowo_tiptap_editor_asset_path('tiptap-editor.js')) }}"></script>
use Nowo\TiptapEditorBundle\Form\TiptapEditorType; $builder->add('article', TiptapEditorType::class, ['label' => 'Article']);
Documentation
Additional documentation
Development
Requirements: Docker (recommended), or PHP 8.2+ with Composer + pnpm locally.
make up # composer + pnpm install in container make assets # vite build → src/Resources/public/tiptap-editor.js make test # PHPUnit make test-ts # Vitest + coverage (logger) make qa # cs-check + phpunit
Demos:
make -C demo up-symfony8
# http://localhost:8011
Tests and coverage
| Layer | Target / notes |
|---|---|
| PHP | 100% line coverage on bundle src/ (PHPUnit); confirm with composer test-coverage or make test-coverage. |
| TypeScript | Vitest thresholds on shared utilities (see vitest.config.ts); confirm with pnpm run test:coverage or make test-ts. |
CI runs PHPUnit (matrix), PHPStan, PHP-CS-Fixer, and Vitest coverage on pushes and pull requests.
License
MIT — see LICENSE.