diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-12-01 11:40:24 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-12-01 12:44:37 +0100 |
commit | 3d8f5cf84b8baa4a212f5089633af7c640609b62 (patch) | |
tree | 9878fda703fa0dde79e2e7dd13daad50605938d5 | |
parent | 76fb679e38c6237fc2e39c12b829068c374b8372 (diff) | |
download | Shaarli-3d8f5cf84b8baa4a212f5089633af7c640609b62.tar.gz Shaarli-3d8f5cf84b8baa4a212f5089633af7c640609b62.tar.zst Shaarli-3d8f5cf84b8baa4a212f5089633af7c640609b62.zip |
Describe markdown HTML rendering and display a warning
Fixes #688
-rw-r--r-- | inc/shaarli.css | 9 | ||||
-rw-r--r-- | plugins/markdown/README.md | 17 | ||||
-rw-r--r-- | plugins/markdown/markdown.meta | 5 | ||||
-rw-r--r-- | tpl/pluginsadmin.html | 4 |
4 files changed, 32 insertions, 3 deletions
diff --git a/inc/shaarli.css b/inc/shaarli.css index 5808320c..a24d4b7c 100644 --- a/inc/shaarli.css +++ b/inc/shaarli.css | |||
@@ -37,6 +37,10 @@ em { | |||
37 | font-style: italic; | 37 | font-style: italic; |
38 | } | 38 | } |
39 | 39 | ||
40 | strong { | ||
41 | font-weight: bold; | ||
42 | } | ||
43 | |||
40 | /* Buttons */ | 44 | /* Buttons */ |
41 | .bigbutton { | 45 | .bigbutton { |
42 | background-color: #c0c0c0; | 46 | background-color: #c0c0c0; |
@@ -1168,8 +1172,13 @@ ul.errors { | |||
1168 | } | 1172 | } |
1169 | 1173 | ||
1170 | #pluginsadmin a { | 1174 | #pluginsadmin a { |
1175 | color: #486D08; | ||
1176 | } | ||
1177 | |||
1178 | #pluginsadmin a.arrow { | ||
1171 | color: black; | 1179 | color: black; |
1172 | } | 1180 | } |
1181 | |||
1173 | /* 404 page */ | 1182 | /* 404 page */ |
1174 | .error-container { | 1183 | .error-container { |
1175 | 1184 | ||
diff --git a/plugins/markdown/README.md b/plugins/markdown/README.md index 4f021871..c64a831a 100644 --- a/plugins/markdown/README.md +++ b/plugins/markdown/README.md | |||
@@ -41,6 +41,23 @@ If the tag `.nomarkdown` is set for a shaare, it won't be converted to Markdown | |||
41 | 41 | ||
42 | > Note: it's a private tag (leading dot), so it won't be displayed to visitors. | 42 | > Note: it's a private tag (leading dot), so it won't be displayed to visitors. |
43 | 43 | ||
44 | ### HTML rendering | ||
45 | |||
46 | Markdown support HTML tags. For example: | ||
47 | |||
48 | > <strong>strong</strong><strike>strike</strike> | ||
49 | |||
50 | Will render as: | ||
51 | |||
52 | > <strong>strong</strong><strike>strike</strike> | ||
53 | |||
54 | If 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, | ||
57 | enabling it might break your page.** | ||
58 | |||
59 | > Note: HTML tags such as script, iframe, etc. are disabled for security reasons. | ||
60 | |||
44 | ### Known issue | 61 | ### Known issue |
45 | 62 | ||
46 | #### Redirector | 63 | #### Redirector |
diff --git a/plugins/markdown/markdown.meta b/plugins/markdown/markdown.meta index e3904ed8..8df2ed0b 100644 --- a/plugins/markdown/markdown.meta +++ b/plugins/markdown/markdown.meta | |||
@@ -1 +1,4 @@ | |||
1 | description="Render shaare description with Markdown syntax." | 1 | description="Render shaare description with Markdown syntax.<br><strong>Warning</strong>: |
2 | If your shaared descriptions containing HTML tags before enabling the markdown plugin, | ||
3 | enabling it might break your page. | ||
4 | See the <a href=\"https://github.com/shaarli/Shaarli/tree/master/plugins/markdown#html-rendering\">README</a>." | ||
diff --git a/tpl/pluginsadmin.html b/tpl/pluginsadmin.html index 672f4993..ead1734e 100644 --- a/tpl/pluginsadmin.html +++ b/tpl/pluginsadmin.html | |||
@@ -38,11 +38,11 @@ | |||
38 | <tr data-line="{$key}" data-order="{$counter}"> | 38 | <tr data-line="{$key}" data-order="{$counter}"> |
39 | <td class="center"><input type="checkbox" name="{$key}" id="{$key}" checked="checked"></td> | 39 | <td class="center"><input type="checkbox" name="{$key}" id="{$key}" checked="checked"></td> |
40 | <td class="center"> | 40 | <td class="center"> |
41 | <a href="#" | 41 | <a href="#" class="arrow" |
42 | onclick="return orderUp(this.parentNode.parentNode.getAttribute('data-order'));"> | 42 | onclick="return orderUp(this.parentNode.parentNode.getAttribute('data-order'));"> |
43 | ▲ | 43 | ▲ |
44 | </a> | 44 | </a> |
45 | <a href="#" | 45 | <a href="#" class="arrow" |
46 | onclick="return orderDown(this.parentNode.parentNode.getAttribute('data-order'));"> | 46 | onclick="return orderDown(this.parentNode.parentNode.getAttribute('data-order'));"> |
47 | ▼ | 47 | ▼ |
48 | </a> | 48 | </a> |