Skip to content

iJackUA/yii2-lepture-markdown-editor-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Lepture Markdown Editor widget

Latest Version on Packagist Software License Total Downloads

Yii2 widget for Lepture Markdown Editor (https://github.com/lepture/editor) - A markdown editor you really want

Demo

on http://lab.lepture.com/editor/

Installation via Composer

add to require section of your composer.json "ijackua/yii2-lepture-markdown-editor-widget" and run composer update

Usage example

Active widget

use ijackua\lepture\Markdowneditor;

Markdowneditor::widget(
			[
				'model' => $model,
				'attribute' => 'full_text',
			])

Simple widget

use ijackua\lepture\Markdowneditor;

Markdowneditor::widget(
			[
				'name' => 'editor',
				'value' => '# Hello world'
			])

Editor options

see on official site

use ijackua\lepture\Markdowneditor;

Markdowneditor::widget(
			[
				'model' => $model,
				'attribute' => 'full_text',
				'leptureOptions' => [
					'toolbar' => false
				]
			])

Marked options (markdown parser used by Lepture Editor)

see on official Marked site

use ijackua\lepture\Markdowneditor;

Markdowneditor::widget(
			[
				'model' => $model,
				'attribute' => 'full_text',
				'markedOptions' => [
					'tables' => false
				]
			])

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Yii2 widget for Lepture Markdown Editor (https://github.com/lepture/editor) - A markdown editor you really want

Resources

License

Stars

Watchers

Forks

Packages

No packages published