Update plugin guides toc

pull/3105/head
Chocobozzz 2020-08-21 16:05:11 +02:00
parent e08a26e23d
commit 8546fe878d
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 5 additions and 3 deletions

View File

@ -21,6 +21,7 @@
- [Custom Modal](#custom-modal)
- [Translate](#translate)
- [Get public settings](#get-public-settings)
- [Add custom fields to video form](#add-custom-fields-to-video-form)
- [Publishing](#publishing)
- [Write a plugin/theme](#write-a-plugintheme)
- [Clone the quickstart repository](#clone-the-quickstart-repository)
@ -29,6 +30,7 @@
- [Update package.json](#update-packagejson)
- [Write code](#write-code)
- [Add translations](#add-translations)
- [Build your plugin](#build-your-plugin)
- [Test your plugin/theme](#test-your-plugintheme)
- [Publish](#publish)
- [Plugin & Theme hooks/helpers API](#plugin--theme-hookshelpers-api)
@ -379,11 +381,11 @@ peertubeHelpers.getSettings()
})
```
### Add custom fields to video form
#### Add custom fields to video form
To add custom fields in the video form (in *Plugin settings* tab):
```
```js
async function register ({ registerVideoField, peertubeHelpers }) {
const descriptionHTML = await peertubeHelpers.translate(descriptionSource)
const commonOptions = {
@ -404,7 +406,7 @@ PeerTube will send this field value in `body.pluginData['my-field-name']` and fe
So for example, if you want to store an additional metadata for videos, register the following hooks in **server**:
```
```js
async function register ({
registerHook,
storageManager