vasar/simplemde-support-uploadimage

laravel-admin extension of simplemde,support paste drop upload image

0.0.2 2019-02-18 11:47 UTC

This package is auto-updated.

Last update: 2025-06-06 12:31:04 UTC


README

支持粘贴,拖拽图片上传

Installing

$ composer require vasar/simplemde-support-uploadimage

$ php artisan vendor:publish
> select [Vasar\Simplemde\SimplemdeServiceProvider]

Usage

In the extensions section of the config/admin.php file

'extensions' => [

    'simplemde' => [

        // Set to false if you want to disable this extension
        'enable' => true,

        // If you want to set an alias for the calling method
        //'alias' => 'markdown',

        // Editor configuration
        'config' => [

        ]
    ]
]

The configuration of the editor can be found in Simplemde Documentation and configuration upload image.

'config' => [
    'autofocus'   => true,
    'spellChecker' => false,
    'upload' => 'upload url',
    'uploadFieldName' => 'xxx_filedName', // 上传字段 默认:image
    'jsonFieldName' => 'xxx_jsonFieldName', // json 返回字段 默认:image
    
    ....
]

use in form

$form->simplemde('content');

License

MIT