diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-30 13:58:18 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-30 13:58:18 +0200 |
commit | 2bee9db56ade2b3b1bb0efa8716840d87efdb93f (patch) | |
tree | 8aeb695dec7290345662804870e5aec69d8ea8f2 /support/doc | |
parent | 23ca2f7bc942f06ed5653b41f119b84c54f1948d (diff) | |
download | PeerTube-2bee9db56ade2b3b1bb0efa8716840d87efdb93f.tar.gz PeerTube-2bee9db56ade2b3b1bb0efa8716840d87efdb93f.tar.zst PeerTube-2bee9db56ade2b3b1bb0efa8716840d87efdb93f.zip |
Update plugin doc
Diffstat (limited to 'support/doc')
-rw-r--r-- | support/doc/plugins/guide.md | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/support/doc/plugins/guide.md b/support/doc/plugins/guide.md index 85aaf9f02..072c7c6ca 100644 --- a/support/doc/plugins/guide.md +++ b/support/doc/plugins/guide.md | |||
@@ -180,6 +180,15 @@ function register (...) { | |||
180 | type: 'input', | 180 | type: 'input', |
181 | // type: 'input' | 'input-checkbox' | 'input-password' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced' | 'select' | 'html' | 181 | // type: 'input' | 'input-checkbox' | 'input-password' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced' | 'select' | 'html' |
182 | 182 | ||
183 | // If type: 'select', give the select available options | ||
184 | options: [ | ||
185 | { label: 'Label 1', value: 'value1' }, | ||
186 | { label: 'Label 2', value: 'value2' } | ||
187 | ], | ||
188 | |||
189 | // If type: 'html', set the HTML that will be injected in the page | ||
190 | html: '<strong class="...">Hello</strong><br /><br />' | ||
191 | |||
183 | // Optional | 192 | // Optional |
184 | descriptionHTML: 'The purpose of this field is...', | 193 | descriptionHTML: 'The purpose of this field is...', |
185 | 194 | ||
@@ -196,7 +205,7 @@ function register (...) { | |||
196 | result['admin-name] | 205 | result['admin-name] |
197 | 206 | ||
198 | settingsManager.onSettingsChange(settings => { | 207 | settingsManager.onSettingsChange(settings => { |
199 | settings['admin-name]) | 208 | settings['admin-name'] |
200 | }) | 209 | }) |
201 | } | 210 | } |
202 | ``` | 211 | ``` |
@@ -237,12 +246,12 @@ function register ({ | |||
237 | You can add/delete video categories, licences or languages using the appropriate constant managers: | 246 | You can add/delete video categories, licences or languages using the appropriate constant managers: |
238 | 247 | ||
239 | ```js | 248 | ```js |
240 | function register ({ | 249 | function register ({ |
241 | videoLanguageManager, | 250 | videoLanguageManager, |
242 | videoCategoryManager, | 251 | videoCategoryManager, |
243 | videoLicenceManager, | 252 | videoLicenceManager, |
244 | videoPrivacyManager, | 253 | videoPrivacyManager, |
245 | playlistPrivacyManager | 254 | playlistPrivacyManager |
246 | }) { | 255 | }) { |
247 | videoLanguageManager.addConstant('al_bhed', 'Al Bhed') | 256 | videoLanguageManager.addConstant('al_bhed', 'Al Bhed') |
248 | videoLanguageManager.deleteConstant('fr') | 257 | videoLanguageManager.deleteConstant('fr') |