在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):jonlabelle/ci-markdown开源软件地址(OpenSource Url):https://github.com/jonlabelle/ci-markdown开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):CI MarkdownCI Markdown is a modified rendition of Michel Fortin's PHP Markdown and PHP Markdown Extra for CodeIgniter. InstallRequirements
DownloadDownload and extract the zip release to your CoddeIgniter
The extracted path should resemble:
UsageConfigurationCustom PHP Markdown settings are defined in the config/markdown.php config file. Initializing the Markdown ClassLike most other classes in CodeIgniter, initialize it from your controller
using the $this->load->library('markdown'); To programmatically configure the Markdown instance, overriding any matched settings defined in the config file: $config = array(
'tab_width' => 2,
'no_markup' => true,
'empty_element_suffix' => '/>'
);
$this->load->library('markdown', $config); Markdown to HTML
Accepts a single $this->load->library('markdown');
$markdownText = "# Heading "."\n"."## Sub-heading";
echo $this->markdown->transform($markdownText);
// <h1>Heading</h1>
// <h2>Sub-heading</h2> Markdown file to HTML
Accepts a single $this->load->library('markdown');
echo $this->markdown->transform_file('/path/to/markdown/file.md');
// <h1>Heading</h1>
// <h2>Sub-heading</h2> IssuesFor all issues including feature requests, please open a new issue. ChangesSee the Changelog page. Credits |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论