• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Markdown Support

Jeremy

Well-known member
#2
I don't believe there is an add-on for it, or any instructions on how to do it. However, you should be able to extend XenForo_BbCode_Parser::render($text, $extraStates) to call a Markdown parse renderer (into BB Code or straight HTML, HTML would most likely be better) and then send then call the internal render function. So...

PHP:
class MarkdownEditor extends XFCP_MarkdownEditor
{
	public function render($text, array $extraStates = array())
	{
		$text = $this->_renderMarkdown($text);
		
		return parent::render($text, $extraStates);
	}
}
 

Fuhrmann

Well-known member
#3
Looks like the XenForo_BbCode_Parser is never called using the code event listener load_class_bb_code. How do I extend this class?
 

katsulynx

Well-known member
#8
I'm not 100% happy with the implementation yet, but I'm a bit short on time until april 7th, so that's the earliest date I can continue