webplusmultimedia/la-tiny-editor

Little Admin 的 Tiny MCE 编辑器

v0.9.3 2023-09-20 12:25 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Little Admin 的 TinyMce 插件。 S-lection-004.png

支持我们

即将推出

安装

您可以通过 composer 安装此包

composer require webplusmultimedia/la-tiny-editor

发布资产

php artisan vendor:publish --tag=la-tiny-editor-assets

使用以下命令发布配置文件

php artisan vendor:publish --tag="la-tiny-editor-config"

然后,添加一些配置以与 tinyMce 一起使用

return [
    'profiles' => [
    ...
        'myconf' => [
                'plugins' => 'autolink link code',
                'toolbar' => 'undo redo | bold italic underline | link | removeformat code brbtn',
            ],
    ...     
    ]
];

使用方法

在 Little Admin 的资源文件中

public static function getFormSchema(Form $form): Form
    {
        return $form
            ->schema([
                LaTinyEditor::make('extrait')
                    ->nullable()
                    ->profile('myconf')
                    ->required(),
                LaTinyEditor::make('texte')
                    ->nullable()
                    ->helperText('Texte d\'apprentissage')->required(),
            ]);
}

测试

composer test

变更日志

请参阅 CHANGELOG 了解最近更改的详细信息。

贡献

请参阅 CONTRIBUTING 了解详细信息。

安全漏洞

请审查 我们的安全策略 了解如何报告安全漏洞。

鸣谢

许可证

MIT 许可证 (MIT)。请参阅 许可证文件 了解更多信息。