admin管理员组

文章数量:1355660

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?

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?

Share Improve this question edited Mar 30 at 12:57 sh0pware_n00b asked Mar 28 at 16:25 sh0pware_n00bsh0pware_n00b 214 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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

本文标签: shopware6Trying to override component swtexteditor in Shopware 67 RCStack Overflow