dotswan / filament-code-editor
Installs: 6 176
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 1
Forks: 3
Open Issues: 1
Requires
- php: ^8.1
- filament/filament: ^3.0
- illuminate/contracts: ^10.0 || ^11.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
This package is auto-updated.
Last update: 2024-12-22 09:40:58 UTC
README
Introduction
The Filament Code Editor package enhances Filament with a specialized field type, allowing seamless code editing powered by the CodeMirror JavaScript library within Filament components. This integration provides users with a dedicated environment for editing various code languages such as CSS, HTML, JavaScript, JSON, and PHP directly within Filament forms.
- Key Features:
- Integration of the CodeMirror JavaScript library into Filament components.
- Support for multiple code languages including CSS, HTML, JavaScript, JSON, and PHP.
- Effortless editing of code within the familiar Filament interface.
Installation
To integrate the Filament Code Editor package into your project, use Composer:
composer require dotswan/filament-code-editor
Basic Usage
To implement the code editor field within Filament forms, use the CodeEditor
field type:
use Dotswan\FilamentCodeEditor\Fields\CodeEditor; CodeEditor::make('codes') // Additional configuration goes here, if needed ->id('unique_field_id') ->minHeight(768) ->isReadOnly(true) ->showCopyButton(true) ->darkModeTheme('gruvbox-dark') ->lightModeTheme('basic-light') ->columnSpanFull(),
Theme values:
- basic-light
- basic-dark
- solarized-dark
- solarized-light
- material-dark
- nord
- gruvbox-light
- gruvbox-dark
Supported Languages
The Filament Code Editor supports the following languages:
- CSS
- HTML
- JavaScript
- JSON
- PHP
Customize and manage code for these languages effortlessly within your Filament forms.
License
This package is distributed under the MIT License.
Security
Security is a priority for us. If you encounter any security-related issues or vulnerabilities, please report them via our GitHub issue tracker. For direct communication, reach out to tech@dotswan.com.
Contribution
Contributions are welcome and valued. Enhancements, suggestions, and bug reports help improve this package for everyone. Here's how you can contribute:
- Fork the Project
- Create a Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Thank you for considering contributing to the Filament Code Editor!