2021-04-12 16:19:53 +02:00
|
|
|
<div class="d-editor-overlay hidden"></div>
|
2018-02-08 05:30:55 +01:00
|
|
|
|
2021-04-12 16:19:53 +02:00
|
|
|
<div class="d-editor-container">
|
2024-11-22 16:45:50 +01:00
|
|
|
{{#if this.showPreview}}
|
|
|
|
<div class="d-editor-preview-wrapper {{if this.forcePreview 'force-preview'}}">
|
2018-02-08 05:30:55 +01:00
|
|
|
<div class="d-editor-preview">
|
2024-11-22 16:45:50 +01:00
|
|
|
{{html-safe this.preview}}
|
2018-02-08 05:30:55 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="d-editor-textarea-wrapper">
|
2021-04-12 16:19:53 +02:00
|
|
|
<div class="d-editor-button-bar">
|
2024-11-22 16:45:50 +01:00
|
|
|
{{#each this.toolbar.groups as |group|}}
|
2018-02-08 05:30:55 +01:00
|
|
|
{{#each group.buttons as |b|}}
|
|
|
|
{{#if b.popupMenu}}
|
|
|
|
{{toolbar-popup-menu-options
|
2024-11-22 16:45:50 +01:00
|
|
|
onPopupMenuAction=this.onPopupMenuAction
|
2018-02-08 05:30:55 +01:00
|
|
|
onExpand=(action b.action b)
|
|
|
|
class=b.className
|
2024-11-22 16:45:50 +01:00
|
|
|
content=this.popupMenuOptions
|
2023-07-10 08:55:54 +02:00
|
|
|
options=(hash popupTitle=b.title icon=b.icon)
|
|
|
|
}}
|
2018-02-08 05:30:55 +01:00
|
|
|
{{else}}
|
|
|
|
<div>{{d.icon}}</div>
|
2023-07-10 08:55:54 +02:00
|
|
|
<button
|
|
|
|
class="wizard-btn {{b.className}}"
|
|
|
|
{{action b.action b}}
|
|
|
|
title={{b.title}}
|
|
|
|
type="button"
|
|
|
|
>
|
2019-07-22 09:28:49 +02:00
|
|
|
{{d-icon b.icon}}
|
|
|
|
{{#if b.label}}
|
2022-07-26 16:18:09 +02:00
|
|
|
<span class="d-button-label">{{i18n b.label}}</span>
|
2019-07-22 09:28:49 +02:00
|
|
|
{{/if}}
|
|
|
|
</button>
|
2018-02-08 05:30:55 +01:00
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
|
|
|
|
{{#unless group.lastGroup}}
|
2021-04-12 16:19:53 +02:00
|
|
|
<div class="d-editor-spacer"></div>
|
2018-02-08 05:30:55 +01:00
|
|
|
{{/unless}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
|
2024-11-22 16:45:50 +01:00
|
|
|
{{conditional-loading-spinner condition=this.loading}}
|
2023-04-03 04:28:06 +02:00
|
|
|
<Textarea
|
|
|
|
tabindex={{this.tabindex}}
|
|
|
|
@value={{this.value}}
|
|
|
|
class="d-editor-input"
|
|
|
|
placeholder={{this.placeholder}}
|
|
|
|
/>
|
2018-02-08 05:30:55 +01:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2023-07-10 08:55:54 +02:00
|
|
|
</div>
|