-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Pulling my old issue from magento/magento2#23571
Description (*)
The Magento Wysiwyg plugin for tinymce4 does not detect a widget when it has a new line in the data because of a regex. Changing this regex would add support for textarea inputs and other inputs which might have a newline in widgets.
This regex should be changed:
(old)
return content.gsub(/\{\{widget(.*?)\}\}/i, function (match) {
(suggested)
return content.gsub(/\{\{widget([^}]*?)\}\}/i, function (match) {
Expected behavior (*)
Wysiwyg widgets should not break with newline characters in the text data.
Benefits
Would allow for widgets with data that have newlines inside them. Currently the base installation of Magento does not have any widget inputs that can have newlines in them, but would add room for developers to create their own textarea/wysiwyg inputs.