Double click to edit, double escape to stop
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<div class="container"
|
||||
(focusin)="onFocusIn($event)">
|
||||
(dblclick)="onFocusIn($event)">
|
||||
<div class="toolbar-base" *ngIf="isFocused">
|
||||
<button class="toolbar-button" title="Bold" (click)="documentCommand('bold')">
|
||||
<i class="icon fa fa-bold"></i>
|
||||
@@ -70,8 +70,14 @@
|
||||
[ngClass]="isFocused ? 'focused' : ''"
|
||||
contenteditable
|
||||
appDomChange
|
||||
*ngIf="isFocused"
|
||||
[innerHTML]="initialValue"
|
||||
#editable
|
||||
(domChange)="onContentsChanged($event)"
|
||||
></div>
|
||||
<div
|
||||
class="editable-base"
|
||||
*ngIf="!isFocused"
|
||||
[innerHTML]="initialValue"
|
||||
></div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user