1

I would like to transform the default textarea editor in my custom admin module with this module : https://github.com/Magenerds/PageDesigner

It is a module to create responsive content with CMS et block, it is perfectly working. Demo: https://www.youtube.com/watch?v=E0wZzVPFhM0

Now, I need to use this functionnality in my custom module, I tried to modify the di.xml file to modify the behavior of my module, not result.

Default di.xml:

<?xml version="1.0"?>
<!--
/**
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 */
 -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="\Magento\Widget\Block\Adminhtml\Widget\Form"
                type="\Magenerds\PageDesigner\Block\Adminhtml\Widget\Form"/>
    <preference for="Magento\Framework\App\Arguments\ValidationState"
                type="Magenerds\PageDesigner\Model\ValidationState"/>
    <preference for="Magenerds\PageDesigner\Utils\HtmlRendererInterface"
                type="Magenerds\PageDesigner\Utils\HtmlRenderer"/>

    <!-- Plugins -->
    <type name="\Magento\Cms\Model\Page">
        <plugin name="Magenerds_PageDesigner::cmsPageRenderJson"
                type="Magenerds\PageDesigner\Plugin\Cms\Model\Page\PagePlugin" sortOrder="100"/>
    </type>
    <type name="Magento\Cms\Model\Page\DataProvider">
        <plugin name="Magenerds_PageDesigner::injectPageHtmlIntoJson"
                type="Magenerds\PageDesigner\Plugin\Cms\Model\Page\DataProviderPlugin" sortOrder="100"/>
    </type>
    <type name="\Magento\Cms\Model\Block">
        <plugin name="Magenerds_PageDesigner::cmsBlockRenderJson"
                type="Magenerds\PageDesigner\Plugin\Cms\Model\Block\BlockPlugin" sortOrder="100"/>
    </type>

    <type name="Magento\Cms\Model\Block\DataProvider">
        <plugin name="Magenerds_PageDesigner::injectPageHtmlIntoJson"
                type="Magenerds\PageDesigner\Plugin\Cms\Model\Block\DataProviderPlugin" sortOrder="100"/>
    </type>

    <type name="Magento\Widget\Model\Widget">
        <plugin name="Magenerds_PageDesigner::widgetEncode"
                type="Magenerds\PageDesigner\Plugin\Model\WidgetPlugin"/>
    </type>
    <type name="Magento\Widget\Block\Adminhtml\Widget\Options">
        <plugin name="Magenerds_PageDesigner::widgetDecodeBackend"
                type="Magenerds\PageDesigner\Plugin\Block\WidgetOptionsPlugin"/>
    </type>
</config>

What is the best way to override my textarea with this module?

4
  • In your extension what you have try Sep 2, 2017 at 12:09
  • The problem is i do not know where to start, I tried to change the di.xml in the magendrs module but it does not work.
    – Mathieu
    Sep 2, 2017 at 12:56
  • First main question, do I have to change the magenerds module to override my custom module or change my module to use the custom page designer field?
    – Mathieu
    Sep 3, 2017 at 5:20
  • I suggest you to modif your module, so rest of the development working fine. Sep 4, 2017 at 2:54

0

Your Answer

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

Browse other questions tagged or ask your own question.