I have created a custom widget and it contains a WYSIWYG field. Everything works fine except the add widget option.
When I add the widget it will displayed in the editor. When I click the save button, it redirects to the admin dashboard.
I have followed the below url to create WYSIWYG field in custom widget.
How can I fix this?
Here is the issue
Best Answer
app/code/VendoreName/ModuleName
registration.php
app/code/VendoreName/ModuleName/etc
module.xml
app/code/VendoreName/ModuleName/etc/adminhtml
routes.xml
app/code/VendoreName/ModuleName/etc/frontend
routes.xml
app/code/VendoreName/ModuleName/etc
widget.xml
app/code/VendoreName/ModuleName/Block/Widget
Posts.php
app/code/VendoreName/ModuleName/Block/Widget
Editor.php
app/code/VendoreName/ModuleName/Block/view/frontend/templates/widget
posts.phtml
Click here to show
Above code is running perfectly