Open steinbachr opened 10 years ago
Great plugin! I have one small issue though. I need to clone a DOM element which contains an element I initialized a wysihtml5 instance with:
$('.target textarea').wysihtml5()
so I then do something like:
/* I need a deep clone */ var newContainer = $('.target').clone(true, true);
however, the textarea in the new container now has a textarea which is uneditable and doesn't include the value of the original text area.
I've tried to manually set the value of the editor in the new container using
newContainer.find('textarea').data('wysihtml5').editor.setValue('foo');
but this just sets the value of the original editor. I've also tried just creating a new instance of wysihtml5 on the textarea in the new container but that doesn't resolve the problem either. Any suggestions?
Great plugin! I have one small issue though. I need to clone a DOM element which contains an element I initialized a wysihtml5 instance with:
so I then do something like:
however, the textarea in the new container now has a textarea which is uneditable and doesn't include the value of the original text area.
I've tried to manually set the value of the editor in the new container using
but this just sets the value of the original editor. I've also tried just creating a new instance of wysihtml5 on the textarea in the new container but that doesn't resolve the problem either. Any suggestions?