2018-01-18 16:38:11 +01:00
|
|
|
<div [hidden]="!rteEnabled">
|
|
|
|
<div #editor contenteditable="true" class="core-rte-editor" tappable [attr.data-placeholder-text]="placeholder">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand -->
|
|
|
|
<div #decorate class="formatOptions">
|
|
|
|
<button data-command="bold"><strong>B</strong></button>
|
|
|
|
<button data-command="italic"><i>I</i></button>
|
|
|
|
<button data-command="underline"><u>U</u></button>
|
|
|
|
<button data-command="formatBlock|<p>">Normal</button>
|
|
|
|
<button data-command="formatBlock|<h1>">H1</button>
|
|
|
|
<button data-command="formatBlock|<h2>">H2</button>
|
|
|
|
<button data-command="formatBlock|<h3>">H3</button>
|
|
|
|
<button data-command="formatBlock|<pre>">Pre</button>
|
|
|
|
<button data-command="insertOrderedList">OL</button>
|
|
|
|
<button data-command="insertUnorderedList">UL</button>
|
|
|
|
<button data-command="removeFormat">Tx</button>
|
|
|
|
<button (click)="toggleEditor($event)">Toggle Editor</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div [hidden]="rteEnabled">
|
2018-04-04 09:00:29 +02:00
|
|
|
<ion-textarea #textarea class="core-textarea" [placeholder]="placeholder" [attr.name]="name" ngControl="control" (ionChange)="onChange($event)"></ion-textarea>
|
2018-01-18 16:38:11 +01:00
|
|
|
<div class="formatOptions">
|
|
|
|
<button tappable (click)="toggleEditor($event)">Toggle Editor</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|