Updated bartender html and added html editor to article creation.
This commit is contained in:
@@ -29,6 +29,11 @@
|
||||
) {
|
||||
loading.value = true;
|
||||
|
||||
if (ingredients.value != null) {
|
||||
ingredients.value = ingredients.value.replace(/style="[^"]*"/g, '');
|
||||
ingredients.value = ingredients.value.replace(/<\/?p[^>]*>/g, '');
|
||||
}
|
||||
|
||||
const article: Article = new Article(0, name.value, bio.value, origin.value, description.value,
|
||||
ingredients.value, default_unit.value, [],
|
||||
mhd.value, bio_origin.value, allergens_text.value, bio_info.value, topm_id.value);
|
||||
@@ -139,10 +144,11 @@
|
||||
:clearable="true"
|
||||
/>
|
||||
|
||||
<v-textarea
|
||||
v-model.trim="ingredients"
|
||||
<VuetifyTiptap
|
||||
v-model="ingredients"
|
||||
label="Zutaten"
|
||||
:clearable="true"
|
||||
rounded
|
||||
:max-height="200"
|
||||
/>
|
||||
|
||||
<v-row>
|
||||
|
||||
@@ -276,6 +276,7 @@ export const useLabelEditorStore = defineStore('label_editor_store', {
|
||||
try {
|
||||
if (article.ingredients != null) {
|
||||
article.ingredients = article.ingredients.replace(/style="[^"]*"/g, '');
|
||||
article.ingredients = article.ingredients.replace(/<\/?p[^>]*>/g, '');
|
||||
}
|
||||
|
||||
let updatedArticle = await $fetch<Article>(this.config.public.url + '/article/' + article.id, {
|
||||
|
||||
Reference in New Issue
Block a user