PHP code example of curder / filament-rich-editor-source-code

1. Go to this page and download the library: Download curder/filament-rich-editor-source-code 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/ */

    

curder / filament-rich-editor-source-code example snippets


RichEditor::make('html')
    ->toolbarButtons([
        ['source-code'], // Add the `source-code` button to the toolbar.
        [ 'bold', 'italic', 'underline', 'strike', 'subscript', 'superscript', 'link'],
        ['h2', 'h3', 'alignStart', 'alignCenter', 'alignEnd'],
        ['blockquote', 'codeBlock', 'bulletList', 'orderedList'],
        ['table', 'attachFiles', 'customBlocks'], // The `customBlocks` and `mergeTags` tools are also added here if those features are used.
        ['undo', 'redo'],
    ]),
shell
php artisan filament:assets
shell
php artisan vendor:publish --tag=filament-rich-editor-source-code-translations
shell
php artisan filament:assets