Skip to content

Incorrect configuration when using RichEditor inside another RichEditor #279

@elyanory

Description

@elyanory

Hey! 👋

First of all, thank you for this plugin! I just noticed that when I put a RichEditor field in another RichEditor field, the configuration loaded is not necessarily that of the child but of the parent. This happens on this line (in templates/admin/app.html.twig):

setupRichEditor(editor, manager.tags, manager.locale); // Retrieve tags and locale from the parent manager

In the meantime, I've overridden the template like that:

editors.forEach(function (editor) {
    let tags = editor.dataset.tags.length === 0 ? [] : editor.dataset.tags.split(',')
    if (tags.length === 0) {
        tags = manager.tags;
    }
    setupRichEditor(editor, tags, manager.locale); // Retrieve tags and locale from the parent manager
});

But I imagine this is a potential bug?

  • Sylius version: 2.0.13
  • SyliusRichEditorPlugin version: 3.1.6

I can prepare a pull request if necessary.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions