79236854

Date: 2024-11-29 11:11:55
Score: 1
Natty:
Report link

Change this:

<sw-text-editor
    v-model="blockContent"
    :allow-inline-data-mapping="true"
    sanitize-input
        @element-update="onElementUpdate">
</sw-text-field>

to this:

<sw-text-editor
    v-model="blockContent"
    :allow-inline-data-mapping="true"
    sanitize-input
        @element-update="onElementUpdate">
</sw-text-field>

you use the open tag of "sw-text-editor" but you close with "sw-text-field".

Or you look at the base components: https://github.com/shopware/shopware/blob/ab564a66dbaa112dfa20099881a718a80813c482/src/Administration/Resources/app/administration/src/module/sw-cms/elements/text/component/sw-cms-el-text.html.twig#L10

Here:

<sw-text-editor
    v-else
    v-model:value="element.config.content.value"
    :disabled="disabled"
    :vertical-align="element.config.verticalAlign.value"
    :allow-inline-data-mapping="true"
    :is-inline-edit="true"
    sanitize-input
    sanitize-field-name="app_cms_block.template"
    enable-transparent-background
    @blur="onBlur"
    @update:value="onInput"
/>
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Johannes Fischer