aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms/markdown-textarea.component.html
blob: a460cb9b7bf98f7f12c1a1aca92dbcd8eec06709 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<div class="root" [ngClass]="{ 'maximized': isMaximized }" [ngStyle]="{ 'max-width': textareaMaxWidth }">
  <textarea #textarea
    [(ngModel)]="content" (ngModelChange)="onModelChange()"
    class="form-control" [ngClass]="classes"
    [attr.disabled]="disabled"
    [ngStyle]="{ height: textareaHeight }"
    [id]="name" [name]="name">
  </textarea>

  <div ngbNav #nav="ngbNav" class="nav-pills nav-preview">
    <ng-container ngbNavItem *ngIf="truncate !== undefined">
      <a ngbNavLink i18n>Truncated preview</a>

      <ng-template ngbNavContent>
        <div [innerHTML]="truncatedPreviewHTML"></div>
      </ng-template>
    </ng-container>

    <ng-container ngbNavItem>
      <a ngbNavLink i18n>Complete preview</a>

      <ng-template ngbNavContent>
        <div #previewElement></div>
        <div [innerHTML]="previewHTML"></div>
      </ng-template>
    </ng-container>

    <my-button
      *ngIf="!isMaximized" [title]="maximizeInText" className="maximize-button" icon="fullscreen" (click)="onMaximizeClick()" [disabled]="disabled"
    ></my-button>

    <my-button
      *ngIf="isMaximized" [title]="maximizeOutText" className="maximize-button" icon="exit-fullscreen" (click)="onMaximizeClick()" [disabled]="disabled"
    ></my-button>
  </div>

  <div [ngbNavOutlet]="nav"></div>
</div>