PHP code example of everzel / nova-editor-js

1. Go to this page and download the library: Download everzel/nova-editor-js 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/ */

    

everzel / nova-editor-js example snippets


use Everzel\NovaEditorJs\NovaEditorJs;

NovaEditorJs::make('FieldName');

NovaEditorJs::generateHtmlOutput($user->about);

// ...
public function boot()
{
    parent::boot();

    Nova::serving(function () {
        Nova::script('editor-js-warning', public_path('js/editor-js-plugins/warning.js'));
    });
}
// ...

return [
    // ...
    'toolSettings' => [
        'warning' => [
            'activated' => true,
            'titlePlaceholder' => 'Title',
            'messagePlaceholder' => 'Message',
            'shortcut' => 'CMD+SHIFT+L'
        ],
    ]
    // ...
];

use Everzel\NovaEditorJs\NovaEditorJs;

// ...
public function boot()
{
    parent::boot();

    NovaEditorJs::addRender('warning', function($block) {
        return view('editorjs.warning', $block['data'])->render();
    });
    
    // ...
}
// ...

php artisan vendor:publish --provider="Everzel\NovaEditorJs\FieldServiceProvider"