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 -->
|
2018-05-29 16:56:47 +02:00
|
|
|
<div #decorate class="core-rte-toolbar">
|
|
|
|
<div class="core-rte-buttons">
|
|
|
|
<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"><ion-icon name="list" md="ios-list"></ion-icon></button>
|
|
|
|
<button data-command="insertUnorderedList">1,2,3</button>
|
|
|
|
<button data-command="removeFormat"><ion-icon name="brush"></ion-icon></button>
|
|
|
|
<button (click)="toggleEditor($event)"><ion-icon name="eye-off"></ion-icon> {{ 'core.viewcode' | translate }}</button>
|
|
|
|
</div>
|
2018-01-18 16:38:11 +01:00
|
|
|
</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-05-29 16:56:47 +02:00
|
|
|
<div class="core-rte-toolbar">
|
|
|
|
<div #decorate class="core-rte-buttons">
|
|
|
|
<button tappable (click)="toggleEditor($event)"><ion-icon name="eye"></ion-icon> {{ 'core.vieweditor' | translate }}</button>
|
|
|
|
</div>
|
2018-01-18 16:38:11 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|