Render html also in edit panels

This commit is contained in:
Alexander Bocken 2024-03-02 12:37:45 +01:00
parent 5ee48fa733
commit b71a7072e7
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8
2 changed files with 10 additions and 4 deletions

View File

@ -413,7 +413,7 @@ h3{
} }
</style> </style>
<div class=list_wrapper> <div class=list_wrapper >
<h4>Portionen:</h4> <h4>Portionen:</h4>
<p contenteditable type="text" bind:innerText={portions_local} on:blur={set_portions}></p> <p contenteditable type="text" bind:innerText={portions_local} on:blur={set_portions}></p>
@ -455,9 +455,13 @@ h3{
</button> </button>
</div> </div>
<!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-click-events-have-key-events -->
<div on:click={() => show_modal_edit_ingredient(list_index, ingredient_index)} >{ingredient.amount} {ingredient.unit}</div> <div on:click={() => show_modal_edit_ingredient(list_index, ingredient_index)} >
{ingredient.amount} {ingredient.unit}
</div>
<!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-click-events-have-key-events -->
<div class=force_wrap on:click={() => show_modal_edit_ingredient(list_index, ingredient_index)} >{ingredient.name}</div> <div class=force_wrap on:click={() => show_modal_edit_ingredient(list_index, ingredient_index)} >
{@html ingredient.name}
</div>
<div class=mod_icons><button class="action_button button_subtle" on:click={() => show_modal_edit_ingredient(list_index, ingredient_index)}> <div class=mod_icons><button class="action_button button_subtle" on:click={() => show_modal_edit_ingredient(list_index, ingredient_index)}>
<Pen fill=var(--nord1) height=1em width=1em></Pen></button> <Pen fill=var(--nord1) height=1em width=1em></Pen></button>
<button class="action_button button_subtle" on:click="{() => remove_ingredient(list_index, ingredient_index)}"><Cross fill=var(--nord1) height=1em width=1em></Cross></button></div> <button class="action_button button_subtle" on:click="{() => remove_ingredient(list_index, ingredient_index)}"><Cross fill=var(--nord1) height=1em width=1em></Cross></button></div>

View File

@ -509,7 +509,9 @@ h3{
</button> </button>
</div> </div>
<div> <div>
<div on:click={() => show_modal_edit_step(list_index, step_index)}>{step}</div> <div on:click={() => show_modal_edit_step(list_index, step_index)}>
{@html step}
</div>
<div><button class="action_button button_subtle" on:click={() => show_modal_edit_step(list_index, step_index)}> <div><button class="action_button button_subtle" on:click={() => show_modal_edit_step(list_index, step_index)}>
<Pen fill=var(--nord1)></Pen> <Pen fill=var(--nord1)></Pen>
</button> </button>