diff options
Diffstat (limited to 'client/src/app/core/plugins/plugin.service.ts')
-rw-r--r-- | client/src/app/core/plugins/plugin.service.ts | 12 |
1 files changed, 12 insertions, 0 deletions
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' | |||
15 | import { AuthService } from '@app/core/auth' | 15 | import { AuthService } from '@app/core/auth' |
16 | import { Notifier } from '@app/core/notification' | 16 | import { Notifier } from '@app/core/notification' |
17 | import { RestExtractor } from '@app/shared/rest' | 17 | import { RestExtractor } from '@app/shared/rest' |
18 | import { MarkdownService } from '@app/shared/renderer' | ||
18 | import { PluginType } from '@shared/models/plugins/plugin.type' | 19 | import { PluginType } from '@shared/models/plugins/plugin.type' |
19 | import { PublicServerSetting } from '@shared/models/plugins/public-server.setting' | 20 | import { PublicServerSetting } from '@shared/models/plugins/public-server.setting' |
20 | import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' | 21 | import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' |
@@ -65,6 +66,7 @@ export class PluginService implements ClientHook { | |||
65 | private router: Router, | 66 | private router: Router, |
66 | private authService: AuthService, | 67 | private authService: AuthService, |
67 | private notifier: Notifier, | 68 | private notifier: Notifier, |
69 | private markdownRenderer: MarkdownService, | ||
68 | private server: ServerService, | 70 | private server: ServerService, |
69 | private zone: NgZone, | 71 | private zone: NgZone, |
70 | private authHttp: HttpClient, | 72 | private authHttp: HttpClient, |
@@ -297,6 +299,16 @@ export class PluginService implements ClientHook { | |||
297 | this.customModal.show(input) | 299 | this.customModal.show(input) |
298 | }, | 300 | }, |
299 | 301 | ||
302 | markdownRenderer: { | ||
303 | textMarkdownToHTML: (textMarkdown: string) => { | ||
304 | return this.markdownRenderer.textMarkdownToHTML(textMarkdown) | ||
305 | }, | ||
306 | |||
307 | enhancedMarkdownToHTML: (enhancedMarkdown: string) => { | ||
308 | return this.markdownRenderer.enhancedMarkdownToHTML(enhancedMarkdown) | ||
309 | } | ||
310 | }, | ||
311 | |||
300 | translate: (value: string) => { | 312 | translate: (value: string) => { |
301 | return this.translationsObservable | 313 | return this.translationsObservable |
302 | .pipe(map(allTranslations => allTranslations[npmName])) | 314 | .pipe(map(allTranslations => allTranslations[npmName])) |