added editor button for scalable number

This commit is contained in:
vabene1111 2024-02-10 09:26:29 +01:00
parent f3e42f13b1
commit 8e4e785179

View File

@ -103,10 +103,10 @@
<div class="col-md-12">
<div class="card mt-2 mb-2">
<div class="card-body pr-2 pl-2 pr-md-5 pl-md-5 pt-3 pb-3">
<h6>{{ $t('Properties') }} <small class="text-muted"> {{$t('per_serving')}}</small></h6>
<h6>{{ $t('Properties') }} <small class="text-muted"> {{ $t('per_serving') }}</small></h6>
<div class="alert alert-info" role="alert">
{{ $t('recipe_property_info')}}
{{ $t('recipe_property_info') }}
</div>
<div class="d-flex mt-2" v-for="p in recipe.properties" v-bind:key="p.id">
@ -645,7 +645,18 @@
<mavon-editor v-model="step.instruction" :autofocus="false"
style="z-index: auto" :id="'id_instruction_' + step.id"
:language="'en'"
:toolbars="md_editor_toolbars" :defaultOpen="'edit'"/>
:toolbars="md_editor_toolbars" :defaultOpen="'edit'">
<template #left-toolbar-after>
<span class="op-icon-divider"></span>
<button
type="button"
@click="step.instruction+= ' {{ scale(100) }}'"
class="op-icon fas fa-times"
aria-hidden="true"
title="Scalable Number"
></button>
</template>
</mavon-editor>
<!-- TODO markdown DOCS link and markdown editor -->
</div>
@ -832,7 +843,7 @@ export default {
header: true,
underline: true,
strikethrough: true,
mark: true,
mark: false,
superscript: true,
subscript: true,
quote: true,
@ -1293,7 +1304,7 @@ export default {
})
Promise.allSettled(promises).then(() => {
ing_list.forEach(ing => {
if(ing.trim() !== ""){
if (ing.trim() !== "") {
step.ingredients.push(parsed_ing_list.find(x => x.original_text === ing))
}
})