-
-
Notifications
You must be signed in to change notification settings - Fork 86
Trix
tanthammar edited this page Oct 20, 2020
·
9 revisions
There are two versions of the Trix field, with and without attachments.
Requires you to have @stack('styles')
in head,
and @stack('scripts')
after Livewire and Alpine script tags
Extends BaseField
- Push external (cdn-links) for required scripts and styles to the layout
- Omit, if you import the scripts manually
- Only pushed once, even if you add multiple Trix fields to the same form.
Use this method to set the initial trix input value.
Use $this->model
to access existing model values.
Trix::make('Trix')
->default('The initial value of the trix input') // Example: $this->model->foo
->includeExternalScripts() //will only be included once if multiple Trix fields.
->rules('nullable|string')
Add the custom()
option if you need to format the trix-input (html) before saving to database.
Read more about custom data ->
Please sponsor this package in order to get access to this field.
The documentation for this field is available in the sponsor repository.
Both versions of the Trix fields shares the same markup
<x-tall-trix
:field="$field"
:temp-key="$temp_key"
:value="data_get($this, $temp_key)"
/>
Both versions of the Trix fields shares the same Blade component class, extend it, or override in config file.
Tanthammar\TallForms\Components\Trix::class
- Installation
- Requirements
- v5 Upgrade Guide
- v6 Upgrade Guide
- v7 Upgrade Guide
- Support
- Quickstart
- Manual installation
- Optional
- Form component
- Field
- Field types
- Example Form
- Blade Components
- Notifications