aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/forms/markdown-textarea.component.html
blob: 3cadb361993501edb44fee4385dffb443f8b6505 (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
<div class="root" [ngStyle]="{ 'flex-direction': flexDirection }">
  <textarea
    [(ngModel)]="content" (ngModelChange)="onModelChange()"
    class="form-control" [ngClass]="classes"
    [ngStyle]="{ width: textareaWidth, height: textareaHeight, 'margin-right': textareaMarginRight }"
    [id]="name" [name]="name">
  </textarea>

  <div ngbNav #nav="ngbNav" class="nav-pills previews">
    <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 [innerHTML]="previewHTML"></div>
      </ng-template>
    </ng-container>
  </div>

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