PHP code example of abdelhamiderrahmouni / filament-editorjs

1. Go to this page and download the library: Download abdelhamiderrahmouni/filament-editorjs library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

abdelhamiderrahmouni / filament-editorjs example snippets


use FilamentEditorJs\Forms\Components\EditorJs;

EditorJs::make('content')


[
    'attaches',         // @editorjs/attaches
    'checklist',        // @editorjs/checklist
    'code',             // @editorjs/code
    'delimiter',        // @editorjs/delimiter
    'header',           // @editorjs/header
    'image-gallery',    // editorjs-gallery
    'image',            // @editorjs/image
    'inline-code',      // @editorjs/inline-code
    'link',             // @editorjs/link
    'list',             // @editorjs/list
    'marker',           // @editorjs/marker
    'nested-list',      // @editorjs/nested-list
    'paragraph',        // @editorjs/paragraph
    'quote',            // @editorjs/quote
    'raw',              // @editorjs/raw
    'style',            // editorjs-style
    'table',            // @editorjs/table
    'underline',        // @editorjs/underline
    'warning',          // @editorjs/warning
]

EditorJs::make('content')
    ->disableTools(['image', 'raw']);

EditorJs::make('content')
    ->tools(['image', 'raw']);

EditorJs::make('content')
    ->toolsOptions([
        'attaches' => [
            'endpoint' => '/upload/file',
        ],
        'image' => [
            'endpoints' => [
                'byFile' => '/upload/image',
                'byUrl' => '/upload/image-by-url',
            ],
        ],
    ]);

EditorJs::make('content')
    ->debug();