1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Some basic markdown support. Use bbcode [markdown][/markdown]

This commit is contained in:
Cameron
2013-05-20 17:57:35 -07:00
parent 67f9c655a7
commit 0aa3fb4c10
3 changed files with 1784 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
<?php
/**
* Copyright (C) e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* DIV block bbcode
*/
if (!defined('e107_INIT')) { exit; }
class bb_markdown extends e_bb_base
{
/**
* Called prior to save
* Re-assemble the bbcode
*/
function toDB($code_text, $parm)
{
return '[markdown]'.$code_text.'[/markdown]';
}
/**
* Convert Markdown
*/
function toHTML($code_text, $parm)
{
require_once(e_HANDLER."markdown.php");
return Markdown($code_text);
}
}
?>

View File

@@ -44,7 +44,7 @@ class e_bbcode
'b', 'justify', 'file', 'stream', 'b', 'justify', 'file', 'stream',
'textarea', 'list', 'php', 'time', 'textarea', 'list', 'php', 'time',
'spoiler', 'hide', 'youtube', 'sanitised', 'spoiler', 'hide', 'youtube', 'sanitised',
'p', 'h', 'nobr', 'block','table','tr','tbody','td' 'p', 'h', 'nobr', 'block','table','tr','tbody','td','markdown'
); );
foreach($this->core_bb as $c) foreach($this->core_bb as $c)

1743
e107_handlers/markdown.php Normal file

File diff suppressed because it is too large Load Diff