diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-31 11:01:42 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-31 11:01:42 +0200 |
commit | 15f35256af15b97d2298cc44e76ffcafe73a1c88 (patch) | |
tree | c90887f52c56d4107d956396ab19aafe04e700e6 | |
parent | 462271edd693cffb9242ca1e33d64cb0423e4b29 (diff) | |
download | PeerTube-15f35256af15b97d2298cc44e76ffcafe73a1c88.tar.gz PeerTube-15f35256af15b97d2298cc44e76ffcafe73a1c88.tar.zst PeerTube-15f35256af15b97d2298cc44e76ffcafe73a1c88.zip |
Add help to custom markdown textarea
5 files changed, 20 insertions, 3 deletions
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 c48fa5bf8..baaac5fb7 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 | |||
@@ -11,6 +11,9 @@ | |||
11 | 11 | ||
12 | <div class="form-group"> | 12 | <div class="form-group"> |
13 | <label i18n for="instanceCustomHomepageContent">Homepage</label> | 13 | <label i18n for="instanceCustomHomepageContent">Homepage</label> |
14 | <div class="label-small-info"> | ||
15 | <my-custom-markup-help></my-custom-markup-help> | ||
16 | </div> | ||
14 | 17 | ||
15 | <my-markdown-textarea | 18 | <my-markdown-textarea |
16 | name="instanceCustomHomepageContent" formControlName="content" textareaMaxWidth="90%" textareaHeight="300px" | 19 | name="instanceCustomHomepageContent" formControlName="content" textareaMaxWidth="90%" textareaHeight="300px" |
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup-help.component.html b/client/src/app/shared/shared-custom-markup/custom-markup-help.component.html new file mode 100644 index 000000000..dd7a56d7d --- /dev/null +++ b/client/src/app/shared/shared-custom-markup/custom-markup-help.component.html | |||
@@ -0,0 +1,3 @@ | |||
1 | <ng-container i18n> | ||
2 | <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> | ||
3 | </ng-container> | ||
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup-help.component.ts b/client/src/app/shared/shared-custom-markup/custom-markup-help.component.ts new file mode 100644 index 000000000..0a5a67794 --- /dev/null +++ b/client/src/app/shared/shared-custom-markup/custom-markup-help.component.ts | |||
@@ -0,0 +1,8 @@ | |||
1 | import { Component } from '@angular/core' | ||
2 | |||
3 | @Component({ | ||
4 | selector: 'my-custom-markup-help', | ||
5 | templateUrl: './custom-markup-help.component.html' | ||
6 | }) | ||
7 | export class CustomMarkupHelpComponent { | ||
8 | } | ||
diff --git a/client/src/app/shared/shared-custom-markup/index.ts b/client/src/app/shared/shared-custom-markup/index.ts index 14bde3ea9..a9ac2516c 100644 --- a/client/src/app/shared/shared-custom-markup/index.ts +++ b/client/src/app/shared/shared-custom-markup/index.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export * from './custom-markup.service' | 1 | export * from './custom-markup.service' |
2 | export * from './dynamic-element.service' | 2 | export * from './dynamic-element.service' |
3 | export * from './custom-markup-help.component' | ||
3 | export * from './shared-custom-markup.module' | 4 | export * from './shared-custom-markup.module' |
diff --git a/client/src/app/shared/shared-custom-markup/shared-custom-markup.module.ts b/client/src/app/shared/shared-custom-markup/shared-custom-markup.module.ts index d03aa856f..66f6b98f6 100644 --- a/client/src/app/shared/shared-custom-markup/shared-custom-markup.module.ts +++ b/client/src/app/shared/shared-custom-markup/shared-custom-markup.module.ts | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | import { CommonModule } from '@angular/common' | 1 | import { CommonModule } from '@angular/common' |
3 | import { NgModule } from '@angular/core' | 2 | import { NgModule } from '@angular/core' |
4 | import { SharedActorImageModule } from '../shared-actor-image/shared-actor-image.module' | 3 | import { SharedActorImageModule } from '../shared-actor-image/shared-actor-image.module' |
@@ -8,6 +7,7 @@ import { SharedVideoMiniatureModule } from '../shared-video-miniature' | |||
8 | import { SharedVideoPlaylistModule } from '../shared-video-playlist' | 7 | import { SharedVideoPlaylistModule } from '../shared-video-playlist' |
9 | import { ButtonMarkupComponent } from './button-markup.component' | 8 | import { ButtonMarkupComponent } from './button-markup.component' |
10 | import { ChannelMiniatureMarkupComponent } from './channel-miniature-markup.component' | 9 | import { ChannelMiniatureMarkupComponent } from './channel-miniature-markup.component' |
10 | import { CustomMarkupHelpComponent } from './custom-markup-help.component' | ||
11 | import { CustomMarkupService } from './custom-markup.service' | 11 | import { CustomMarkupService } from './custom-markup.service' |
12 | import { DynamicElementService } from './dynamic-element.service' | 12 | import { DynamicElementService } from './dynamic-element.service' |
13 | import { EmbedMarkupComponent } from './embed-markup.component' | 13 | import { EmbedMarkupComponent } from './embed-markup.component' |
@@ -32,7 +32,8 @@ import { VideosListMarkupComponent } from './videos-list-markup.component' | |||
32 | ChannelMiniatureMarkupComponent, | 32 | ChannelMiniatureMarkupComponent, |
33 | EmbedMarkupComponent, | 33 | EmbedMarkupComponent, |
34 | VideosListMarkupComponent, | 34 | VideosListMarkupComponent, |
35 | ButtonMarkupComponent | 35 | ButtonMarkupComponent, |
36 | CustomMarkupHelpComponent | ||
36 | ], | 37 | ], |
37 | 38 | ||
38 | exports: [ | 39 | exports: [ |
@@ -41,7 +42,8 @@ import { VideosListMarkupComponent } from './videos-list-markup.component' | |||
41 | ChannelMiniatureMarkupComponent, | 42 | ChannelMiniatureMarkupComponent, |
42 | VideosListMarkupComponent, | 43 | VideosListMarkupComponent, |
43 | EmbedMarkupComponent, | 44 | EmbedMarkupComponent, |
44 | ButtonMarkupComponent | 45 | ButtonMarkupComponent, |
46 | CustomMarkupHelpComponent | ||
45 | ], | 47 | ], |
46 | 48 | ||
47 | providers: [ | 49 | providers: [ |