2020-10-13 16:57:56 +00:00
|
|
|
<div class="container"
|
|
|
|
(focusin)="onFocusIn($event)"
|
2020-10-14 01:19:38 +00:00
|
|
|
(focusout)="onFocusIn($event)">
|
2020-10-13 16:57:56 +00:00
|
|
|
<div class="toolbar-base" *ngIf="isFocused">
|
2020-10-14 01:19:38 +00:00
|
|
|
<button class="toolbar-button" title="Bold" (click)="documentCommand('bold')">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-bold"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
|
|
|
<button class="toolbar-button" title="Italic" (click)="documentCommand('italic')">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-italic"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
|
|
|
<button class="toolbar-button" title="Underline" (click)="documentCommand('underline')">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-underline"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
|
|
|
<button class="toolbar-button" title="Strikethrough" (click)="documentCommand('strikeThrough')">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-strikethrough"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
2020-10-13 16:57:56 +00:00
|
|
|
|
|
|
|
<div class="toolbar-sep"></div>
|
|
|
|
|
2020-10-14 01:19:38 +00:00
|
|
|
<button class="toolbar-button" title="Align Left" (click)="documentCommand('justifyLeft')">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-align-left"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
|
|
|
<button class="toolbar-button" title="Align Center" (click)="documentCommand('justifyCenter')">
|
|
|
|
<i class="icon fa fa-align-center"></i>
|
|
|
|
</button>
|
|
|
|
<button class="toolbar-button" title="Align Right" (click)="documentCommand('justifyRight')">
|
|
|
|
<i class="icon fa fa-align-right"></i>
|
|
|
|
</button>
|
2020-10-13 16:57:56 +00:00
|
|
|
|
|
|
|
<div class="toolbar-sep"></div>
|
|
|
|
|
2020-10-14 01:19:38 +00:00
|
|
|
<button class="toolbar-button" title="Undo" (click)="documentCommand('undo')">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-undo"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
|
|
|
<button class="toolbar-button" title="Redo" (click)="documentCommand('redo')">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-redo"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
2020-10-13 16:57:56 +00:00
|
|
|
|
|
|
|
<div class="toolbar-sep"></div>
|
|
|
|
|
2020-10-14 01:19:38 +00:00
|
|
|
<button class="toolbar-button" title="Increase Heading Level">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-heading"></i>
|
|
|
|
<i class="icon fa fa-long-arrow-alt-up"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
|
|
|
<button class="toolbar-button" title="Decrease Heading Level">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-heading"></i>
|
|
|
|
<i class="icon fa fa-long-arrow-alt-down"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
|
|
|
<button class="toolbar-button" title="Format Monospace">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-code"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
2020-10-13 16:57:56 +00:00
|
|
|
|
|
|
|
<div class="toolbar-sep"></div>
|
|
|
|
|
2020-10-14 01:19:38 +00:00
|
|
|
<button class="toolbar-button" title="Begin Bulleted List">
|
2020-10-13 16:57:56 +00:00
|
|
|
<i class="icon fa fa-list-ul"></i>
|
2020-10-14 01:19:38 +00:00
|
|
|
</button>
|
2020-10-13 16:57:56 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="editable-base"
|
|
|
|
[ngClass]="isFocused ? 'focused' : ''"
|
|
|
|
contenteditable
|
2020-10-14 01:19:38 +00:00
|
|
|
appDomChange
|
|
|
|
[innerHTML]="initialValue"
|
|
|
|
#editable
|
|
|
|
(domChange)="onContentsChanged($event)"
|
|
|
|
></div>
|
2020-10-13 16:57:56 +00:00
|
|
|
</div>
|