cba8925f03bcfd35dc369bbab740e4cf54335657
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / share / marc-edit / editable-content.component.html
1
2 <!--
3 Some context menus have additional static options.
4 Track their labels here.
5 -->
6 <eg-string #add006 text="Add 006" i18n-text></eg-string>
7 <eg-string #add007 text="Add 007" i18n-text></eg-string>
8 <eg-string #add008 text="Add/Replace 008" i18n-text></eg-string>
9 <eg-string #insertBefore text="Insert Field Before" i18n-text></eg-string>
10 <eg-string #insertAfter text="Insert Field After" i18n-text></eg-string>
11 <eg-string #deleteField text="Delete Field" i18n-text></eg-string>
12
13 <ng-container *ngIf="bigText">
14   <div contenteditable
15     id='{{randId}}'
16     spellcheck="false"
17     class="d-inline-block text-dark text-break {{moreClasses}}"
18     [ngClass]="{'auth-invalid': isAuthInvalid()}"
19     [attr.tabindex]="fieldText ? -1 : ''"
20     [attr.aria-label]="ariaLabel"
21     [egContextMenu]="contextMenuEntries()"
22     (menuItemSelected)="contextMenuChange($event.value)"
23     (keydown)="inputKeyDown($event)"
24     (focus)="selectText()"
25     (blur)="inputBlurred()"
26     (input)="bigTextValueChange()">
27   </div>
28 </ng-container>
29
30 <ng-container *ngIf="!bigText">
31   <input
32     id='{{randId}}'
33     spellcheck="false"
34     class="text-dark rounded-0 form-control {{moreClasses}}"
35     [ngClass]="{'auth-invalid': isAuthInvalid()}"
36     [size]="inputSize()"
37     [maxlength]="maxLength || ''"
38     [disabled]="fieldText"
39     [attr.tabindex]="fieldText ? -1 : ''"
40     [attr.aria-label]="ariaLabel"
41     [egContextMenu]="contextMenuEntries()"
42     (menuItemSelected)="contextMenuChange($event.value)"
43     (keydown)="inputKeyDown($event)"
44     (focus)="selectText()"
45     (blur)="inputBlurred()"
46     [ngModel]="getContent()"
47     (ngModelChange)="setContent($event)"
48   />
49 </ng-container>
50