diff --git a/client/src/app/+about/about-instance/about-instance.component.html b/client/src/app/+about/about-instance/about-instance.component.html
index 1f372090e..29dfd89fb 100644
--- a/client/src/app/+about/about-instance/about-instance.component.html
+++ b/client/src/app/+about/about-instance/about-instance.component.html
@@ -91,7 +91,7 @@
@ViewChild('contactAdminModal', { static: true }) contactAdminModal: ContactAdminModalComponent
shortDescription = ''
+ descriptionContent: string
html = {
- description: '',
terms: '',
codeOfConduct: '',
moderationInformation: '',
@@ -40,6 +42,7 @@ export class AboutInstanceComponent implements OnInit, AfterViewChecked {
private lastScrollHash: string
constructor (
+ private customMarkupService: CustomMarkupService,
private viewportScroller: ViewportScroller,
private route: ActivatedRoute,
private notifier: Notifier,
@@ -67,9 +70,12 @@ export class AboutInstanceComponent implements OnInit, AfterViewChecked {
this.categories = categories
this.shortDescription = about.instance.shortDescription
+ this.descriptionContent = about.instance.description
this.html = await this.instanceService.buildHtml(about)
+ await this.injectDescription(about)
+
this.initialized = true
}
@@ -90,4 +96,10 @@ export class AboutInstanceComponent implements OnInit, AfterViewChecked {
copyToClipboard(link)
this.notifier.success(link, $localize `Link copied`)
}
+
+ private async injectDescription (about: About) {
+ const element = await this.customMarkupService.buildElement(about.instance.description)
+
+ this.descriptionWrapper.nativeElement.appendChild(element)
+ }
}
diff --git a/client/src/app/+about/about.module.ts b/client/src/app/+about/about.module.ts
index 1aca14033..dfea52fb8 100644
--- a/client/src/app/+about/about.module.ts
+++ b/client/src/app/+about/about.module.ts
@@ -5,6 +5,7 @@ import { AboutInstanceResolver } from '@app/+about/about-instance/about-instance
import { ContactAdminModalComponent } from '@app/+about/about-instance/contact-admin-modal.component'
import { AboutPeertubeContributorsComponent } from '@app/+about/about-peertube/about-peertube-contributors.component'
import { AboutPeertubeComponent } from '@app/+about/about-peertube/about-peertube.component'
+import { SharedCustomMarkupModule } from '@app/shared/shared-custom-markup'
import { SharedFormModule } from '@app/shared/shared-forms'
import { SharedGlobalIconModule } from '@app/shared/shared-icons'
import { SharedInstanceModule } from '@app/shared/shared-instance'
@@ -19,7 +20,8 @@ import { AboutComponent } from './about.component'
SharedMainModule,
SharedFormModule,
SharedInstanceModule,
- SharedGlobalIconModule
+ SharedGlobalIconModule,
+ SharedCustomMarkupModule
],
declarations: [
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html
index baaac5fb7..2286a5a1a 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html
@@ -17,7 +17,7 @@
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.ts
index 7decf8f75..1923ede39 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-homepage.component.ts
@@ -7,7 +7,7 @@ import { CustomMarkupService } from '@app/shared/shared-custom-markup'
templateUrl: './edit-homepage.component.html',
styleUrls: [ './edit-custom-config.component.scss' ]
})
-export class EditHomepageComponent implements OnInit {
+export class EditHomepageComponent {
@Input() form: FormGroup
@Input() formErrors: any
@@ -17,9 +17,7 @@ export class EditHomepageComponent implements OnInit {
}
- ngOnInit () {
- this.customMarkdownRenderer = async (text: string) => {
- return this.customMarkup.buildElement(text)
- }
+ getCustomMarkdownRenderer () {
+ return this.customMarkup.getCustomMarkdownRenderer()
}
}
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html
index cbff26e5a..d806616bd 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-instance-information.component.html
@@ -32,10 +32,14 @@