]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/shared/shared-forms/markdown-textarea.component.html
5d355a6d89c6f9cd2d3c74f83b05fac6027e02bd
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-forms / markdown-textarea.component.html
1 <div class="root" [ngClass]="{ 'maximized': isMaximized }">
2
3 <textarea #textarea
4 [(ngModel)]="content" (ngModelChange)="onModelChange()"
5 class="form-control" [ngClass]="{ 'input-error': formError }"
6 [attr.disabled]="disabled || null"
7 [id]="name" [name]="name">
8 </textarea>
9
10 <div ngbNav #nav="ngbNav" class="nav-pills nav-preview">
11 <ng-container ngbNavItem *ngIf="truncate !== undefined">
12 <a ngbNavLink i18n>Truncated preview</a>
13
14 <ng-template ngbNavContent>
15 <div [innerHTML]="truncatedPreviewHTML"></div>
16 </ng-template>
17 </ng-container>
18
19 <ng-container ngbNavItem>
20 <a ngbNavLink i18n>Complete preview</a>
21
22 <ng-template ngbNavContent>
23 <div #previewElement></div>
24 <div [innerHTML]="previewHTML"></div>
25 </ng-template>
26 </ng-container>
27
28 <button (click)="onMaximizeClick()" class="maximize-button border-0 m-3" [disabled]="disabled">
29 <my-global-icon *ngIf="!isMaximized" [ngbTooltip]="maximizeInText" iconName="fullscreen"></my-global-icon>
30
31 <my-global-icon *ngIf="isMaximized" [ngbTooltip]="maximizeOutText" iconName="exit-fullscreen"></my-global-icon>
32 </button>
33 </div>
34
35 <div [ngbNavOutlet]="nav"></div>
36
37 <div *ngIf="!isMaximized && formError" class="form-error">{{ formError }}</div>
38 </div>