PHP code example of johnathan / nova-trumbowyg

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

    

johnathan / nova-trumbowyg example snippets


    public function fields(Request $request)
    {
        return [
            ...,
            NovaTrumbowyg::make('body')

                ->withMeta(['options' => [
                    'btns' => [
                        ['viewHTML'],
                        ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
                    ]
                ]]),
             ...
        ];
    }

    public function fields(Request $request)
    {
        return [
            ...,
            NovaTrumbowyg::make('body')->alwaysShow(),
            ...
        ];
    }

    public function fields(Request $request)
    {
        return [
            ...,
            NovaTrumbowyg::make('body')->defaultWidth(),
            ...
        ];
    }