lightspeeddevelopment/lsx-customizer

View on GitHub
assets/js/lsx-customizer-editor.min.js

Summary

Maintainability
A
0 mins
Test Coverage
!function(i){wp.customizerCtrlEditor={init:function(){i(window).load(function(){i("textarea.wp-editor-area").each(function(){var e,n,o=i(this),t=o.attr("id"),r=tinyMCE.get(t);r&&r.onChange.add(function(t,i){t.save(),n=r.getContent(),clearTimeout(e),e=setTimeout(function(){o.val(n).trigger("change")},500)}),o.css({visibility:"visible"}).on("keyup",function(){n=o.val(),clearTimeout(e),e=setTimeout(function(){n.trigger("change")},500)})})})}},wp.customizerCtrlEditor.init()}(jQuery);