Summernote

Текстовый редактор summernote.

<x-rock-cms::fields.summernote :model="$resource->desc" field="resource.desc" enableMedia title="Описание"/>

Опции:

  • enableMedia - поддержка вставки медиа контента.

  • readonly - только для чтения

Для правильной работы в config/adminlte.php в сексии plugins подключите скрипты и стили редактора

'Summernote' => [
    'active' => true,
    'files' => [
        [
            'type' => 'js',
            'asset' => true,
            'location' => '/vendor/summernote/summernote-bs4.min.js',
        ],
        [
            'type' => 'js',
            'asset' => true,
            'location' => '/vendor/summernote-cleaner/summernote-cleaner.js',
        ],
        [
            'type' => 'css',
            'asset' => true,
            'location' => '/vendor/summernote/summernote-bs4.min.css',
        ],
    ],
],
'SummernoteAttributes' => [
    'active' => true,
    'files' => [
        [
            'type' => 'js',
            'asset' => true,
            'location' => '/vendor/summernote-attributes/summernote-image-attributes.js',
        ],
        [
            'type' => 'js',
            'asset' => true,
            'location' => '/vendor/summernote-attributes/ru-RU.js',
        ],
    ],
],

Last updated