2amigos / yii2-tinymce-widget

TinyMCE WYSIWYG widget for Yii2
http://yiiwheels.com
Other
100 stars 48 forks source link

Facing issue when the plugin is used in Modal #24

Closed malaynayak closed 7 years ago

malaynayak commented 8 years ago

I am using this plugin in a form and the fom is loaded in a modal dialog. If the modal is loaded for the first time the plaugin works fine. The problem occures when the modal is opened more than once. The plugin does not get initialised perhaps. capture1 capture2

tonydspaniard commented 7 years ago

@malaynayak The problem with modals is that they clone the content of a layer. Therefore you need to call the initialization of the widget each time the popup opens. I highly recommend you to make use of the asset class only and then add the initialization js script on your on before show modal function.