Skip to content

Commit

Permalink
fix 4 Uncaught TypeError: Cannot read property
Browse files Browse the repository at this point in the history
'form.widgets.text-div' of undefined
  • Loading branch information
toutpt committed Dec 5, 2013
1 parent b2831b5 commit 3357495
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion collective/z3cform/html5widgets/wysiwyg.pt
Expand Up @@ -28,11 +28,12 @@
<script type="text/javascript" tal:content="string:$('#${jqid}-div').bind('input', function(event){
$('#${jqid}').attr('value', document.getElementById('${element_id}-div').innerHTML);
});
/*add ckeditor support which do not send input on change*/
setInterval(function(){
if (typeof CKEDITOR != 'undefined'){
if (typeof CKEDITOR.instances != 'undefined'){
var editor = CKEDITOR.instances['${element_id}-div'];
$('#${jqid}').attr('value', editor.getData());
}
}
}, 1000);"></script>

Expand Down

0 comments on commit 3357495

Please sign in to comment.