diff options
Diffstat (limited to 'support/doc')
-rw-r--r-- | support/doc/plugins/guide.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index e6870ce17..1bee1f611 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md | |||
@@ -149,6 +149,7 @@ registerSetting({ | |||
149 | name: 'admin-name', | 149 | name: 'admin-name', |
150 | label: 'Admin name', | 150 | label: 'Admin name', |
151 | type: 'input', | 151 | type: 'input', |
152 | // type: input | input-checkbox | input-textarea | markdown-text | markdown-enhanced | ||
152 | default: 'my super name' | 153 | default: 'my super name' |
153 | }) | 154 | }) |
154 | 155 | ||
@@ -216,6 +217,20 @@ notifier.success('Success message content.') | |||
216 | notifier.error('Error message content.') | 217 | notifier.error('Error message content.') |
217 | ``` | 218 | ``` |
218 | 219 | ||
220 | #### Markdown Renderer | ||
221 | |||
222 | To render a formatted markdown text to HTML: | ||
223 | |||
224 | ```js | ||
225 | const { markdownRenderer } = peertubeHelpers | ||
226 | |||
227 | await markdownRenderer.textMarkdownToHTML('**My Bold Text**') | ||
228 | // return <strong>My Bold Text</strong> | ||
229 | |||
230 | await markdownRenderer.enhancedMarkdownToHTML('![alt-img](http://.../my-image.jpg)') | ||
231 | // return <img alt=alt-img src=http://.../my-image.jpg /> | ||
232 | ``` | ||
233 | |||
219 | #### Custom Modal | 234 | #### Custom Modal |
220 | 235 | ||
221 | To show a custom modal: | 236 | To show a custom modal: |