X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Fplugins%2Fplugin.service.ts;h=3ed23160dfb5d9366108ed263f5fe85a22e25b3c;hb=8c7725dc3c01a73bf56a48c8b192d144bfdc3ffe;hp=039fd6ff1ee8108f6a955a223afad790b7b0c8c6;hpb=891bc2ffadd5dedae316fcc80856ff859e6f8336;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts index 039fd6ff1..3ed23160d 100644 --- a/client/src/app/core/plugins/plugin.service.ts +++ b/client/src/app/core/plugins/plugin.service.ts @@ -15,6 +15,7 @@ import { HttpClient } from '@angular/common/http' import { AuthService } from '@app/core/auth' import { Notifier } from '@app/core/notification' import { RestExtractor } from '@app/shared/rest' +import { MarkdownService } from '@app/shared/renderer' import { PluginType } from '@shared/models/plugins/plugin.type' import { PublicServerSetting } from '@shared/models/plugins/public-server.setting' import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' @@ -65,6 +66,7 @@ export class PluginService implements ClientHook { private router: Router, private authService: AuthService, private notifier: Notifier, + private markdownRenderer: MarkdownService, private server: ServerService, private zone: NgZone, private authHttp: HttpClient, @@ -297,6 +299,16 @@ export class PluginService implements ClientHook { this.customModal.show(input) }, + markdownRenderer: { + textMarkdownToHTML: (textMarkdown: string) => { + return this.markdownRenderer.textMarkdownToHTML(textMarkdown) + }, + + enhancedMarkdownToHTML: (enhancedMarkdown: string) => { + return this.markdownRenderer.enhancedMarkdownToHTML(enhancedMarkdown) + } + }, + translate: (value: string) => { return this.translationsObservable .pipe(map(allTranslations => allTranslations[npmName]))