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.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md
index 7f359d408..2bd3fb6d2 100644
--- a/support/doc/plugins/guide.md
+++ b/support/doc/plugins/guide.md
@@ -21,6 +21,7 @@
21 - [Custom Modal](#custom-modal) 21 - [Custom Modal](#custom-modal)
22 - [Translate](#translate) 22 - [Translate](#translate)
23 - [Get public settings](#get-public-settings) 23 - [Get public settings](#get-public-settings)
24 - [Add custom fields to video form](#add-custom-fields-to-video-form)
24 - [Publishing](#publishing) 25 - [Publishing](#publishing)
25- [Write a plugin/theme](#write-a-plugintheme) 26- [Write a plugin/theme](#write-a-plugintheme)
26 - [Clone the quickstart repository](#clone-the-quickstart-repository) 27 - [Clone the quickstart repository](#clone-the-quickstart-repository)
@@ -29,6 +30,7 @@
29 - [Update package.json](#update-packagejson) 30 - [Update package.json](#update-packagejson)
30 - [Write code](#write-code) 31 - [Write code](#write-code)
31 - [Add translations](#add-translations) 32 - [Add translations](#add-translations)
33 - [Build your plugin](#build-your-plugin)
32 - [Test your plugin/theme](#test-your-plugintheme) 34 - [Test your plugin/theme](#test-your-plugintheme)
33 - [Publish](#publish) 35 - [Publish](#publish)
34- [Plugin & Theme hooks/helpers API](#plugin--theme-hookshelpers-api) 36- [Plugin & Theme hooks/helpers API](#plugin--theme-hookshelpers-api)
@@ -379,11 +381,11 @@ peertubeHelpers.getSettings()
379 }) 381 })
380``` 382```
381 383
382### Add custom fields to video form 384#### Add custom fields to video form
383 385
384To add custom fields in the video form (in *Plugin settings* tab): 386To add custom fields in the video form (in *Plugin settings* tab):
385 387
386``` 388```js
387async function register ({ registerVideoField, peertubeHelpers }) { 389async function register ({ registerVideoField, peertubeHelpers }) {
388 const descriptionHTML = await peertubeHelpers.translate(descriptionSource) 390 const descriptionHTML = await peertubeHelpers.translate(descriptionSource)
389 const commonOptions = { 391 const commonOptions = {
@@ -404,7 +406,7 @@ PeerTube will send this field value in `body.pluginData['my-field-name']` and fe
404 406
405So for example, if you want to store an additional metadata for videos, register the following hooks in **server**: 407So for example, if you want to store an additional metadata for videos, register the following hooks in **server**:
406 408
407``` 409```js
408async function register ({ 410async function register ({
409 registerHook, 411 registerHook,
410 storageManager 412 storageManager