shopwareshopware6

Trying to override component sw-text-editor in Shopware 6.7 RC


import './component/my-component'; is used in src/Resources/app/administration/src/main.js and within src/Resources/app/administration/src/component/my-component/index.js the code looks like this:

const {Component, Mixin} = Shopware;
import template from './my-component.html.twig';

Component.override('sw-text-editor', {

  template,

  created() {
    console.log("created");
  },

  mounted() {
    console.log("mounted");
  }

});

And within my-component.html.twig the code looks like this

{% block sw_text_editor_box %}
    Override this
{% endblock %}

The console.log functions are not triggered. If there is a console.log in the main.js it gets triggered.

There are no errors while building administration and storefront. What am I missing?


Solution

  • It works when using mt-text-editor instead of sw-text-editor