nodebb-plugin-markdown 12.1.7 → 12.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,191 +2,195 @@
2
2
  <!-- IMPORT admin/partials/settings/header.tpl -->
3
3
 
4
4
  <div class="row m-0">
5
- <div id="spy-container" class="col-12 px-0 mb-4" tabindex="0">
5
+ <div id="spy-container" class="col-12 col-md-8 px-0 mb-4" tabindex="0">
6
6
  <form class="form markdown-settings">
7
- <div class="card">
8
- <div class="card-header">Markdown</div>
9
- <div class="card-body">
10
- <div class="row">
11
- <div class="col-lg-6">
12
- <div class="mb-3 form-check">
13
- <input type="checkbox" class="form-check-input" name="xhtmlOut" id="xhtmlOut" />
14
- <label class="form-check-label" for="xhtmlOut">
15
- Use '/' to close single tags (<code>&lt;br /&gt;</code>)
16
- </label>
17
- </div>
18
- <div class="mb-3 form-check">
19
- <input type="checkbox" class="form-check-input" name="breaks" id="breaks" />
20
- <label class="form-check-label" for="breaks">
21
- Treat newlines as single line breaks
22
- </label>
23
- </div>
24
- <div class="mb-3 form-check">
25
- <input type="checkbox" class="form-check-input" name="typographer" id="typographer" />
26
- <label class="form-check-label" for="typographer">
27
- Enable smartypants and other sweet transforms (e.g. <code>(c)</code> &rarr; <code>&copy;</code>)
28
- </label>
29
- </div>
30
- <div class="mb-3 form-check">
31
- <input type="checkbox" class="form-check-input" name="multimdTables" id="multimdTables" />
32
- <label class="form-check-label" for="multimdTables">
33
- Allow advanced table syntax
34
- </label>
35
- </div>
36
- </div>
37
- <div class="col-lg-6">
38
- <div class="mb-3 form-check">
39
- <input type="checkbox" class="form-check-input" name="linkify" id="linkify" />
40
- <label class="form-check-label" for="linkify">
41
- Autoconvert url-like texts to links
42
- </label>
43
- </div>
44
- <div class="mb-3 form-check">
45
- <input type="checkbox" class="form-check-input" name="externalBlank" id="externalBlank" />
46
- <label class="form-check-label" for="externalBlank">
47
- Open external links in a new tab/window
48
- </label>
49
- </div>
50
- <div class="mb-3 form-check">
51
- <input type="checkbox" class="form-check-input" name="nofollow" id="nofollow" />
52
- <label class="form-check-label" for="nofollow">
53
- Tell web crawlers that external links are not to be followed
54
- </label>
55
- </div>
56
- <div class="mb-3 form-check">
57
- <input type="checkbox" class="form-check-input" name="allowRTLO" id="allowRTLO" />
58
- <label class="form-check-label" for="allowRTLO">
59
- Allow RTL override unicode in link content
60
- </label>
61
- </div>
62
- <div class="mb-3 form-check">
63
- <input type="checkbox" class="form-check-input" name="checkboxes" id="checkboxes" />
64
- <label class="form-check-label" for="checkboxes">
65
- Interpret <code>[ ]</code> and <code>[x]</code> as checkboxes
66
- </label>
67
- </div>
68
- </div>
69
- </div>
7
+ <div class="mb-4">
8
+ <h5 class="fw-bold tracking-tight settings-header">Parser</h5>
9
+
10
+ <div class="mb-3 form-check form-switch">
11
+ <input type="checkbox" class="form-check-input" name="xhtmlOut" id="xhtmlOut" />
12
+ <label class="form-check-label" for="xhtmlOut">
13
+ Use '/' to close single tags (<code>&lt;br /&gt;</code>)
14
+ </label>
15
+ </div>
16
+ <div class="mb-3 form-check form-switch">
17
+ <input type="checkbox" class="form-check-input" name="breaks" id="breaks" />
18
+ <label class="form-check-label" for="breaks">
19
+ Treat newlines as single line breaks
20
+ </label>
21
+ </div>
22
+ <div class="mb-3 form-check form-switch">
23
+ <input type="checkbox" class="form-check-input" name="typographer" id="typographer" />
24
+ <label class="form-check-label" for="typographer">
25
+ Enable smartypants and other sweet transforms (e.g. <code>(c)</code> &rarr; <code>&copy;</code>)
26
+ </label>
27
+ </div>
28
+ <div class="mb-3 form-check form-switch">
29
+ <input type="checkbox" class="form-check-input" name="multimdTables" id="multimdTables" />
30
+ <label class="form-check-label" for="multimdTables">
31
+ Allow advanced table syntax
32
+ </label>
33
+ </div>
34
+
35
+ <div class="mb-3 form-check form-switch">
36
+ <input type="checkbox" class="form-check-input" name="linkify" id="linkify" />
37
+ <label class="form-check-label" for="linkify">
38
+ Autoconvert url-like texts to links
39
+ </label>
40
+ </div>
41
+ <div class="mb-3 form-check form-switch">
42
+ <input type="checkbox" class="form-check-input" name="allowRTLO" id="allowRTLO" />
43
+ <label class="form-check-label" for="allowRTLO">
44
+ Allow RTL override unicode in link content
45
+ </label>
46
+ </div>
47
+ <div class="mb-3 form-check form-switch">
48
+ <input type="checkbox" class="form-check-input" name="checkboxes" id="checkboxes" />
49
+ <label class="form-check-label" for="checkboxes">
50
+ Interpret <code>[ ]</code> and <code>[x]</code> as checkboxes
51
+ </label>
70
52
  </div>
71
53
  </div>
72
- <div class="row">
73
- <div class="col-sm-6">
74
- <div class="card">
75
- <div class="card-header">Code Formatting</div>
76
- <div class="card-body">
77
- <div class="mb-3 form-check">
78
- <input type="checkbox" class="form-check-input" name="highlight" id="highlight" />
79
- <label class="form-check-label" for="highlight">
80
- Automatically detect and highlight code blocks
81
- </label>
82
- </div>
83
-
84
- <div class="mb-3">
85
- <label class="form-label" for="highlightTheme">Use this theme for highlighted code blocks</label>
86
- <select class="form-select" name="highlightTheme" id="highlightTheme">
87
- {{{ each themes }}}
88
- <option value="{@value}">{@value}</option>
89
- {{{ end }}}
90
- </select>
91
- </div>
92
-
93
- <div class="mb-3">
94
- <label class="form-label" for="defaultHighlightLanguage">
95
- Default language for code blocks with no language defined
96
- </label>
97
- <input class="form-control" placeholder="e.g. js" type="text" name="defaultHighlightLanguage" id="defaultHighlightLanguage" />
98
- <p class="form-text">Leave blank to use auto-language detection</p>
99
- </div>
100
-
101
- <div class="mb-3">
102
- <label class="form-label" for="langPrefix">
103
- Prefix for <code>code</code> blocks
104
- </label>
105
- <input class="form-control" placeholder="language-" type="text" name="langPrefix" id="langPrefix" />
106
- </div>
107
-
108
- <div class="mb-3">
109
- <label class="form-label" for="hljsLanguages">Apply syntax highlighting to the following languages</label>
110
- <select class="form-select" multiple="true" name="hljsLanguages" id="hljsLanguages" size="20">
111
- <optgroup label="Pre-defined lists">
112
- <option value="all">All supported languages (greatest file size)</option>
113
- <option value="common" selected>Common languages (a good compromise)</option>
114
- </optgroup>
115
- <optgroup label="Individual languages">
116
- {{{ each hljsLanguages }}}
117
- <option value="{@value}">{@value}</option>
118
- {{{ end }}}
119
- </optgroup>
120
- </select>
121
- <p class="form-text">
122
- You can use <code>ctrl</code> and <code>shift</code> to select/deselect multiple
123
- items and select/deselect items in ranges. <em>(Default: "Common languages".)</em>
124
- </p>
125
- <p class="form-text">
126
- You are able to mix and match any of the items above, although "All" will include
127
- everything anyway.
128
- </p>
129
- </div>
130
-
131
- <div class="mb-3">
132
- <label class="form-label" for="highlightLinesLanguageList">
133
- Enable line numbers for the following languages
134
- </label>
135
- <select class="form-select" multiple="true" name="highlightLinesLanguageList" id="highlightLinesLanguageList" size="20">
136
- {{{ each hljsLanguages }}}
137
- <option value="{@value}">{@value}</option>
138
- {{{ end }}}
139
- </select>
140
- <p class="form-text">
141
- You can use <code>ctrl</code> and <code>shift</code> to select/deselect multiple
142
- items and select/deselect items in ranges.
143
- </p>
144
- </div>
145
- </div>
146
- </div>
147
- </div>
148
- <div class="col-sm-6">
149
- <div class="card">
150
- <div class="card-header">Images</div>
151
- <div class="card-body">
152
- <div class="mb-3 form-check">
153
- <input type="checkbox" class="form-check-input" name="probe" id="probe" />
154
- <label class="form-check-label" for="probe">
155
- Append image sizes for externally linked images
156
- </label>
157
- </div>
158
- <div class="mb-3">
159
- <label class="form-label" for="probeCacheSize">Cache size (number of images)</label>
160
- <input class="form-control" type="number" id="probeCacheSize" name="probeCacheSize" placeholder="256 (Default)" />
161
- <p class="form-text">
162
- Markdown automatically saves image sizes so as to not make too many unnecessary calls. It remembers this value for 24 hours, to a maximum number of images as defined here. Increase this number if your forum posts contain links to many external images.
163
- </p>
164
- </div>
165
- </div>
166
- </div>
167
- <div class="card">
168
- <div class="card-header bg-danger text-light">Danger Zone</div>
169
- <div class="card-body">
170
- <div class="mb-3 form-check">
171
- <input type="checkbox" class="form-check-input" name="html" id="html" />
172
- <label class="form-check-label" for="html">
173
- Allow HTML
174
- </label>
175
- </div>
176
- <div class="alert alert-warning">
177
- <strong><i class="icon-warning-sign"></i> Careful!</strong>
178
- <p>
179
- Automatic HTML sanitization is an important part of ensuring that
180
- your users do not run arbitrary javascript or alter parts of the
181
- page that were not meant to be altered. If this option is checked,
182
- beware the consequences!
183
- </p>
184
- </div>
185
- </div>
186
- </div>
54
+
55
+ <div class="mb-4">
56
+ <h5 class="fw-bold tracking-tight settings-header">External Links</h5>
57
+
58
+ <div class="mb-3 form-check form-switch">
59
+ <input type="checkbox" class="form-check-input" name="externalMark" id="externalMark" />
60
+ <label class="form-check-label" for="externalMark">
61
+ Append a <i class="fa fa-external-link small"></i> to all external links
62
+ </label>
63
+ </div>
64
+ <div class="mb-3 form-check form-switch">
65
+ <input type="checkbox" class="form-check-input" name="externalBlank" id="externalBlank" />
66
+ <label class="form-check-label" for="externalBlank">
67
+ Open external links in a new tab/window
68
+ </label>
69
+ </div>
70
+ <div class="mb-3 form-check form-switch">
71
+ <input type="checkbox" class="form-check-input" name="nofollow" id="nofollow" />
72
+ <label class="form-check-label" for="nofollow">
73
+ Tell web crawlers that external links are not to be followed
74
+ </label>
75
+ </div>
76
+ </div>
77
+
78
+ <div class="mb-4">
79
+ <h5 class="fw-bold tracking-tight settings-header">Code Formatting</h5>
80
+
81
+ <div class="mb-3 form-check form-switch">
82
+ <input type="checkbox" class="form-check-input" name="highlight" id="highlight" />
83
+ <label class="form-check-label" for="highlight">
84
+ Automatically detect and highlight code blocks
85
+ </label>
86
+ </div>
87
+
88
+ <div class="mb-3">
89
+ <label class="form-label" for="highlightTheme">Use this theme for highlighted code blocks</label>
90
+ <select class="form-select" name="highlightTheme" id="highlightTheme">
91
+ {{{ each themes }}}
92
+ <option value="{@value}">{@value}</option>
93
+ {{{ end }}}
94
+ </select>
95
+ </div>
96
+
97
+ <div class="mb-3">
98
+ <label class="form-label" for="defaultHighlightLanguage">
99
+ Default language for code blocks with no language defined
100
+ </label>
101
+ <input class="form-control" placeholder="e.g. js" type="text" name="defaultHighlightLanguage" id="defaultHighlightLanguage" />
102
+ <p class="form-text">Leave blank to use auto-language detection</p>
103
+ </div>
104
+
105
+ <div class="mb-3">
106
+ <label class="form-label" for="langPrefix">
107
+ Prefix for <code>code</code> blocks
108
+ </label>
109
+ <input class="form-control" placeholder="language-" type="text" name="langPrefix" id="langPrefix" />
110
+ </div>
111
+
112
+ <div class="mb-3">
113
+ <label class="form-label" for="hljsLanguages">Apply syntax highlighting to the following languages</label>
114
+ <select class="form-select" multiple="true" name="hljsLanguages" id="hljsLanguages" size="20">
115
+ <optgroup label="Pre-defined lists">
116
+ <option value="all">All supported languages (greatest file size)</option>
117
+ <option value="common" selected>Common languages (a good compromise)</option>
118
+ </optgroup>
119
+ <optgroup label="Individual languages">
120
+ {{{ each hljsLanguages }}}
121
+ <option value="{@value}">{@value}</option>
122
+ {{{ end }}}
123
+ </optgroup>
124
+ </select>
125
+ <p class="form-text">
126
+ You can use <code>ctrl</code> and <code>shift</code> to select/deselect multiple
127
+ items and select/deselect items in ranges. <em>(Default: "Common languages".)</em>
128
+ </p>
129
+ <p class="form-text">
130
+ You are able to mix and match any of the items above, although "All" will include
131
+ everything anyway.
132
+ </p>
133
+ </div>
134
+
135
+ <div class="mb-3">
136
+ <label class="form-label" for="highlightLinesLanguageList">
137
+ Enable line numbers for the following languages
138
+ </label>
139
+ <select class="form-select" multiple="true" name="highlightLinesLanguageList" id="highlightLinesLanguageList" size="20">
140
+ {{{ each hljsLanguages }}}
141
+ <option value="{@value}">{@value}</option>
142
+ {{{ end }}}
143
+ </select>
144
+ <p class="form-text">
145
+ You can use <code>ctrl</code> and <code>shift</code> to select/deselect multiple
146
+ items and select/deselect items in ranges.
147
+ </p>
148
+ </div>
149
+ </div>
150
+
151
+ <div class="mb-4">
152
+ <h5 class="fw-bold tracking-tight settings-header">Images</h5>
153
+
154
+ <div class="mb-3 form-check form-switch">
155
+ <input type="checkbox" class="form-check-input" name="probe" id="probe" />
156
+ <label class="form-check-label" for="probe">
157
+ Append image sizes for externally linked images
158
+ </label>
159
+ </div>
160
+ <div class="mb-3">
161
+ <label class="form-label" for="probeCacheSize">Cache size (number of images)</label>
162
+ <input class="form-control" type="number" id="probeCacheSize" name="probeCacheSize" placeholder="256 (Default)" />
163
+ <p class="form-text">
164
+ Markdown automatically saves image sizes so as to not make too many unnecessary calls. It remembers this value for 24 hours, to a maximum number of images as defined here. Increase this number if your forum posts contain links to many external images.
165
+ </p>
166
+ </div>
167
+ </div>
168
+
169
+ <div class="mb-4">
170
+ <h5 class="fw-bold tracking-tight settings-header">HTML Sanitization</h5>
171
+
172
+ <div class="mb-3 form-check form-switch">
173
+ <input type="checkbox" class="form-check-input" name="html" id="html" />
174
+ <label class="form-check-label" for="html">
175
+ Allow HTML
176
+ </label>
177
+ </div>
178
+ <div class="alert alert-warning">
179
+ <strong><i class="fa fa-info-circle"></i> History</strong>
180
+ <p>
181
+ Automatic HTML sanitization is an important part of ensuring that
182
+ your users do not run arbitrary javascript or alter parts of the
183
+ page that were not meant to be altered.
184
+ </p>
185
+ <p>
186
+ This used to be the sole line of defense from rogue HTML in user-generated content.
187
+ However, NodeBB now comes with its own built-in HTML sanitizer so it is safe to disable this one if necessary.
188
+ </p>
187
189
  </div>
188
190
  </div>
189
191
  </form>
190
192
  </div>
193
+
194
+ <!-- IMPORT admin/partials/settings/toc.tpl -->
191
195
  </div>
192
- </div>
196
+ </div>