PHP code example of wrteam / filament-ckeditor-field

1. Go to this page and download the library: Download wrteam/filament-ckeditor-field 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/ */

    

wrteam / filament-ckeditor-field example snippets


use Wrteam\FilamentCkeditorField\CKEditor;

CKEditor::make('content')
    ->uploadUrl(null)

use Wrteam\FilamentCkeditorField\CKEditor;

CKEditor::make('content')
    ->label('Content')
    ->t writing your content...')
    ->columnSpanFull()

return [
    /**
     * Image upload enabled
     */
    'upload_enabled' => true,

    /**
     * Image URL to upload to if one is not specified on the form field's ->uploadUrl() method
     */
    'upload_url' => null,
];

use Illuminate\Http\Request;

public function uploadImage(Request $request)
{
    $request->validate([
        'upload' => 'n response()->json([
        'url' => $url
    ]);
}

CKEditor::make('content')
    ->height('300px')   // compact
    ->height('500px')   // medium
    ->height('800px')   // tall

CKEditor::make('content')
    ->preview()
bash
php artisan vendor:publish --tag="filament-ckeditor-field-config"