PLACEHOLD(1)
PLAYGROUND(1)

Embed Playground

Write HTML, CSS, and JS that use the placehold.cloud API. See live results and share your creations.

Preview

Templates

`; this.$refs.preview.srcdoc = doc; }, share() { const payload = btoa(JSON.stringify({ h: this.html, c: this.css, j: this.js })); const url = window.location.origin + '/playground#' + payload; navigator.clipboard.writeText(url); alert('Link copied to clipboard!'); }, loadFromHash() { if (window.location.hash.length > 1) { try { const data = JSON.parse(atob(window.location.hash.slice(1))); this.html = data.h || ''; this.css = data.c || ''; this.js = data.j || ''; } catch (e) {} } }, loadTemplate(name) { const t = templates[name]; this.html = t.html; this.css = t.css; this.js = t.js; this.tab = 'html'; this.$nextTick(() => this.run()); } }; }