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. Configuration
  3. Toolbars
  4. Toolbar 1

Snippets

toolbars.toolbar-1.snippets

PreviousInsert Image SizeNextMigration

Last updated 1 year ago

Property Name
Type
Default

toolbars.toolbar-1.snippets

array

This option allows you to define and customize the snippets available within the toolbar. Snippets are pre-defined content blocks that can be easily inserted into the CKEditor field.

By default, there are some pre-defined snippets located in the resources/views/ckeditor directory. However, you can add more snippets as needed by specifying them in the toolbars.toolbar-1.snippets configuration option.

To add and customize snippets within Toolbar 1, update the value of toolbars.toolbar-1.snippets in the config/nova-ckeditor.php file with the desired array of snippet items.

Example:

<?php

return [    
    'toolbars' => [
        'toolbar-1' => [
            'snippets' => [
                ['name' => 'Image', 'html' => 'ckeditor.image'],
                ['name' => 'Media', 'html' => 'ckeditor.media'],
                ['name' => 'Table', 'html' => 'ckeditor.table']
            ]
        ],
    ]
];

It's important to note that snippets will only render CKEditor elements. Standard HTML or figures such as tables, images, and videos. For more information on using standard HTML or figures, refer to the .

⚙️
CKEditor documentation