From 2bee9db56ade2b3b1bb0efa8716840d87efdb93f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 30 Jul 2021 13:58:18 +0200 Subject: Update plugin doc --- support/doc/plugins/guide.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'support/doc') 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 (...) { type: 'input', // type: 'input' | 'input-checkbox' | 'input-password' | 'input-textarea' | 'markdown-text' | 'markdown-enhanced' | 'select' | 'html' + // If type: 'select', give the select available options + options: [ + { label: 'Label 1', value: 'value1' }, + { label: 'Label 2', value: 'value2' } + ], + + // If type: 'html', set the HTML that will be injected in the page + html: 'Hello

' + // Optional descriptionHTML: 'The purpose of this field is...', @@ -196,7 +205,7 @@ function register (...) { result['admin-name] settingsManager.onSettingsChange(settings => { - settings['admin-name]) + settings['admin-name'] }) } ``` @@ -237,12 +246,12 @@ function register ({ You can add/delete video categories, licences or languages using the appropriate constant managers: ```js -function register ({ - videoLanguageManager, - videoCategoryManager, - videoLicenceManager, - videoPrivacyManager, - playlistPrivacyManager +function register ({ + videoLanguageManager, + videoCategoryManager, + videoLicenceManager, + videoPrivacyManager, + playlistPrivacyManager }) { videoLanguageManager.addConstant('al_bhed', 'Al Bhed') videoLanguageManager.deleteConstant('fr') -- cgit v1.2.3