コード例 #1
0
ファイル: RTE.class.php プロジェクト: schwarer2006/wikia
 /**
  * Parse given wikitext to HTML for CK
  */
 public static function WikitextToHtml($wikitext)
 {
     global $wgTitle;
     wfProfileIn(__METHOD__);
     $options = new ParserOptions();
     // don't show [edit] link for sections
     $options->setEditSection(false);
     // disable headings numbering
     $options->setNumberHeadings(false);
     RTE::$parser = new RTEParser();
     $html = RTE::$parser->parse($wikitext, $wgTitle, $options)->getText();
     wfProfileOut(__METHOD__);
     return $html;
 }