riodwanto / filament-ace-editor
Ace Editor implementation for Filament 3 Form
Installs: 21 977
Dependents: 4
Suggesters: 0
Security: 0
Stars: 16
Watchers: 1
Forks: 2
Open Issues: 1
Requires
- php: ^8.1
- illuminate/contracts: ^11.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- filament/filament: ^3.0
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^9.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
This package is auto-updated.
Last update: 2024-12-16 05:11:28 UTC
README
Ace Editor implementation for Filament Form.
Installation
You can install the package via composer:
composer require riodwanto/filament-ace-editor
Usage
use Riodwanto\FilamentAceEditor\AceEditor; public function form(Form $form): Form { return $form ->schema([ ... AceEditor::make('code-editor') ->mode('php') ->theme('github') ->darkTheme('dracula'), ]) }
Available methods
All default value can be see here
Publishing
You can publish the views using:
php artisan vendor:publish --tag="filament-ace-editor-views"
You can publish the config file with:
php artisan vendor:publish --tag="filament-ace-editor-config"
config
This is the contents of the published config file:
return [ ... // Initilization ace config 'editor_config' => [ 'useWorker' => false ], // Editor options 'editor_options' => [ 'mode' => 'ace/mode/php', 'theme' => 'ace/theme/eclipse', 'enableBasicAutocompletion' => true, 'enableLiveAutocompletion' => true, 'liveAutocompletionDelay' => 0, 'liveAutocompletionThreshold' => 0, 'enableSnippets' => true, 'enableInlineAutocompletion' => true, 'showPrintMargin' => false, 'wrap' => 'free' ], 'dark_mode' => [ 'enable' => true, 'theme' => 'ace/theme/dracula', ], 'enabled_extensions' => [ 'beautify', 'language_tools', 'inline_autocomplete', ], ... ];
Supported Ace Features
Credits
License
The MIT License (MIT). Please see License File for more information.