Weave Code
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

Filament Rich Editor Heroicons Laravel Package

oliwol/filament-rich-editor-heroicons

Filament v4/v5 plugin for RichEditor (TipTap) that adds a searchable Heroicons picker. Insert inline SVG icons (outline/solid/mini) into content with configurable size, alignment, and color, and render them via RichContentRenderer.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Filament v4/v5 Native: The package is purpose-built for Filament’s RichEditor (TipTap), leveraging its plugin system. This ensures tight integration with Filament’s existing architecture, reducing friction for adoption.
  • Modular Design: The plugin follows a modular approach, allowing it to be added/removed without disrupting other RichEditor functionality. This aligns well with Laravel’s dependency injection and Filament’s component-based architecture.
  • TipTap Extension: Built on TipTap’s node system, which is a robust, battle-tested rich-text editor framework. This ensures compatibility with Filament’s RichEditor and future-proofing against TipTap updates.

Integration Feasibility

  • Low-Coupling: The package requires minimal changes to existing RichEditor configurations—only the addition of a plugin and toolbar button. This reduces risk for teams with complex forms.
  • Server-Side Rendering: Supports RichContentRenderer for consistent icon rendering in Blade views, ensuring stored content remains functional outside the editor.
  • Data Persistence: Icons are stored as inline SVGs with metadata (e.g., data-icon, data-svg), which is a clean, self-contained approach that avoids custom database schemas or migrations.

Technical Risk

  • Dependency Stability: Relies on Filament v4/v5 and TipTap. While the package is actively maintained (last release: 2026-05-05), risks include:
    • Breaking changes in Filament/TipTap major versions (e.g., if TipTap’s node system evolves).
    • Mitigation: Monitor Filament/TipTap changelogs and test against pre-release versions.
  • SVG Sanitization: Inline SVGs introduce XSS risks if user-provided data is inserted. The package includes sanitization (v1.2.1), but teams must ensure their broader system (e.g., Blade templates) also sanitizes dynamic content.
  • Performance: Searchable Heroicon dropdowns could impact editor load times if not optimized. The package uses lazy-loading for SVGs, but large icon libraries (e.g., all 1,000+ Heroicons) might require pagination or debouncing.
  • Customization Limits: While configurable (sizes, styles, colors), advanced use cases (e.g., dynamic icon sets, custom SVG attributes) may require forking or extending the package.

Key Questions

  1. Filament Version Compatibility:
    • Is the project locked to Filament v4 or v5, or is v6+ support planned? If v6 is in the roadmap, assess whether this package will align with Filament’s future direction.
  2. Icon Library Scope:
    • Does the team need all Heroicons, or a subset (e.g., only "outline" or "solid")? This affects performance and UX (e.g., searchability).
  3. Accessibility Requirements:
    • Are ARIA labels mandatory for all icons, or optional? This impacts how the plugin’s accessibility features are configured.
  4. Editor Workflow:
    • Will users frequently edit icons post-insertion? If so, test the "click-to-edit" modal performance with large content blocks.
  5. Localization Needs:
    • Are translations for the picker modal required beyond the default 10 languages? The package supports publishing custom translations.
  6. CI/CD Impact:
    • Does the package introduce new assets (e.g., Heroicons SVGs) that require caching or build steps? Assess if the package’s assets are pre-bundled or dynamically loaded.

Integration Approach

Stack Fit

  • Laravel/PHP Ecosystem: Fully compatible with Laravel’s dependency management (Composer) and Filament’s plugin system. No additional tooling (e.g., Node.js) is required beyond Filament’s existing setup.
  • Frontend Stack: Uses Alpine.js and Tailwind CSS (via Filament), so it integrates seamlessly with projects using these libraries. If the project uses a custom frontend build system (e.g., Vite, Webpack), verify no conflicts arise with Filament’s asset pipelines.
  • Database: No schema changes required. Icons are stored as HTML/SVG within the RichEditor’s content field (e.g., longtext in MySQL).

Migration Path

  1. Assessment Phase:
    • Audit existing RichEditor usage in Filament forms to identify:
      • Current toolbar configurations.
      • Content fields where icons would add value (e.g., documentation, marketing pages).
    • Test the package in a staging environment with a sample form to validate:
      • Performance (modal load times, editor responsiveness).
      • Rendering consistency (Blade views, API responses).
  2. Pilot Integration:
    • Start with a single form component (e.g., a "Page Builder" or "Blog Post" form) to:
      • Train content creators on the new icon picker.
      • Gather feedback on UX (e.g., modal usability, icon discovery).
    • Gradually roll out to other forms based on feedback.
  3. Configuration Standardization:
    • Define default settings for the plugin (e.g., defaultSize('md'), styles(['outline', 'solid'])) in a config file or service provider to ensure consistency across forms.
    • Example:
      // config/filament-rich-editor-heroicons.php
      return [
          'default_size' => 'md',
          'allowed_styles' => ['outline', 'solid'],
          'enabled_forms' => [
              'pages.content',
              'posts.markdown',
          ],
      ];
      
  4. Toolbar Optimization:
    • Group the addHeroicon button logically in the toolbar (e.g., near "image" or "media" buttons) to reduce cognitive load for users.

Compatibility

  • Filament Plugins: Works alongside other Filament plugins (e.g., filament-spatie-media-library) without conflicts, as it operates within the RichEditor’s plugin system.
  • Custom RichEditor Extensions: If the project has custom TipTap extensions, verify no naming collisions occur with the package’s data-* attributes (e.g., data-icon, data-svg).
  • Legacy Content: Test rendering of existing RichEditor content to ensure backward compatibility. The package does not modify stored HTML unless icons are inserted.

Sequencing

  1. Prerequisites:
    • Ensure Filament v4/v5 is installed and RichEditor is already in use. If not, prioritize RichEditor adoption first.
    • Update dependencies:
      composer require oliwol/filament-rich-editor-heroicons
      
  2. Core Integration:
    • Add the plugin to RichEditor components:
      RichEditor::make('content')
          ->toolbarButtons([
              // ... existing buttons
              'addHeroicon',
          ])
          ->plugins([
              FilamentRichEditorHeroicons::make()
                  ->defaultSize('md')
                  ->styles(['outline', 'solid']),
          ]);
      
  3. Rendering Support:
    • Register the plugin with RichContentRenderer in Blade views or API responses:
      RichContentRenderer::make($model->content)
          ->plugins([
              FilamentRichEditorHeroicons::make(),
          ]);
      
  4. Localization:
    • Publish translations if needed:
      php artisan vendor:publish --tag="filament-rich-editor-heroicons-translations"
      
  5. Testing:
    • Write integration tests for:
      • Icon insertion/editing in the editor.
      • Rendering in Blade views and API responses.
      • Edge cases (e.g., malformed SVG data, missing attributes).

Operational Impact

Maintenance

  • Dependency Updates:
    • Monitor Filament and TipTap for breaking changes. The package’s changelog suggests it’s responsive to upstream updates (e.g., v1.0.0+ aligns with Filament v4/v5).
    • Set up dependency alerts for oliwol/filament-rich-editor-heroicons, filament/filament, and tipTap/vue-3.
  • Plugin Configuration:
    • Centralize plugin settings (e.g., sizes, styles) in a config file to simplify updates across forms.
  • SVG Maintenance:
    • Heroicons are fetched dynamically, but if custom icons are added, maintain a local registry of SVGs to avoid external dependencies.

Support

  • User Training:
    • Create documentation or a short video demonstrating:
      • How to insert/edit icons.
      • Accessibility best practices (e.g., when to use labels).
    • Train support teams to troubleshoot common issues (e.g., icons not rendering in Blade views).
  • Common Issues:
    • Icons not rendering: Verify RichContentRenderer is registered in Blade views.
    • Modal not opening: Check for JavaScript errors in browser console (e.g., Alpine.js conflicts).
    • Performance lag: Optimize by restricting icon styles/sizes or lazy-loading the modal.

Scaling

  • Performance at Scale:
    • Icon Library: If using all Heroicons, consider:
      • Paginating the dropdown (e.g., load icons in batches).
      • Pre-filtering icons by category (e.g., "communication," "solid").
    • Editor Load: Test with large content blocks (e.g., 100+ icons) to ensure the editor remains responsive.
    • Database: Ensure the RichEditor
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.
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon
itsemon245/lamet
baks-dev/dashboard
amoifr/pickle-panther-bundle
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle