PHP code example of nikitakls / yii2-editor-md
1. Go to this page and download the library: Download nikitakls/yii2-editor-md 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/ */
nikitakls / yii2-editor-md example snippets
use nikitakls\markdown\EditorMdWidget;
use nikitakls\markdown\behaviors\MarkdownModelBehavior
class Content extents ActiveRecord{
/**
* @inheritdoc
*/
public function behaviors()
{
return [
[
'class' => MarkdownModelBehavior::className(),
'sourceAttribute' => 'content',
'destinationAttribute' => 'clean_content',
],
];
}
}