Open kavasey opened 6 years ago
I have found a better maintained fork here. Since this repo looks like abandoned, then I suggest you try asking the same question there.
@mtangoo Thanks for the mention. I'll check it out.
@mtangoo Thankyou
@moysoft you are welcome!
Hello,
Try this solution
jQuery(".dynamicform_wrapper").on("afterInsert", function(e, item) {
tinyMCE.init({selector: 'textarea'});
});
jQuery(".dynamicform_wrapper").on("afterDelete", function(e) {
tinyMCE.remove();
tinyMCE.init({selector: 'textarea'});
});
@kavasey Is it working in the suggested repo?
Hi. Thank you for your excellent extention. I have tried to integrate text editor using yii2-dynamicform but to no avail. I tried tinyMce(https://github.com/2amigos/yii2-tinymce-widget) but no success (first item does not get initialized thus display a textarea).
Then I tried https://github.com/2amigos/yii2-ckeditor-widget which had the first row initialized. subsequent rows don't get initialized.
I have the following as the snippet inside the widget foreach loop.
<?= $form->field($modelBlock, "[{$i}]description")->widget(CKEditor::className(), [ 'options' => ['rows' => 3], 'preset' => 'basic' ]); ?>
Any help or pointers would be appreciated.
Thank you.