setono / easyadmin-editorjs-bundle
在EasyAdmin项目中使用EditorJS
dev-master
2023-10-17 10:24 UTC
Requires
- php: >=8.1
- easycorp/easyadmin-bundle: ^4.0
- setono/editorjs-bundle: ^1.0
- setono/editorjs-php: ^1.0
- setono/html-element: ^1.0@alpha
- symfony/config: ^6.0
- symfony/dependency-injection: ^6.0
- symfony/filesystem: ^6.0
- symfony/form: ^6.0
- symfony/http-foundation: ^6.0
- symfony/http-kernel: ^6.0
- symfony/mime: ^6.0
- symfony/routing: ^6.0
- symfony/string: ^6.0
- twig/twig: ^3.7
- webmozart/assert: ^1.11
Requires (Dev)
- matthiasnoback/symfony-dependency-injection-test: ^4.3.1
- nyholm/symfony-bundle-test: ^2.0
- phpspec/prophecy-phpunit: ^2.0.2
- phpunit/phpunit: ^9.6.10
- psalm/plugin-phpunit: ^0.18.4
- psalm/plugin-symfony: ^5.0.3
- setono/code-quality-pack: ^2.4
This package is auto-updated.
Last update: 2024-09-08 10:10:21 UTC
README
安装
要安装此包,只需运行
composer require setono/easyadmin-editorjs-bundle
添加路由配置
在 config/routes
中添加路由导入
# config/routes/setono_easyadmin_editorjs.yaml setono_easyadmin_editorjs: resource: "@SetonoEasyadminEditorjsBundle/Resources/config/routes.yaml"
用法
在配置crud控制器中的字段时,添加一个 EditorJSField
,如下所示
public function configureFields(string $pageName): iterable { // ... yield EditorJSField::new('content') ->addHeaderTool(2) ->addListTool() ->addQuoteTool() ; // ... }