${$('#preview').innerHTML}\n`); w.document.close(); setTimeout(()=>{try{w.focus();w.print();}catch(e){}},300); } function doClear(){ Object.keys(state).forEach(k=>{ if(k==='date')state[k]=new Date().toISOString().slice(0,10); else state[k]=''; }); saveState(); renderForm(); renderPreview(); } function loadExample(){ state={fullName:'Robert James Carter',address:'142 Oakwood Drive',city:'Austin, Texas, USA',date:new Date().toISOString().slice(0,10),execName:'Mary Louise Carter',execAddr:'142 Oakwood Drive, Austin, TX 78701',altExecName:'David Kenneth Carter',spouseName:'Mary Louise Carter',children:'Emily Grace Carter\nDaniel Robert Carter',guardian:'Mary Louise Carter',bequests:'My wedding ring to my wife, Mary.\nMy 1965 Mustang to my son, Daniel.\n$10,000 to the American Red Cross.',residue:'my wife, Mary Louise Carter, if she survives me; otherwise in equal shares to my surviving children',burial:'Cremation, with ashes scattered at our family lake house.',jurisdiction:'the State of Texas, United States of America'}; saveState(); renderForm(); renderPreview(); } loadState(); renderForm(); renderPreview(); $('#toolbar').innerHTML = ``; GZ.renderToolPage({ category: 'text', titleKey: 'toolTitle', descKey: 'toolDesc', howToSteps: ['step1','step2','step3','step4'], related: [ {icon:'🏠', href:'/text/lease-agreement.html', name:'Lease Agreement'}, {icon:'💼', href:'/text/employment-contract.html', name:'Employment Contract'}, {icon:'🔒', href:'/text/nda-generator.html', name:'NDA Generator'}, {icon:'🧾', href:'/text/bill-of-sale-generator.html', name:'Bill of Sale'}, ] });