mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-12-22 13:45:02 +00:00
Add help section for parsedown parser.
This commit is contained in:
parent
4e123577ce
commit
66ae937cc7
3 changed files with 27 additions and 1 deletions
|
@ -3706,6 +3706,8 @@ register_module([
|
|||
"description" => "An upgraded parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds a some weight to your installation, and also requires write access to the disk on first load.",
|
||||
"id" => "parser-parsedown",
|
||||
"code" => function() {
|
||||
global $settings;
|
||||
|
||||
$parser = new PeppermintParsedown();
|
||||
$parser->setInternalLinkBase("?page=%s");
|
||||
add_parser("parsedown", function($source) use ($parser) {
|
||||
|
@ -3713,6 +3715,17 @@ register_module([
|
|||
|
||||
return $result;
|
||||
});
|
||||
|
||||
add_help_section("20-parser-default", "Editor Syntax",
|
||||
"<p>$settings->sitename's editor uses an extended version of <a href='http://parsedown.org/'>Parsedown</a> to render pages, which is a fantastic open source Github flavoured markdown parser. You can find a quick reference guide on Github flavoured markdown <a href='https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet'>here</a> by <a href='https://github.com/adam-p/'>adam-p</a>, or if you prefer a book <a href='https://www.gitbook.com/book/roachhd/master-markdown/details'>Mastering Markdown</a> by KB is a good read, and free too!</p>
|
||||
<h3>Extra Syntax</h3>
|
||||
<p>$settings->sitename's editor also supports some extra custom syntax, some of which is inspired by <a href='https://mediawiki.org/'>Mediawiki</a>.
|
||||
<table>
|
||||
<tr><th style='width: 40%'>Type this</th><th style='width: 20%'>To get this</th><th>Comments</th></th>
|
||||
<tr><td><code>[[Internal link]]</code></td><td><a href='?page=Internal%20link'>Internal Link</a></td><td>An internal link.</td></tr>
|
||||
<tr><td><code>[[Display Text|Internal link]]</code></td><td><a href='?page=Internal%20link'>Display Text</a></td><td>An internal link with some display text.</td></tr>
|
||||
<tr><td><code>![Alt text](http://example.com/path/to/image.png | 256x256 | right)</code></td><td><img src='http://example.com/path/to/image.png' alt='Alt text' style='float: right; max-width: 256px; max-height: 256px;' /></td><td>An image floating to the right of the page that fits inside a 256px x 256px box, preserving aspect ratio.</td></tr>
|
||||
</table>");
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@
|
|||
"author": "Johnny Broadway, Emanuil Rusev & Starbeamrainbowlabs",
|
||||
"description": "An upgraded parser based on Emanuil Rusev's Parsedown Extra PHP library (https:\/\/github.com\/erusev\/parsedown-extra), which is licensed MIT. Please be careful, as this module adds a some weight to your installation, and also requires write access to the disk on first load.",
|
||||
"id": "parser-parsedown",
|
||||
"lastupdate": 1457796287,
|
||||
"lastupdate": 1457807249,
|
||||
"optional": false
|
||||
}
|
||||
]
|
|
@ -6,6 +6,8 @@ register_module([
|
|||
"description" => "An upgraded parser based on Emanuil Rusev's Parsedown Extra PHP library (https://github.com/erusev/parsedown-extra), which is licensed MIT. Please be careful, as this module adds a some weight to your installation, and also requires write access to the disk on first load.",
|
||||
"id" => "parser-parsedown",
|
||||
"code" => function() {
|
||||
global $settings;
|
||||
|
||||
$parser = new PeppermintParsedown();
|
||||
$parser->setInternalLinkBase("?page=%s");
|
||||
add_parser("parsedown", function($source) use ($parser) {
|
||||
|
@ -13,6 +15,17 @@ register_module([
|
|||
|
||||
return $result;
|
||||
});
|
||||
|
||||
add_help_section("20-parser-default", "Editor Syntax",
|
||||
"<p>$settings->sitename's editor uses an extended version of <a href='http://parsedown.org/'>Parsedown</a> to render pages, which is a fantastic open source Github flavoured markdown parser. You can find a quick reference guide on Github flavoured markdown <a href='https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet'>here</a> by <a href='https://github.com/adam-p/'>adam-p</a>, or if you prefer a book <a href='https://www.gitbook.com/book/roachhd/master-markdown/details'>Mastering Markdown</a> by KB is a good read, and free too!</p>
|
||||
<h3>Extra Syntax</h3>
|
||||
<p>$settings->sitename's editor also supports some extra custom syntax, some of which is inspired by <a href='https://mediawiki.org/'>Mediawiki</a>.
|
||||
<table>
|
||||
<tr><th style='width: 40%'>Type this</th><th style='width: 20%'>To get this</th><th>Comments</th></th>
|
||||
<tr><td><code>[[Internal link]]</code></td><td><a href='?page=Internal%20link'>Internal Link</a></td><td>An internal link.</td></tr>
|
||||
<tr><td><code>[[Display Text|Internal link]]</code></td><td><a href='?page=Internal%20link'>Display Text</a></td><td>An internal link with some display text.</td></tr>
|
||||
<tr><td><code>![Alt text](http://example.com/path/to/image.png | 256x256 | right)</code></td><td><img src='http://example.com/path/to/image.png' alt='Alt text' style='float: right; max-width: 256px; max-height: 256px;' /></td><td>An image floating to the right of the page that fits inside a 256px x 256px box, preserving aspect ratio.</td></tr>
|
||||
</table>");
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue