'sw-text-editor field doesn't shop up as config field
I'm trying to add an wysiwyg field with the sw-text-edtior component for my cms-element as an config field, but it doesn't show up at all. If I try an sw-text-field instead of an sw-text-editor component it does show up. I can't seem to find it in the docs if I am missing something.
My code: config/sw-cms-el-config-collapse.html.twig
{% block sw_cms_element_collapse_config %}
<sw-text-editor
v-model="blockContent"
:allow-inline-data-mapping="true"
sanitize-input
@element-update="onElementUpdate">
</sw-text-field>
{% endblock %}
config/index.js
import template from './sw-cms-el-config-collapse.html.twig';
Shopware.Component.register('sw-cms-el-config-collapse', {
template,
mixins: ['cms-element'],
computed: {
blockContent: {
get() {
return this.element.config.blockContent.value;
},
set(value) {
this.element.config.blockContent.value = value;
},
},
},
created() {
this.createdComponent();
},
methods: {
createdComponent() {
this.initElementConfig('s7-collapse');
},
onElementUpdate(element) {
this.emitChanges(element);
},
},
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
