From 42760de685bfa805750897ef7bde8f28be452f37 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 24 Apr 2020 14:25:43 +0200 Subject: [PATCH] Add markdown support in hello plugin --- peertube-plugin-hello-world/client/search-client-plugin.js | 3 +++ peertube-plugin-hello-world/main.js | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/peertube-plugin-hello-world/client/search-client-plugin.js b/peertube-plugin-hello-world/client/search-client-plugin.js index d0e8d60..6fe6833 100644 --- a/peertube-plugin-hello-world/client/search-client-plugin.js +++ b/peertube-plugin-hello-world/client/search-client-plugin.js @@ -43,6 +43,9 @@ function register ({ registerHook, peertubeHelpers }) { } }) + + peertubeHelpers.markdownRenderer.textMarkdownToHTML('**My Bold Text**') + .then(v => console.log(v)) } export { diff --git a/peertube-plugin-hello-world/main.js b/peertube-plugin-hello-world/main.js index 755abf4..c98b1d9 100644 --- a/peertube-plugin-hello-world/main.js +++ b/peertube-plugin-hello-world/main.js @@ -48,6 +48,13 @@ async function register ({ private: false }) + registerSetting({ + name: 'my-markdown-area', + label: 'Markdown text', + type: 'markdown-text', + default: false + }) + const value = await storageManager.getData('toto') console.log(value)