// Name: Persistent Editor Widget // Description: Opens a persistent editor widget window; run multiple times to open multiple editors. // Author: tayiorbeii // GitHub: tayiorbeii import "@johnlindquist/kit" const title = `Editor — ${formatDate(new Date(), "yyyy-MM-dd HH:mm:ss")}` await widget( ` <div class="flex flex-col h-screen bg-zinc-900 text-zinc-100"> <div class="flex items-center gap-3 px-3 py-2 bg-zinc-800 border-b border-zinc-700"> <div class="w-2 h-2 rounded-full bg-red-500"></div> <div class="w-2 h-2 rounded-full bg-yellow-500"></div> <div class="w-2 h-2 rounded-full bg-green-500"></div> <div class="ml-3 font-semibold truncate">${title}</div> <div class="ml-auto text-xs opacity-60">This window stays open until you close it.</div> </div> <textarea autofocus spellcheck="false" placeholder="Start typing..." class="flex-1 w-full p-4 bg-zinc-900 text-zinc-100 placeholder-zinc-500 outline-none resize-none font-mono text-sm leading-6" ></textarea> </div> `, { width: 900, height: 600, } )