ijackua/yii2-lepture-markdown-editor-widget

This package is abandoned and no longer maintained. No replacement package was suggested.

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

Installs: 2 420

Dependents: 2

Suggesters: 0

Security: 0

Stars: 49

Watchers: 2

Forks: 5

Open Issues: 1

Language:JavaScript

Type:yii2-extension

1.0.0 2014-03-29 19:06 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:33:27 UTC


README

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.