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

Laravel Jodit Laravel Package

nasirkhan/laravel-jodit

Laravel Jodit integrates the Jodit WYSIWYG editor into Laravel via a reusable Blade component that works in Blade and Livewire. Includes a server-side file browser/uploader connector, CDN-loaded assets, and publishable config for toolbar, disks, paths, and middleware.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Pros:
    • Lightweight & Modular: Leverages Jodit (a mature, standalone WYSIWYG editor) via a thin Laravel wrapper, minimizing bloat.
    • Multi-Component Support: Works seamlessly with Blade templates, Blade view components, and Livewire, aligning with modern Laravel architectures.
    • Config-Driven: Centralized configuration for CDN assets, routes, storage, and editor behavior reduces hardcoding.
    • File Management: Built-in file browser/uploader with configurable storage (disk/path) and validation (mime types, size limits).
    • Livewire Integration: Automatic wire:ignore handling and debounced sync for reactive forms.
  • Cons:
    • Tight Coupling to Jodit: Customization beyond Jodit’s native features requires modifying the underlying library or extending the package.
    • Intervention/Image Dependency: Image resizing/cropping requires intervention/image-laravel, adding a dependency for advanced use cases.

Integration Feasibility

  • Blade/Livewire Compatibility:
    • Blade: Drop-in component (<x-jodit::editor />) with minimal setup (asset stacks).
    • Livewire: Native support via wire-model with debounced updates (300ms default).
    • Inertia/Vue/React: Not natively supported; would require custom JS integration (e.g., Alpine.js or direct Jodit initialization).
  • Storage Backend:
    • Defaults to Laravel’s filesystem (public disk), but can integrate with S3, custom connectors, or third-party services (e.g., Cloudinary) via the connector-url prop.
  • Middleware/Routing:
    • Auto-registers a /jodit route for the file browser; can be overridden for admin-only access or custom prefixes.

Technical Risk

  • Low-Medium:
    • Dependency Risk: Jodit (via unpkg CDN) is a third-party library with no guarantees of long-term maintenance. However, it’s actively developed (v4.1.16 as of 2026).
    • Livewire Sync: Debounced updates may cause slight latency in real-time editing; test with high-frequency user input.
    • Storage Quotas: File uploads are constrained by Laravel’s storage limits (configurable via max_file_size and allowed_mimes).
    • CORS/CSRF: File browser connector is protected by Laravel’s CSRF middleware by default; ensure CORS is configured if used with APIs.
  • Mitigation:
    • Fallback: Cache Jodit assets locally (e.g., via Laravel Mix) to avoid CDN dependency.
    • Testing: Validate file uploads, Livewire sync, and edge cases (e.g., large HTML content) in staging.

Key Questions

  1. Editor Customization:
    • Does the team need beyond-Jodit features (e.g., custom plugins, non-standard toolbar buttons)? If so, assess whether the package’s buttons prop or Jodit’s native API suffices.
  2. Storage Scalability:
    • Will file uploads scale beyond Laravel’s default storage? If using S3, ensure the connector is configured to proxy requests.
  3. Livewire Performance:
    • For high-frequency editing (e.g., collaborative tools), test if the 300ms debounce is acceptable or if a custom sync interval is needed.
  4. Accessibility/Compliance:
    • Does the editor meet WCAG/ADA standards? Jodit claims accessibility, but validate with screen readers.
  5. Fallback for Legacy Browsers:
    • Jodit uses ES2021; test in target environments (e.g., IE11 may require polyfills or a fallback textarea).

Integration Approach

Stack Fit

  • Laravel 11/12/13: Native support with auto-discovered service provider.
  • Livewire: First-class integration with wire-model and wire:ignore handling.
  • Blade Components: Works with both plain Blade and View Components (e.g., Livewire components).
  • Asset Management:
    • Uses Laravel’s stacks (after-styles, after-scripts) for asset loading. Ensure these stacks exist in your layout.
    • CDN-based by default (unpkg); can be replaced with local builds via config/jodit.php.
  • Storage:
    • Defaults to Laravel’s filesystem (public disk). For cloud storage (S3, GCS), extend the JoditConnectorController or use a custom connector URL.

Migration Path

  1. Assessment Phase:
    • Audit existing rich-text implementations (e.g., CKEditor, TinyMCE, or custom solutions).
    • Identify gaps (e.g., missing file management, Livewire support).
  2. Pilot Integration:
    • Install in a non-production environment:
      composer require nasirkhan/laravel-jodit
      php artisan vendor:publish --tag=jodit-config
      
    • Test with a single form (e.g., blog post editor) in Blade and Livewire.
  3. Configuration:
    • Publish and customize config/jodit.php:
      • Adjust cdn_css/cdn_js for offline builds.
      • Configure disk/base_path for storage.
      • Set buttons for toolbar customization.
    • Register custom routes if needed (e.g., admin-only file browser).
  4. Incremental Rollout:
    • Replace legacy editors one component at a time.
    • For Livewire, ensure wire:ignore is handled (the package does this automatically).
  5. Validation:
    • Test file uploads, Livewire sync, and edge cases (e.g., pasting complex HTML).
    • Verify CSRF/middleware protection for the connector route.

Compatibility

Feature Compatibility Notes
Blade Templates ✅ Full support; drop-in component.
Livewire ✅ Native wire-model support with debounced sync.
Inertia/Vue/React ⚠️ Not natively supported; requires manual JS integration (e.g., Alpine.js).
File Uploads ✅ Built-in connector; supports custom storage via disk config.
Image Processing ✅ Requires intervention/image-laravel for resizing/cropping.
Custom Toolbars ✅ Highly configurable via buttons prop or preset profiles.
Localization ❌ Limited; relies on Jodit’s native localization (check Jodit docs for RTL/L10n).

Sequencing

  1. Phase 1: Blade Integration
    • Replace static <textarea> fields with <x-jodit::editor />.
    • Test in read-only mode first (disable file browser if not needed).
  2. Phase 2: Livewire Sync
    • Migrate Livewire components to use wire-model.
    • Monitor debounce behavior; adjust debounce prop if needed.
  3. Phase 3: File Management
    • Enable file browser and test uploads.
    • Configure storage (disk, base_path) and validate permissions.
  4. Phase 4: Advanced Features
    • Customize toolbars (buttons prop).
    • Extend storage backends (e.g., S3) via custom connector routes.
  5. Phase 5: Optimization
    • Replace CDN assets with local builds if needed.
    • Add caching for editor assets (e.g., via Laravel Mix).

Operational Impact

Maintenance

  • Pros:
    • Minimal Boilerplate: No custom JS/CSS required beyond the component.
    • Centralized Config: Editor behavior, storage, and routes are configurable in config/jodit.php.
    • Dependency Updates: Jodit updates can be managed via composer update nasirkhan/laravel-jodit.
  • Cons:
    • Jodit Maintenance: Relies on upstream Jodit library; monitor for breaking changes.
    • Storage Management: File uploads require monitoring of the configured disk (e.g., S3 quotas).
    • Livewire Sync: Debounced updates may require tuning for performance-critical apps.

Support

  • Troubleshooting:
    • Editor Not Loading: Verify asset stacks (after-styles, after-scripts) are included in the layout.
    • File Browser Issues: Check storage:link and disk permissions; validate connector-url route.
    • Livewire Sync Failures: Ensure wire:ignore is present (automatically handled by the package).
  • Documentation:
    • Strengths: Clear README with usage examples, config reference, and button presets.
    • Gaps: Limited troubleshooting guides; rely on Jodit’s official docs for deep issues.
  • Community:
    • Low-starred package (1 star); expect limited community support
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.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium