shamimsofte / laravel-universal-editor
Enterprise Laravel integration package for Universal Rich Text Editor
Package info
github.com/shamimSoftE/laravel-universal-editor
pkg:composer/shamimsofte/laravel-universal-editor
1.0.0
2026-10-09 13:31 UTC
Requires
- php: ^8.1|^8.2|^8.3
- illuminate/support: ^10.0|^11.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
An enterprise-grade, secure, and full-featured backend integration package for Universal Rich Text Editor in Laravel.
โจ Features
- ๐ก๏ธ Enterprise Security (XSS Sanitizer): Robust HTML sanitization preventing XSS attacks.
- ๐๏ธ Document & Version Management: Built-in models and migrations for document history, drafts, and version rollback.
- ๐ฌ Collaborative Comments & Document Locking: Support for user comments and editing locks to prevent overwrite conflicts.
- ๐ค AI Assistant Backend Integration: Dedicated controllers and endpoints for AI-assisted writing tools.
- ๐ Auto-Discovery: Compatible with Laravel 10, 11, 12, and 13 (PHP 8.1 - 8.4+).
๐ฆ Installation
Install the package via Composer:
composer require shamimsofte/laravel-universal-editor
โ๏ธ Configuration & Publishing
Publish the configuration file:
php artisan vendor:publish --tag=editor-config
Publish the database migrations:
php artisan vendor:publish --tag=editor-migrations php artisan migrate
This will publish:
config/editor.php: Customizable limits, sanitize rules, AI configurations, and upload paths.- Migrations for documents, revisions, comments, and editing locks.
๐ ๏ธ Usage
1. Content Sanitization (XSS Safe)
use UniversalEditor\Laravel\Facades\Editor; // Sanitize user-submitted HTML $cleanHtml = Editor::sanitize($request->input('content'));
2. Available API Endpoints
The package registers the following routes automatically under /api/editor/:
GET|POST /api/editor/documentsโ Manage documents and draftsGET|POST /api/editor/versionsโ Document version history and restorePOST /api/editor/commentsโ Inline comment threadsPOST /api/editor/lockโ Real-time editing lock acquisitionPOST /api/editor/aiโ AI writing assistance prompts
๐งช Testing
Run test suite:
php tests/FullTestSuiteTest.php
๐ License
The MIT License (MIT). Please see License File for more information.