0

I am adding WYSIWYG editor using the UI component in the magento2 custom module. But when I am adding the data by widget then it is not showing in a proper way. What is the issue?

 *custom_hello_data.xml file in uicomponent.* <field name="content"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="dataType" xsi:type="string">text</item> <item name="formElement" xsi:type="string">wysiwyg</item> <item name="source" xsi:type="string">content</item> <item name="label" xsi:type="string">Content</item> <item name="template" xsi:type="string">ui/form/field</item> <item name="wysiwyg" xsi:type="boolean">true</item> <item name="dataScope" xsi:type="string">content</item> <item name="sortOrder" xsi:type="number">50</item> <item name="rows" xsi:type="number">8</item> <item name="wysiwygConfigData" xsi:type="array"> <item name="is_pagebuilder_enabled" xsi:type="boolean">false</item> <item name="toggle_button" xsi:type="boolean">true</item> <item name="height" xsi:type="string">200px</item> <item name="add_variables" xsi:type="boolean">true</item> <item name="add_widgets" xsi:type="boolean">true</item> <item name="add_images" xsi:type="boolean">true</item> <item name="add_directives" xsi:type="boolean">true</item> </item> </item> </argument> </field> 

in frontend for print the data I am using template file

enter image description here

2
  • post your code... Commented Apr 20, 2020 at 11:59
  • In frontend layout I am using this to print the data of editor. and it is working fine but after adding the data from Widget then it show html content <?php echo $data['content']; ?> Commented Apr 21, 2020 at 6:52

1 Answer 1

0

can check following solution https://www.rakeshjesadiya.com/how-to-filter-static-block-content-in-template-file-using-magento-2/

need prepare cms-content, convert variables to text.

like for email template.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.