Overview
The WYSIWYG (What You See Is What You Get) component provides a rich text editor for your forms using TinyMCE integration. It extends the Textarea component with automatic editor initialization.Basic Usage
Component Attributes
The name attribute for the textarea field
The label text for the field
Number of visible text rows in the textarea
The Eloquent model to bind values from
Default value if no model value exists
Explicit value to use (overrides model/default)
Whether to display validation errors
Whether to display the label
Placeholder text for the textarea
Whether to show placeholder text
Whether the field is required
Whether to use inline layout (label and input on same row)
Whether to use floating label style
Custom CSS class for inline label column
Custom CSS class for inline input column
Whether to display JavaScript validation errors
Override the default CSS framework (bootstrap-5, material-admin-26)
TinyMCE Integration
The WYSIWYG component automatically initializes TinyMCE editor with the following configuration:Default Plugins
autolink- Automatically creates links from URLslink- Insert/edit linkslists- Ordered and unordered listsdirectionality- LTR/RTL text directioncode- View/edit HTML source codevisualchars- Show invisible charactersquickbars- Context toolbar
Default Toolbar
JavaScript Integration
The component automatically includes TinyMCE scripts by pushing to the configured stack:Scripts Stack Configuration
Ensure your layout has the scripts stack defined. The default stack name is configured inconfig/forms.php:
Complete Example
Customizing TinyMCE
To customize the TinyMCE configuration, publish the views:resources/views/vendor/forms/partials/wysiwyg-script.blade.php: