2017 © Pedro Peláez
 

yii2-extension yii2-editor-markdown

editor.md for Yii2

image

vin-yang/yii2-editor-markdown

editor.md for Yii2

  • Wednesday, July 26, 2017
  • by Vin-Yang
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

vin-yang/yii2-editor-markdown

editor.md for Yii2, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist vin-yang/yii2-editor-markdown "*"

or add, (*4)

"vin-yang/yii2-editor-markdown": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)


field($model, 'info_md')->widget(EditorMdWidget::className(), [
                'options' => [// html attributes
                    'id' => 'editor-markdown',
                ],
                'clientOptions' => [
                    'height' => '300',
                    // 'previewTheme' => 'dark',
                    // 'editorTheme' => 'pastel-on-dark',
                    'markdown' => '',
                    //'codeFold' => true,
                    'syncScrolling' => true,
                    'saveHTMLToTextarea' => true,    // 保存 HTML 到 Textarea
                    'searchReplace' => true,
                    'watch' => true, // 关闭实时预览
                    'htmlDecode' => 'style,script,iframe|on*',            // 开启 HTML 标签解析,为了安全性,默认不开启
                    //'toolbar' => false,             //关闭工具栏
                    'placeholder' => '欢迎使用MarkDown',
                    'previewCodeHighlight' => false, // 关闭预览 HTML 的代码块高亮,默认开启
                    'emoji' => true,
                    'taskList' => true,
                    'tocm' => true,         // Using [TOCM]
                    'tex' => true,    // 开启科学公式TeX语言支持,默认关闭
                    'flowChart' => true,             // 开启流程图支持,默认关闭
                    'sequenceDiagram' => true,       // 开启时序/序列图支持,默认关闭,
                    'imageUpload' => true,
                    'imageFormats' => ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'],
                    'imageUploadURL' => Url::to(['file-upload', 'type' => 'md']),
                ]
            ]
) ?>

The Versions

26/07 2017

dev-master

9999999-dev

editor.md for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar Vin-Yang

extension yii2 editor markdown

26/07 2017

v0.0.3

0.0.3.0

editor.md for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar Vin-Yang

extension yii2 editor markdown

24/07 2017

v0.0.2

0.0.2.0

editor.md for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar Vin-Yang

extension yii2 editor markdown

24/07 2017

v0.0.1

0.0.1.0

editor.md for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar Vin-Yang

extension yii2 editor markdown