mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
dad908911b
no issue - adds an "Alt" button that is displayed in the caption input whilst an image card is selected, clicking it toggles between the rich-text caption input and a plain-text alt text input
40 lines
1.5 KiB
Handlebars
40 lines
1.5 KiB
Handlebars
{{#if icon}}
|
|
{{#sticky-element top=iconTop bottom=36}}
|
|
{{svg-jar icon class=iconClass}}
|
|
{{/sticky-element}}
|
|
{{/if}}
|
|
|
|
{{yield (hash
|
|
captionInput=(component "koenig-caption-input"
|
|
captureInput=isSelected
|
|
addParagraphAfterCard=addParagraphAfterCard
|
|
moveCursorToPrevSection=moveCursorToPrevSection
|
|
moveCursorToNextSection=moveCursorToNextSection
|
|
)
|
|
altInput=(component "koenig-alt-input"
|
|
addParagraphAfterCard=addParagraphAfterCard
|
|
moveCursorToPrevSection=moveCursorToPrevSection
|
|
moveCursorToNextSection=moveCursorToNextSection
|
|
)
|
|
)}}
|
|
|
|
{{#if toolbar}}
|
|
{{#kg-action-bar class="absolute" style=toolbarStyle isVisible=shouldShowToolbar}}
|
|
{{#each toolbar.items as |item|}}
|
|
{{#if item.divider}}
|
|
<li class="ma0 kg-action-bar-divider bg-darkgrey-d2 h5"></li>
|
|
{{else}}
|
|
<li class="ma0 lh-solid">
|
|
<button
|
|
type="button"
|
|
title={{item.title}}
|
|
class="dib dim-lite link h10 w9 nudge-top--1 justify-center {{item.buttonClass}}"
|
|
onmousedown={{action item.action}}
|
|
>
|
|
{{#if item.icon}}{{svg-jar item.icon class=(concat item.iconClass (if item.text " mr2") " w4 h4")}} {{/if}}{{item.text}}
|
|
</button>
|
|
</li>
|
|
{{/if}}
|
|
{{/each}}
|
|
{{/kg-action-bar}}
|
|
{{/if}} |