Download the PHP package iperamuna/filament-ace-editor without Composer
On this page you can find all versions of the php package iperamuna/filament-ace-editor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download iperamuna/filament-ace-editor
More information about iperamuna/filament-ace-editor
Files in iperamuna/filament-ace-editor
Package filament-ace-editor
Short Description Ace Editor implementation for Filament 5 Forms and Infolists
License MIT
Homepage https://github.com/iperamuna/filament-ace-editor
Informations about the package filament-ace-editor
Filament Ace Editor (Supporting Filament v5)
A powerful Ace Editor implementation for Filament v5 Forms and Infolists with syntax highlighting, themes, autocompletion, and read-only mode support.
Requirements
- PHP 8.2+
- Laravel 12.x
- Filament 5.x
Installation
You can install the package via composer:
The package will automatically detect your Filament version and work seamlessly with your installation.
Usage
Basic Form Field
Advanced Configuration
Infolist Entry
Key Features
🔒 Read-Only Mode Control
The defaultReadOnly() method helps prevent unwanted edits, especially useful when editing existing records. You can control it with a boolean or closure:
Example Use Case: When a form is in create mode, the editor automatically opens in edit mode. When viewing or editing an existing record, it starts in read-only mode to prevent accidental changes. Users can toggle to edit mode when needed.
🎨 Theme Support
Available themes include: monokai, github, tomorrow, twilight, solarized_light, solarized_dark, and many more.
🔧 Toggleable Edit Mode
Allow users to switch between read-only and edit modes:
📏 Flexible Sizing
🧩 Extensions Support
Configuration
Publish the configuration file to customize defaults:
This creates config/filament-ace-editor.php:
Available Methods
| Method | Description | Default |
|---|---|---|
mode(string) |
Set syntax highlighting mode | 'sh' |
theme(string) |
Set editor theme | 'monokai' |
minLines(int) |
Set minimum editor height | 15 |
maxLines(int) |
Set maximum editor height | 50 |
toggleable(bool) |
Enable edit/read-only toggle | true |
defaultReadOnly(bool\|Closure) |
Set initial read-only state | true |
addExtension(string) |
Add Ace extension | [] |
options(array) |
Override editor options | [] |
Supported Languages
Ace Editor supports over 110 programming languages and markup formats. Common modes include:
Programming Languages:
php,python,javascript,typescript,java,c_cpp,ruby,go,rust
Web Technologies:
html,css,scss,less,json,xml,yaml
Data & Config:
sql,mysql,pgsql,ini,toml,dockerfile
Scripting:
sh(Shell/Bash),powershell,batchfile
Markup:
markdown,latex,asciidoc
See the Ace Editor documentation for the complete list of supported modes.
Publishing
Publish the views for customization:
Publish the configuration:
Supported Features
This package supports most powerful features from Ace Editor:
- ✅ Syntax highlighting for 110+ languages
- ✅ Multiple themes (light and dark)
- ✅ Code autocompletion
- ✅ Search and replace
- ✅ Code folding
- ✅ Multiple cursors
- ✅ Line numbering
- ✅ Automatic indentation
- ✅ Read-only mode with toggle
- ✅ Customizable key bindings
- ✅ Extensions support
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
- Indunil Peramuna
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-ace-editor with dependencies
illuminate/support Version ^12.0
filament/filament Version ^5.0
spatie/laravel-package-tools Version ^1.15.0