Nova Ckeditor
  • 🏁Getting Started
    • Introduction
    • Installation
    • Support Us
    • License
    • Demo
  • 🚀Basic Usage
    • Usage
    • Notes
  • ⚙️Advanced Usage
    • Customize ImageStorage
    • Integrating NovaFileArtisan (Larupload) with Image Resource
    • Customize AudioStorage
    • Customize FileStorage
    • Multiple Toolbars
    • Customize Toolbar Items
    • Media Embed
    • CkEditor Field Options
      • Toolbar
      • Height
      • Limit On Index
      • Content Language
      • Force Paste as Plain Text
      • Alert Before Unsaved Changes
      • Text Part Language
      • General HTML Support
      • Group Items In Overflow Mode
      • Image Browser
      • Audio Browser
      • Video Browser
      • File Browser
      • Snippets
    • Configuration
      • Video Model
      • Image Model
      • Memory
      • Max Image Quality
      • Image Max Width
      • Image Max Height
      • Image Naming Method
      • Image Processing Library
      • Audio Naming Method
      • File Naming Method
      • Toolbars
        • Default Toolbar
        • Toolbar 1
          • Height
          • Items
          • Options
          • Content Lang
          • Force Paste as Plain Text
          • Alert Before Unsaved Changes
          • UI Language
            • UI Language Name
            • UI Language Script
          • Text Part Language
          • General HTML Support
          • Group Items In Overflow Mode
          • Image Browser
          • Audio Browser
          • Video Browser
          • File Browser
          • Insert Image Types
          • Insert Image Size
          • Snippets
  • ⚪Other
    • Migration
    • Credit and Thanks
Powered by GitBook
On this page
Edit on GitHub
  1. Advanced Usage
  2. CkEditor Field Options

Toolbar

toolbar

Argument
Type
Required
Default

name

string

items

array

null

This method allows you to customize the toolbar configuration within the CKEditor field, providing flexibility in defining the available toolbar options and items and their arrangement.

It accepts two arguments to facilitate customization.

The first argument, name, is a string that allows you to reference a pre-configured toolbar key from the config/nova-ckeditor.php file. This feature enables you to quickly apply a predefined toolbar configuration to the CKEditor field.

Additionally, the second argument, items, is an optional array that empowers you to define custom toolbar items for the current field. By providing an array of toolbar items, you can specify a personalized set of buttons, dropdown menus, and other editing tools to include in the toolbar. This functionality enables you to precisely tailor the toolbar to match your specific needs.

use Mostafaznv\NovaCkEditor\CkEditor;

class Article extends Resource
{
    public function fields(Request $request): array
    {
        return [
            CkEditor::make(trans('Content'), 'content')
                ->toolbar('toolbar-2', [
                    'textPartLanguage', 'heading', '|', 'fontSize'
                    ]
                )
        ];
    }
}
PreviousCkEditor Field OptionsNextHeight

Last updated 1 year ago

⚙️