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.
To integrate the Filament Code Editor package into your project, use Composer:
composer require dotswan/filament-code-editor
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:
The Filament Code Editor supports the following languages:
Customize and manage code for these languages effortlessly within your Filament forms.
This package is distributed under the MIT License.
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.
Contributions are welcome and valued. Enhancements, suggestions, and bug reports help improve this package for everyone. Here's how you can contribute:
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Thank you for considering contributing to the Filament Code Editor!
At Dotswan, we excel in transforming visionary ideas into reality, offering comprehensive services from IT solutions to DevOps, and specializing in creating highly responsive websites and scalable mobile apps. Our team of experts ensures top-tier user experience, security, and innovative designs.