mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 02:10:37 +02:00
Markdown Plugin #230
This commit is contained in:
32
plugins/markdown/markdown.plugin.php
Normal file
32
plugins/markdown/markdown.plugin.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Markdown plugin
|
||||
*
|
||||
* @package Monstra
|
||||
* @subpackage Plugins
|
||||
* @author Romanenko Sergey / Awilum
|
||||
* @copyright 2014 Romanenko Sergey / Awilum
|
||||
* @version 1.0.0
|
||||
*
|
||||
*/
|
||||
|
||||
// Register plugin
|
||||
Plugin::register( __FILE__,
|
||||
__('Markdown'),
|
||||
__('Markdown markup language plugin for Monstra'),
|
||||
'1.0.0',
|
||||
'Awilum',
|
||||
'http://monstra.org/');
|
||||
|
||||
// Add new filter
|
||||
Filter::add('content', 'markdown', 1);
|
||||
|
||||
use \Michelf\MarkdownExtra;
|
||||
include PLUGINS . '/markdown/php-markdown/Michelf/Markdown.php';
|
||||
include PLUGINS . '/markdown/php-markdown/Michelf/MarkdownExtra.php';
|
||||
|
||||
function markdown($content)
|
||||
{
|
||||
return MarkdownExtra::defaultTransform($content);
|
||||
}
|
Reference in New Issue
Block a user