mihail-himinec / tallstack-editorjs
适用于 Filament 管理面板的 EditorJS
v2.0.1
2024-03-14 04:31 UTC
Requires
- php: ^8.1
- filament/forms: ^3.0
- illuminate/contracts: ^8.0|^9.0|^10.0.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-09-14 05:52:02 UTC
README
预配置
文本和排版
- @editorjs/paragraph — 文本块基础工具
- @editorjs/header — 标题块
- @editorjs/quote — 引用工具
- @editorjs/delimiter — 分隔符工具
- @editorjs/warning — 警告工具,可用作编辑通知或呼吁
- editorjs-alert - 添加彩色警告信息的工具
列表
- @editorjs/nested-list — 多级列表
- @editorjs/checklist — 文本中的检查列表
媒体 & 嵌入
- @editorjs/attaches — 将文件附加到文章中
- @editorjs/embed — 处理粘贴模式并插入带有嵌入内容的 iframe
- @editorjs/link — 带预览的链接
- naduma/editorjs-mermaid — Editor.js 的 Mermaid 块
表格
- @editorjs/table — 表格构造工具
代码
- @editorjs/code — 代码示例工具
- @editorjs/raw — 在文章中包含原始 HTML 代码
帮助
安装
安装包
composer require mihail-himinec/tallstack-editorjs
发布配置文件
php artisan vendor:publish --tag="tallstack-editorjs-config"
这是发布配置文件的内容
return [
];
如果您愿意,可以使用以下方式发布视图
php artisan vendor:publish --tag="tallstack-editorjs-views"
使用
默认情况下,所有工具都已被启用
[ 'header', 'image', 'delimiter', 'list', 'underline', 'quote', 'table', 'raw', 'code', 'inline-code', 'style', 'alert', 'warning', 'embed', 'color', 'marker', 'tooltip', 'checklist', 'attaches', 'alignmenttune', 'paragraph', 'strikethrough', 'lists', 'mermaid', ]
您可以通过传递工具数组来禁用任何工具
EditorJs::make('content')->disableTools(['delimiter', 'quote']);
您可以通过传递工具数组来禁用任何工具
EditorJs::make('content')->tools(['header', 'image', 'list']);
许可
MIT 许可证 (MIT)。请参阅 许可文件 以获取更多信息。