feat(about): render images in markdown (#5732)

* feat(about): render images in markdown

Closes https://github.com/Chocobozzz/PeerTube/issues/5710

* Update edit-instance-information.component.html

* use `markdownType="enhanced"`
pull/5734/head
Joël Galeran 2023-04-05 11:12:00 +02:00 committed by GitHub
parent 907bcfa02c
commit 9258e9a4a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -125,7 +125,7 @@
<label i18n for="instanceTerms">Terms</label><my-help helpType="markdownText"></my-help>
<my-markdown-textarea
name="instanceTerms" formControlName="terms"
name="instanceTerms" formControlName="terms" markdownType="enhanced"
[formError]="formErrors['instance.terms']"
></my-markdown-textarea>
</div>
@ -134,7 +134,7 @@
<label i18n for="instanceCodeOfConduct">Code of conduct</label><my-help helpType="markdownText"></my-help>
<my-markdown-textarea
name="instanceCodeOfConduct" formControlName="codeOfConduct"
name="instanceCodeOfConduct" formControlName="codeOfConduct" markdownType="enhanced"
[formError]="formErrors['instance.codeOfConduct']"
></my-markdown-textarea>
</div>
@ -144,7 +144,7 @@
<div i18n class="label-small-info">Who moderates the instance? What is the policy regarding NSFW videos? Political videos? etc</div>
<my-markdown-textarea
name="instanceModerationInformation" formControlName="moderationInformation"
name="instanceModerationInformation" formControlName="moderationInformation" markdownType="enhanced"
[formError]="formErrors['instance.moderationInformation']"
></my-markdown-textarea>
</div>
@ -164,7 +164,7 @@
<div i18n class="label-small-info">A single person? A non-profit? A company?</div>
<my-markdown-textarea
name="instanceAdministrator" formControlName="administrator"
name="instanceAdministrator" formControlName="administrator" markdownType="enhanced"
[formError]="formErrors['instance.administrator']"
></my-markdown-textarea>
</div>
@ -174,7 +174,7 @@
<div i18n class="label-small-info">To share your personal videos? To open registrations and allow people to upload what they want?</div>
<my-markdown-textarea
name="instanceCreationReason" formControlName="creationReason"
name="instanceCreationReason" formControlName="creationReason" markdownType="enhanced"
[formError]="formErrors['instance.creationReason']"
></my-markdown-textarea>
</div>
@ -184,7 +184,7 @@
<div i18n class="label-small-info">It's important to know for users who want to register on your instance</div>
<my-markdown-textarea
name="instanceMaintenanceLifetime" formControlName="maintenanceLifetime"
name="instanceMaintenanceLifetime" formControlName="maintenanceLifetime" markdownType="enhanced"
[formError]="formErrors['instance.maintenanceLifetime']"
></my-markdown-textarea>
</div>
@ -194,7 +194,7 @@
<div i18n class="label-small-info">With your own funds? With user donations? Advertising?</div>
<my-markdown-textarea
name="instanceBusinessModel" formControlName="businessModel"
name="instanceBusinessModel" formControlName="businessModel" markdownType="enhanced"
[formError]="formErrors['instance.businessModel']"
></my-markdown-textarea>
</div>
@ -214,7 +214,7 @@
<div i18n class="label-small-info">i.e. 2vCore 2GB RAM, a direct the link to the server you rent, etc.</div>
<my-markdown-textarea
name="instanceHardwareInformation" formControlName="hardwareInformation"
name="instanceHardwareInformation" formControlName="hardwareInformation" markdownType="enhanced"
[formError]="formErrors['instance.hardwareInformation']"
></my-markdown-textarea>
</div>

View File

@ -56,7 +56,7 @@ export class InstanceService {
}
for (const key of Object.keys(html)) {
html[key] = await this.markdownService.textMarkdownToHTML({ markdown: about.instance[key] })
html[key] = await this.markdownService.enhancedMarkdownToHTML({ markdown: about.instance[key] })
}
return html