Add help to custom markdown textarea

pull/4141/head
Chocobozzz 2021-05-31 11:01:42 +02:00
parent 462271edd6
commit 15f35256af
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
5 changed files with 20 additions and 3 deletions

View File

@ -11,6 +11,9 @@
<div class="form-group">
<label i18n for="instanceCustomHomepageContent">Homepage</label>
<div class="label-small-info">
<my-custom-markup-help></my-custom-markup-help>
</div>
<my-markdown-textarea
name="instanceCustomHomepageContent" formControlName="content" textareaMaxWidth="90%" textareaHeight="300px"

View File

@ -0,0 +1,3 @@
<ng-container i18n>
<a href="https://en.wikipedia.org/wiki/Markdown#Example" target="_blank" rel="noreferer noopener">Markdown compatible</a> that also supports <a href="https://docs.joinpeertube.org/api-custom-client-markup" target="_blank" rel="noreferer noopener">custom PeerTube HTML tags</a>
</ng-container>

View File

@ -0,0 +1,8 @@
import { Component } from '@angular/core'
@Component({
selector: 'my-custom-markup-help',
templateUrl: './custom-markup-help.component.html'
})
export class CustomMarkupHelpComponent {
}

View File

@ -1,3 +1,4 @@
export * from './custom-markup.service'
export * from './dynamic-element.service'
export * from './custom-markup-help.component'
export * from './shared-custom-markup.module'

View File

@ -1,4 +1,3 @@
import { CommonModule } from '@angular/common'
import { NgModule } from '@angular/core'
import { SharedActorImageModule } from '../shared-actor-image/shared-actor-image.module'
@ -8,6 +7,7 @@ import { SharedVideoMiniatureModule } from '../shared-video-miniature'
import { SharedVideoPlaylistModule } from '../shared-video-playlist'
import { ButtonMarkupComponent } from './button-markup.component'
import { ChannelMiniatureMarkupComponent } from './channel-miniature-markup.component'
import { CustomMarkupHelpComponent } from './custom-markup-help.component'
import { CustomMarkupService } from './custom-markup.service'
import { DynamicElementService } from './dynamic-element.service'
import { EmbedMarkupComponent } from './embed-markup.component'
@ -32,7 +32,8 @@ import { VideosListMarkupComponent } from './videos-list-markup.component'
ChannelMiniatureMarkupComponent,
EmbedMarkupComponent,
VideosListMarkupComponent,
ButtonMarkupComponent
ButtonMarkupComponent,
CustomMarkupHelpComponent
],
exports: [
@ -41,7 +42,8 @@ import { VideosListMarkupComponent } from './videos-list-markup.component'
ChannelMiniatureMarkupComponent,
VideosListMarkupComponent,
EmbedMarkupComponent,
ButtonMarkupComponent
ButtonMarkupComponent,
CustomMarkupHelpComponent
],
providers: [