{#if enhancing}
{/if}
{#if files && files.length > 0}
{#each files as file, fileIdx}
{#if file.type === 'image'}
{
files = files.filter((item, idx) => idx !== fileIdx);
note.data.files = files.length > 0 ? files : null;
}}
/>
{:else}
{
files = files.filter((item) => item?.id !== file.id);
note.data.files = files.length > 0 ? files : null;
}}
/>
{/if}
{/each}
{/if}
{
note.data.content.html = content.html;
note.data.content.md = content.md;
}}
/>