Move PlainTextBadge between editing inputs

where it belongs :)
This commit is contained in:
Matthias Metelka 2022-08-03 20:02:44 +02:00
parent 26c5fbc367
commit 1280372129

View file

@ -359,21 +359,18 @@ the AddCards dialog) should be implemented in the user of this component.
> >
<ImageHandle maxWidth={250} maxHeight={125} /> <ImageHandle maxWidth={250} maxHeight={125} />
<MathjaxHandle /> <MathjaxHandle />
</RichTextInput>
<svelte:fragment slot="plain-text-badge">
<PlainTextBadge <PlainTextBadge
bind:off={plainTextsHidden[index]} bind:off={plainTextsHidden[index]}
on:toggle={() => { on:toggle={() => {
plainTextsHidden[index] = plainTextsHidden[index] = !plainTextsHidden[index];
!plainTextsHidden[index];
if (!plainTextsHidden[index]) { if (!plainTextsHidden[index]) {
plainTextInputs[index].api.refocus(); plainTextInputs[index].api.refocus();
} }
}} }}
/> />
</svelte:fragment>
</RichTextInput>
<PlainTextInput <PlainTextInput
hidden={plainTextsHidden[index]} hidden={plainTextsHidden[index]}