Initial editor functionality
This commit is contained in:
13
src/app/components/editor/host/host.component.html
Normal file
13
src/app/components/editor/host/host.component.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<ng-container>
|
||||
<div
|
||||
*ngIf="record.type === 'paragraph' || record.type === 'header1' || record.type === 'header2' || record.type === 'header3' || record.type === 'header4' || record.type === 'block_code'"
|
||||
class="host-host ion-padding"
|
||||
contenteditable="true"
|
||||
(keyup)="onKeyUp($event)"
|
||||
(blur)="record.value=hostContainer.innerText"
|
||||
#hostContainer
|
||||
[ngClass]="{'paragraph': record.type === 'paragraph', 'header1': record.type === 'header1', 'header2': record.type === 'header2', 'header3': record.type === 'header3', 'header4': record.type === 'header4', 'block_code': record.type === 'block_code'}"
|
||||
>
|
||||
{{ record.value }}
|
||||
</div>
|
||||
</ng-container>
|
||||
Reference in New Issue
Block a user