PHP code example of webard / nova-suneditor

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

    

webard / nova-suneditor example snippets


    use Webard\NovaSunEditor\SunEditor;
    

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        SunEditor::make('Content', 'content')
            ->rules('

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        SunEditor::make('Content', 'content')
            ->withFiles('disk','path/to/attachments')
    ];
}

public function fields(Request $request)
{
    return [
        ID::make()->sortable(),

        SunEditor::make('Content', 'content')
            ->withFiles('disk','path/to/attachments')
            ->settings([
                'imageUploadUrl' => '/your/path/to/handle/upload',
            ]),
    ];
}

SunEditor::make('Content', 'content')
    ->buttonListName('my-buttons')

SunEditor::make('Content', 'content')
    ->buttonList([
        [
            'undo',
            'redo',
            'bold'
        ]
    ]);

SunEditor::make('Content', 'content')
    ->settings([
        'minHeight' => '500px'
    ]);
sh
    php artisan vendor:publish --provider="Webard\NovaSunEditor\FieldServiceProvider"