Preview in Editor

  • Hello,


    I'd like to create a preview-functionality for my little extension.


    I created a item-preview.vue and added this:



    This should be called in my editor-plugin.js like this:


    Code
    1. replaceInPreview: function (data, index) {
    2. ...
    3. return '<item-preview index="' + index + '"></item-preview>';
    4. }


    and


    Code
    1. components: {
    2. 'item-preview': require('./item-preview.vue')
    3. }


    There are no errors in the JS-console. Maybe I am missing something?