var KTQuilDemos={init:function(){var e,o,n;new Quill("#kt_quil_1",{modules:{toolbar:[[{header:[1,2,!1]}],["bold","italic","underline"],["image","code-block"]]},placeholder:"Type your text here...",theme:"snow"}),e=Quill.import("delta"),o=new Quill("#kt_quil_2",{modules:{toolbar:!0},placeholder:"Type your text here...",theme:"snow"}),n=new e,o.on("text-change",function(e){n=n.compose(e)}),setInterval(function(){n.length()>0&&(console.log("Saving changes",n),n=new e)},5e3),window.onbeforeunload=function(){if(n.length()>0)return"There are unsaved changes. Are you sure you want to leave?"}}};jQuery(document).ready(function(){KTQuilDemos.init()});