]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add help to custom markdown textarea
authorChocobozzz <me@florianbigard.com>
Mon, 31 May 2021 09:01:42 +0000 (11:01 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 31 May 2021 09:01:42 +0000 (11:01 +0200)
client/src/app/+admin/config/edit-custom-config/edit-homepage.component.html
client/src/app/shared/shared-custom-markup/custom-markup-help.component.html [new file with mode: 0644]
client/src/app/shared/shared-custom-markup/custom-markup-help.component.ts [new file with mode: 0644]
client/src/app/shared/shared-custom-markup/index.ts
client/src/app/shared/shared-custom-markup/shared-custom-markup.module.ts

index c48fa5bf8e9f15c5e39a65b33bcade4c19df3c37..baaac5fb71865aadb73e8feb6a6cd4249d8e28ab 100644 (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"
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 (file)
index 0000000..dd7a56d
--- /dev/null
@@ -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>
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 (file)
index 0000000..0a5a677
--- /dev/null
@@ -0,0 +1,8 @@
+import { Component } from '@angular/core'
+
+@Component({
+  selector: 'my-custom-markup-help',
+  templateUrl: './custom-markup-help.component.html'
+})
+export class CustomMarkupHelpComponent {
+}
index 14bde3ea9caf3145d6c72c2db7f8aecda69a9874..a9ac2516ca46e33e5f1f73072b533fe738286e24 100644 (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'
index d03aa856faf0c96e40ea364e61a310d3a199b217..66f6b98f6eaedd0a9999be5f1ac661da4b4eb7fc 100644 (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: [