I have found that the layout handle
adminhtml_widget_index is being loaded via AJAX to get that content, however, I have noticed that any script tags in my template file are being removed.
For demonstration purposes the phtml file I am using looks like
I have the
<h2> tag showing on the widget modal form, but looking at the source there is no script tag.
Looking further into how the widget renders, using the
\Magento\Widget\Block\Adminhtml\Widget class, there is a
If anyone has any useful information, I'd be delighted to hear it.
Thanks in advance!
$_formScripts array, which doesn't seem like best practice, so even if using the
$_formScripts array is how we should do it, if you could provide an example of how, that would also be fantastic!