setono/easyadmin-editorjs-bundle

Use EditorJS in your EasyAdmin project

Installs: 1 047

Dependents: 0

Suggesters: 0

Security: 0

Stars: 5

Watchers: 1

Forks: 0

Open Issues: 2

Type:symfony-bundle

dev-master 2023-10-17 10:24 UTC

This package is auto-updated.

Last update: 2024-06-08 09:44:22 UTC


README

Latest Version Software License Build Status Code Coverage

Installation

To install this bundle, simply run:

composer require setono/easyadmin-editorjs-bundle

Add route configuration

Add a route import inside config/routes:

# config/routes/setono_easyadmin_editorjs.yaml
setono_easyadmin_editorjs:
    resource: "@SetonoEasyadminEditorjsBundle/Resources/config/routes.yaml"

Usage

When configuring your fields in your crud controller, add an EditorJSField like this:

public function configureFields(string $pageName): iterable
{
    // ...
    
    yield EditorJSField::new('content')
        ->addHeaderTool(2)
        ->addListTool()
        ->addQuoteTool()
    ;
    
    // ...
}