dungphanxuan/yii2-editor

Yii2 Markdow editor base on bootstrap plugin for markdown editing.

Installs: 59

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

dev-master 2015-04-24 02:11 UTC

This package is not auto-updated.

Last update: 2022-07-02 20:30:48 UTC


README

Markdown editing meet Bootstrap.

Version Compatibility with Bootstrap
Bootstrap Markdown v2.x only compatible with Bootstrap 3.x
Bootstrap Markdown v1.x only compatible with Bootstrap 2.x

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist dungphanxuan/yii2-editor "*"

or add

"dungphanxuan/yii2-editor": "dev-master"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?php echo dungphanxuan\yii2editor\MarkDownEditorWidget::widget([
                            'name' => 'content',
                            'options'=>[// html attributes
                                'id'=>'content',
                                'rows'=>'5',
                                'placeholder'=>'Leave a comment',
                                'data-provide'=>'markdown',
                            ],
]);; ?>

or use with a model:

<?php echo dungphanxuan\yii2editor\MarkDownEditorWidget::widget([
                            'model' => $model,
                            'attribute' => 'content',
                            'options'=>[// html attributes
                                'id'=>'content',
                                'rows'=>'5',
                                'placeholder'=>'Leave a comment',
                                'data-provide'=>'markdown',
                            ],
 ]);; ?>

Demo and documentation on http://toopay.github.io/bootstrap-markdown/

LICENSE

Copyright 2013-2014 Taufan Aditya

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.