PHP code example of ijackua / yii2-lepture-markdown-editor-widget

1. Go to this page and download the library: Download ijackua/yii2-lepture-markdown-editor-widget 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/ */

    

ijackua / yii2-lepture-markdown-editor-widget example snippets


use ijackua\lepture\Markdowneditor;

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

use ijackua\lepture\Markdowneditor;

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

use ijackua\lepture\Markdowneditor;

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

use ijackua\lepture\Markdowneditor;

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