ezadev/simplemde

Simplemde markdown editor extension for ezadev

0.0.1 2021-08-21 06:27 UTC

This package is auto-updated.

Last update: 2024-04-21 12:17:28 UTC


README

Simplemde is a great markdown editor, this extension is used to integrate Simplemde into the ezadev-admin form.

Installation

composer require ezadev/simplemde

Then

php artisan vendor:publish --tag=ezadev-simplemde

Configuration

In the extensions section of the config/admin.php file, add some configuration that belongs to this extension.

    '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

    'config' => [
        'autofocus'   => true,
        'placeholder' => 'xxxx',
        ....
    ]

Usage

Use it in the form:

$form->simplemde('content');

Set height

$form->simplemde('content')->height(500);

If the method alias is specified in the configuration as markdown

$form->markdown('content');

License

Licensed under The MIT License (MIT).