Download the PHP package parallax/filament-syntax-entry without Composer
On this page you can find all versions of the php package parallax/filament-syntax-entry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download parallax/filament-syntax-entry
More information about parallax/filament-syntax-entry
Files in parallax/filament-syntax-entry
Package filament-syntax-entry
Short Description Add a Filament infolist entry for themeable syntax highlighting.
License MIT
Homepage https://github.com/parallax/filament-syntax-entry
Informations about the package filament-syntax-entry
Filament Syntax Entry
Add a Filament infolist entry for themeable server-side syntax highlighting using tempestphp/highlight.
Installation
Install the package via composer:
Optionally, you can publish the views using
Upgrading from 1.x
There are a couple of important changes to be aware of when upgrading to version 2.x:
- PHP 8.3 is required for server-side syntax highlighting
- Highlight.js is no longer supported
- Theme selection has been replaced with the ability to create custom themes
Quickstart
Add the Infolist entry
Add the SyntaxEntry
to the $infolist->schema()
method.
Setting the language
The default language value is set to json
. To override this value you may use the language()
method:
The following languages are currently available:
blade
css
gdscript
html
javascript
json
php
sql
twig
xml
yaml
Creating a custom theme
You may override the default theme by using the theme()
method:
This will wrap the syntax component with a custom class like so:
The final step is to follow the tempestphp/highlight documentation on how to create your own theme, and use this in combination with Filament themes.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-syntax-entry with dependencies
filament/filament Version ^3.0
illuminate/contracts Version ^10.0|^11.0
spatie/laravel-package-tools Version ^1.15.0
tempest/highlight Version ^1.0