1

I have added a page builder field to my admin form but it seems I can't apply any templates (the dialog doesn't show up and neither do any errors) and configure any elements (same behaviour). I can save templates no problem.

The code for the form element:

<field name="short_content" formElement="wysiwyg" sortOrder="10">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="source" xsi:type="string">Category</item>
        </item>
    </argument>
    <settings>
        <additionalClasses>
            <class name="admin__field-wide">true</class>
        </additionalClasses>
        <label translate="true">Short Content</label>
        <dataScope>short_content</dataScope>
    </settings>
    <formElements>
        <wysiwyg>
            <settings>
                <wysiwyg>true</wysiwyg>
            </settings>
        </wysiwyg>
    </formElements>
</field>
0

1 Answer 1

3

It turns out to get the modals for the page builder loaded you need to add <update handle="editor"/> to the corresponding layout.

<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="styles"/>
    <update handle="editor"/>
    <body>
        <referenceContainer name="content">
            <uiComponent name="post_form"/>
        </referenceContainer>
    </body>
</page>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.