/
text-value-as-xml.component.html
36 lines (35 loc) · 1.41 KB
/
text-value-as-xml.component.html
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
<span *ngIf="mode === 'read'; else showForm" class="read-mode-view">
<div *ngIf="this.displayValue?.mapping === standardMapping; else sourceMode"
class="rm-value"
appHtmlLink
[innerHTML]="valueFormControl.value"
(internalLinkClicked)="internalLinkClicked.emit($event)"
(internalLinkHovered)="internalLinkHovered.emit($event)">
</div>
<ng-template #sourceMode>
<span class="rm-value">{{displayValue?.xml}}</span>
</ng-template>
<span class="rm-comment" *ngIf="shouldShowComment">{{commentFormControl.value}}</span>
</span>
<ng-template #showForm>
<div *ngIf="editor; else noConfig" [formGroup]="form">
<span [formGroup]="form">
<ckeditor [formControlName]="'value'" [config]="editorConfig" [editor]="editor"></ckeditor>
<mat-form-field class="large-field value-component-comment">
<textarea
matInput
class="comment"
placeholder="Comment"
spellcheck="false"
[cdkTextareaAutosize]="true"
[cdkAutosizeMinRows]="1"
[cdkAutosizeMaxRows]="6"
[formControlName]="'comment'">
</textarea>
</mat-form-field>
</span>
</div>
<ng-template #noConfig>
No class was provided for CKEditor.
</ng-template>
</ng-template>