2

TinyMCE (WYSIWYG) is not showing up in a form field in Adminhtml DynamicRows container when more than one instance of the row is called.

<fieldset name="tab">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Contenu</item>
        </item>
    </argument>
    <dynamicRows name="contents">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="componentType" xsi:type="string">dynamicRows</item>
                <item name="addButtonLabel" xsi:type="string" translate="true">Ajouter un champs</item>
                <item name="deleteButtonLabel" xsi:type="string">Remove</item>
                <item name="additionalClasses" xsi:type="array">
                    <item name="admin__field-wide" xsi:type="boolean">true</item>
                </item>
            </item>
        </argument>
        <container name="record">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="isTemplate" xsi:type="boolean">true</item>
                    <item name="is_collection" xsi:type="boolean">true</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/dynamic-rows/record</item>
                    <item name="componentType" xsi:type="string">container</item>
                    <item name="positionProvider" xsi:type="string">contents_position</item>
                </item>
            </argument>
            <field name="contents_position">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="formElement" xsi:type="string">input</item>
                        <item name="source" xsi:type="string">news</item>
                        <item name="dataScope" xsi:type="string">contents_position</item>
                        <item name="fit" xsi:type="boolean">true</item>
                        <item name="disabled" xsi:type="boolean">true</item>
                        <item name="additionalClasses" xsi:type="array">
                            <item name="_hidden" xsi:type="boolean">true</item>
                        </item>
                    </item>
                </argument>
            </field>
            <field name="contents_text">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <!--<item name="formElement" xsi:type="string">textarea</item>-->
                        <item name="formElement" xsi:type="string">wysiwyg</item>
                        <item name="wysiwyg" xsi:type="boolean">true</item>
                        <item name="dataScope" xsi:type="string">contents_text</item>
                        <item name="source" xsi:type="string">news</item>
                    </item>
                </argument>
            </field>
            <actionDelete>
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="componentType" xsi:type="string">actionDelete</item>
                        <item name="dataType" xsi:type="string">text</item>
                        <item name="fit" xsi:type="boolean">true</item>
                    </item>
                </argument>
            </actionDelete>
        </container>
    </dynamicRows>
</fieldset>

Expected Result My expectation is, that the WYSIWYG editor shows up in every new row. The first one is working. Every next row does not show the WYSIWYG editor. Other instances of the WYSIWYG editor outside of dynamic rows (2 more instances) are showing up without any problems.

Any hint how to make this work would be highly appreciated!

  • problem reproduced on 2.3.2 also. – Marius Sep 3 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.