jxlwqq/simditor

Simditor for Laravel-admin

安装次数: 25 307

依赖关系: 1

建议者: 0

安全: 0

星标: 16

关注者: 2

分支: 5

语言:JavaScript

1.0.4 2020-11-20 05:26 UTC

This package is auto-updated.

Last update: 2024-09-11 15:13:55 UTC


README

这是一个 laravel-admin 扩展,它将 Simditor 集成到 laravel-admin 表单中。

屏幕截图

simditor

安装

composer require jxlwqq/simditor

php artisan vendor:publish --tag=laravel-admin-simditor

配置

config/admin.php 文件的 extensions 部分,添加属于此扩展的一些配置。

'extensions' => [
    'simditor' => [
        // Set to false if you want to disable this extension
        'enable' => true,
        // Editor configuration
        'config' => [
            'upload' => [
                'url' => '/admin/api/upload', # example api route: admin/api/upload
                'fileKey' => 'upload_file',
                'connectionCount' => 3,
                'leaveConfirm' => 'Uploading is in progress, are you sure to leave this page?'
            ],
            'tabIndent' => true,
            'toolbar' => ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', '|', 'ol', 'ul', 'blockquote', 'code', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent', 'alignment'],
            'toolbarFloat' => true,
            'toolbarFloatOffset' => 0,
            'toolbarHidden' => false,
            'pasteImage' => true,
            'cleanPaste' => false,
        ]
    ]
]

编辑器的配置可以在 Simditor 文档 中找到。

用法

在表单中使用它

$form->simditor('content');

更多资源

出色的 Laravel-admin

许可证

许可协议为 MIT 许可证 (MIT)