PHP code example of chenhua / laravel5-markdown-editor

1. Go to this page and download the library: Download chenhua/laravel5-markdown-editor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

chenhua / laravel5-markdown-editor example snippets


Chenhua\MarkdownEditor\MarkdownEditorServiceProvider::class,

'MarkdownEditor' => Chenhua\MarkdownEditor\Facades\MarkdownEditor::class,
bash
php artisan vendor:publish --tag=markdown
bash

return [
    "default"     => 'local', //默认返回存储位置url
    "dirver"      => ['local'], //存储平台 ['local', 'qiniu', 'aliyun']
    "connections" => [
        "local"  => [
            'prefix' => 'uploads/markdown', //本地存储位置,默认uploads
        ],
        "qiniu"  => [
            'access_key' => '',
            'secret_key' => '',
            'bucket'     => '',
            'prefix'     => '', //文件前缀 file/of/path
            'domain'     => '' //七牛自定义域名
        ],
        "aliyun" => [
            'ak_id'     => '',
            'ak_secret' => '',
            'end_point'  => '',
            'bucket'    => '',
            'prefix'    => '',
        ],
    ],
];
html
    echo MarkdownEditor::parse("#中间填写markdown格式的文本");