PHP code example of mvnobrega / nova-texteditor

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

    

mvnobrega / nova-texteditor example snippets


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

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

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

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