aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/plugins/guide.md
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc/plugins/guide.md')
-rw-r--r--support/doc/plugins/guide.md15
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.')
216notifier.error('Error message content.') 217notifier.error('Error message content.')
217``` 218```
218 219
220#### Markdown Renderer
221
222To render a formatted markdown text to HTML:
223
224```js
225const { markdownRenderer } = peertubeHelpers
226
227await markdownRenderer.textMarkdownToHTML('**My Bold Text**')
228// return <strong>My Bold Text</strong>
229
230await 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
221To show a custom modal: 236To show a custom modal: