pdik/filamenteditorjs
最新稳定版本:v1.0.0-beta
Composer 安装命令:
composer require pdik/filamenteditorjs
包简介
Filament EditorJs
README 文档
README
A FilamentPHP custom form field that brings the power of Editor.js into your admin panel. This field gives you a clean, structured, block-style content editor that stores data as JSON — perfect for building rich, flexible, and API-friendly content.
Ideal for use cases like blog posts, lesson content, FAQs, or any interface where structured content matters.
✨ Features
- ⚡ Block-style editing with Editor.js
- 🔌 Drop-in Filament form component
- 🧱 Configurable tools (header, paragraph, image, list, and more)
- 💾 Stores content as JSON
- 🎨 Built for the TALL stack (Livewire + Alpine.js)
- 🔧 Publishable config and views for customization
📦 Installation
Install via composer:
composer require pdik/filamenteditorjs
Optional:
php artisan vendor:publish --tag="filamenteditorjs-config" php artisan vendor:publish --tag="filamenteditorjs-views"
🛠 Usage
Inside a Filament form:
use Pdik\FilamentEditorJs\Forms\Components\EditorJs; \Pdik\FilamentEditorJs\FilamentEditorJs::make('content') ->label('Content') ->tools(['header', 'paragraph', 'list', 'image']) // Optional: configure active tools ->required(),
The field will save content as Editor.js-compatible JSON. You can render it on the frontend with the official Editor.js renderer or any custom solution. Soon there will be a Entry Field to Render the content
🧪 Testing
composer test
🗺 Coming Soon
- 🧾 EditorJS Entries Viewer – Easily preview and manage stored Editor.js content inside your Filament panel
- 🧩 Tool plugin registration via config
- 🛡️ Validation support for Editor.js blocks
- 📄 Blade component renderer for frontend use
📜 Changelog
Please see CHANGELOG for more information on what has changed recently.
🤝 Contributing
Please see CONTRIBUTING for details.
🔐 Security
Please review our security policy for guidelines on reporting vulnerabilities.
👥 Credits
⚖️ License
The MIT License (MIT). See License File for more information.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-31