### Adding extensions with addExtensions() Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/resources/boost/skills/ace-editor-field-development/SKILL.md Adds Ace extensions. The first example adds 'emmet' and 'language_tools'. The second shows a custom callback to merge extensions uniquely. ```php AceEditorInput::make('code') ->addExtensions(['emmet', 'language_tools']); // With a custom callback AceEditorInput::make('code') ->addExtensions(['emmet'], function ($existing, $new) { return $existing->merge($new)->unique(); }); ``` -------------------------------- ### Basic AceEditorInput setup Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/resources/boost/skills/ace-editor-field-development/SKILL.md Creates a basic Ace editor field with PHP mode, monokai theme, and a height of 20rem. The field is required. ```php use JeffersonGoncalves\Filament\AceEditorField\Forms\Components\AceEditorInput; AceEditorInput::make('code') ->mode('php') ->theme('monokai') ->height('20rem') ->required(); ``` -------------------------------- ### Install Filament Ace Editor Field via Composer Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/README.md Install the package via Composer. Requires PHP 8.2 or higher and Filament 5.0. ```bash composer require jeffersongoncalves/filament-ace-editor-field:^2.0 ``` -------------------------------- ### Editor configuration with editorConfig() Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/resources/boost/skills/ace-editor-field-development/SKILL.md Sets the base path for Ace editor assets. Example uses a custom path '/custom/ace/path'. ```php AceEditorInput::make('code') ->editorConfig([ 'basePath' => '/custom/ace/path', ]); ``` -------------------------------- ### Custom editor options with editorOptions() Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/resources/boost/skills/ace-editor-field-development/SKILL.md Merges additional Ace editor options that are passed directly to the Ace API. Example sets font size, gutter, print margin, tab size, soft tabs, and wrapping. ```php AceEditorInput::make('code') ->mode('php') ->editorOptions([ 'fontSize' => 14, 'showGutter' => true, 'showPrintMargin' => false, 'tabSize' => 4, 'useSoftTabs' => true, 'wrap' => true, ]); ``` -------------------------------- ### Read-only mode with disabled() Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/resources/boost/skills/ace-editor-field-development/SKILL.md The editor automatically enters read-only mode when the field is disabled. Example uses JSON mode. ```php AceEditorInput::make('code') ->mode('json') ->disabled(); ``` -------------------------------- ### Setting theme with theme() Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/resources/boost/skills/ace-editor-field-development/SKILL.md Sets the light mode theme. The theme() method automatically prepends 'ace/theme/' to the given value. ```php AceEditorInput::make('code') ->theme('github'); // Sets ace/theme/github ``` -------------------------------- ### Run Static Analysis and Format Code Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/README.md Run code analysis and formatting commands for development. ```bash # Run static analysis composer analyse # Format code composer format ``` -------------------------------- ### Sizing options Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/resources/boost/skills/ace-editor-field-development/SKILL.md Sets height (default '16rem'), columns, rows, and enables auto-sizing. ```php AceEditorInput::make('code') ->height('30rem') // Set height (default: '16rem') ->cols(80) // Set columns ->rows(20) // Set rows ->autosize(); // Enable auto-sizing ``` -------------------------------- ### Publish Filament Ace Editor Field Config Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/README.md Publish the package configuration file using the Artisan command. ```bash php artisan vendor:publish --tag=filament-ace-editor-field-config ``` -------------------------------- ### Setting language mode with mode() Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/resources/boost/skills/ace-editor-field-development/SKILL.md Sets the Ace editor language mode. The mode() method automatically prepends 'ace/mode/' to the given value. ```php AceEditorInput::make('content') ->mode('html'); // Sets ace/mode/html AceEditorInput::make('script') ->mode('javascript'); // Sets ace/mode/javascript AceEditorInput::make('styles') ->mode('css'); // Sets ace/mode/css ``` -------------------------------- ### Dark mode theme configuration Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/resources/boost/skills/ace-editor-field-development/SKILL.md Configures a separate dark mode theme or disables automatic dark mode switching entirely. ```php // Set a dark mode theme AceEditorInput::make('code') ->theme('chrome') ->darkTheme('twilight'); // Disable dark mode theme switching entirely AceEditorInput::make('code') ->theme('monokai') ->disableDarkTheme(); ``` -------------------------------- ### Use AceEditorInput in Filament Form Source: https://github.com/jeffersongoncalves/filament-ace-editor-field/blob/2.x/README.md Use the AceEditorInput component in a Filament form. Configure the editor with mode, theme, height, placeholder, and required options. ```php use JeffersonGoncalves\Filament\AceEditorField\Forms\Components\AceEditorInput; // In your form definition AceEditorInput::make('description') ->mode('html') ->theme('monokai') ->height(200) ->placeholder('Enter your description here') ->required(), ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.