Reusable Symfony bundle with a compact Tiptap-based editor for classic Symfony forms and optional EasyAdmin integration.
It ships with:
BeSmartAndPro\TiptapEditorBundle\Form\Type\TiptapTypeBeSmartAndPro\TiptapEditorBundle\EasyAdmin\Field\TiptapFieldbesmartand-pro--tiptap-editor^8.3^7.4symfony/stimulus-bundle@tiptap/core@tiptap/starter-kit@tiptap/extension-image@tiptap/extension-link@tiptap/extension-placeholder@tiptap/extension-strike@tiptap/extension-underlinebootstrap-iconscomposer require besmartand-pro/tiptap-editor
php bin/console besmartand-pro:tiptap-editor:install
Then refresh frontend dependencies with your package manager:
pnpm install
or:
npm install
or:
yarn install
php bin/console besmartand-pro:tiptap-editor:install is the "make it work in a real app" step.
It will:
symfony/stimulus-bundle is installedpackage.jsonbootstrap-icons dependencieswebpack.config.js or vite.config.*assets/controllers/besmartand_pro/tiptap_editor_controller.tsassets/styles/besmartand_pro_tiptap_editor.scssconfig/packages/besmartand_pro_tiptap_editor.yamlconfig/routes/besmartand_pro_tiptap_editor.yamlThe generated frontend files are copied into the host app instead of importing TS or SCSS through vendor/, which keeps both Vite and Encore builds stable.
If your project layout is unusual, the copied asset files are still enough to wire things manually.
This bundle is ready for a Symfony Flex recipe, but Flex should be treated as the first half of the setup, not the whole installer.
Recommended approach:
The included flex-recipe/ directory is a starter recipe template for publishing to your own Flex recipes repository or to symfony/recipes-contrib.
The install command will try to add:
import './styles/besmartand_pro_tiptap_editor.scss';
to a likely entry file such as assets/admin.ts or assets/app.ts.
Your Stimulus bootstrap should keep scanning assets/controllers.
The bundle stylesheet imports Bootstrap Icons using:
@import "bootstrap-icons/font/bootstrap-icons.css";
This works with Vite and with current Encore/Webpack setups. Legacy ~bootstrap-icons/... imports can still exist in host applications if their loader configuration supports them, but the bundle itself uses the bundler-neutral form so it can build cleanly in both environments.
The install command will try to add the same stylesheet import to a likely Vite entry such as assets/main.ts or assets/app.ts.
Your Stimulus bootstrap should still expose controllers from assets/controllers.
If you installed an older bundle version that generated vendor/... bridge imports, rerun:
php bin/console besmartand-pro:tiptap-editor:install
The installer will replace those legacy bridge files with local copied assets that Vite can build reliably.
Uploads are optional.
If upload config is missing or disabled:
Example with Oneup Flysystem:
besmartand_pro_tiptap_editor:
default_placeholder: 'Wpisz treść...'
upload:
enabled: true
filesystem_service: 'oneup_flysystem.images_filesystem'
public_url_prefix: '/cdn/images'
security_attribute: 'ROLE_ADMIN'
max_file_size: 8388608
The configured service only needs to expose writeStream(), so any Flysystem-compatible filesystem service is enough.
use BeSmartAndPro\TiptapEditorBundle\Form\Type\TiptapType;
$builder->add('content', TiptapType::class, [
'tiptap_placeholder' => 'Wpisz treść...',
]);
use BeSmartAndPro\TiptapEditorBundle\EasyAdmin\Field\TiptapField;
yield TiptapField::new('content', 'Treść')
->setPlaceholder('Wpisz treść...');
How can I help you explore Laravel packages today?