{#if uploadingImage && images}
{ e.forEach(i => { wrapSelection(`\n\n`, '') }) }} />
{/if}
{#if label || customLabel}
{#if label} {label} {:else if customLabel} {@render customLabel?.()} {/if}
{/if}
{#if previewing}
{:else} {#if tools}
wrapSelection('**', '**')} title="Bold" size="custom" class="w-8 h-8" rounding="lg" >
wrapSelection('*', '*')} title="Italic" size="custom" class="w-8 h-8" rounding="lg" >
wrapSelection('[', '](https://example.com)')} title="Link" size="custom" class="w-8 h-8" rounding="lg" >
wrapSelection('\n# ', '')} title="Header" size="custom" class="w-8 h-8" rounding="lg" >
wrapSelection('~~', '~~')} title="Strikethrough" size="custom" class="w-8 h-8" rounding="lg" >
wrapSelection('\n> ', '')} title="Quote" size="custom" class="w-8 h-8" rounding="lg" >
"
wrapSelection('\n- ', '')} title="List" size="custom" class="w-8 h-8" rounding="lg" >
wrapSelection('`', '`')} title="Code" size="custom" class="w-8 h-8" rounding="lg" >
wrapSelection('::: spoiler
\n', '\n:::')} title="Spoiler" size="custom" class="w-8 h-8" rounding="lg" >
wrapSelection('~', '~')} title="Subscript" size="custom" class="w-8 h-8" rounding="lg" >
X
1
wrapSelection('^', '^')} title="Superscript" size="custom" class="w-8 h-8" rounding="lg" >
X
1
{#if images}
(uploadingImage = !uploadingImage)} title="Image" size="custom" class="w-8 h-8" rounding="lg" >
{/if}
{/if}
{ if (disabled) return if (e.ctrlKey || e.metaKey) { handleKeydown(e) // @ts-expect-error yes it can let shortcut = shortcuts[e.key] if (shortcut) { e.preventDefault() shortcut?.(e) } } }} oninput={adjustHeight} onpaste={e => { if (!e.clipboardData?.files) return const files = Array.from(e.clipboardData.files) if (files[0]?.type.startsWith('image/')) { image = e.clipboardData.files[0] as unknown as FileList | null uploadingImage = true } }} {rows} {...rest} /> {/if} {#if previewButton}
{#if previewButton}
{/if} {@render children?.()}
{/if}