]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - plugins/markdown/README.md
Describe markdown HTML rendering and display a warning
[github/shaarli/Shaarli.git] / plugins / markdown / README.md
CommitLineData
14563582
A
1## Markdown Shaarli plugin
2
3Convert all your shaares description to HTML formatted Markdown.
4
340252ae
A
5[Read more about Markdown syntax](http://daringfireball.net/projects/markdown/syntax).
6
7Markdown processing is done with [Parsedown library](https://github.com/erusev/parsedown).
14563582
A
8
9### Installation
10
340252ae
A
11As a default plugin, it should already be in `tpl/plugins/` directory.
12If not, download and unpack it there.
13
14563582
A
14The directory structure should look like:
15
16```
340252ae
A
17--- plugins
18 |--- markdown
19 |--- help.html
20 |--- markdown.css
21 |--- markdown.meta
22 |--- markdown.php
23 |--- Parsedown.php
24 |--- README.md
14563582
A
25```
26
340252ae
A
27To enable the plugin, just check it in the plugin administration page.
28
29You can also add `markdown` to your list of enabled plugins in `data/config.php`
14563582
A
30(`ENABLED_PLUGINS` array).
31
32This should look like:
33
34```
35$GLOBALS['config']['ENABLED_PLUGINS'] = array('qrcode', 'any_other_plugin', 'markdown')
36```
37
340252ae
A
38### No Markdown tag
39
40If the tag `.nomarkdown` is set for a shaare, it won't be converted to Markdown syntax.
41
42> Note: it's a private tag (leading dot), so it won't be displayed to visitors.
43
3d8f5cf8
A
44### HTML rendering
45
46Markdown support HTML tags. For example:
47
48 > <strong>strong</strong><strike>strike</strike>
49
50Will render as:
51
52> <strong>strong</strong><strike>strike</strike>
53
54If you want to shaare HTML code, it is necessary to use inline code or code blocks.
55
56**If your shaared descriptions containing HTML tags before enabling the markdown plugin,
57enabling it might break your page.**
58
59> Note: HTML tags such as script, iframe, etc. are disabled for security reasons.
60
14563582
A
61### Known issue
62
63#### Redirector
64
65If you're using a redirector, you *need* to add a space after a link,
66otherwise the rest of the line will be `urlencode`.
67
68```
69[link](http://domain.tld)-->test
70```
71
72Will consider `http://domain.tld)-->test` as URL.
73
74Instead, add an additional space.
75
76```
77[link](http://domain.tld) -->test
78```
79
80> Won't fix because a `)` is a valid part of an URL.