>
      <h3>iframe sandbox</h3>
      <textarea id="codeEditor"></textarea>
      <button id="updatePreview">Update Preview</button>
    </div>
    
    <div class="preview">
      <iframe id="preview"></iframe>
      Sandbox controls
      <div class="controls" id="sandboxControls"></div>
    </div>
  </div>

  <script>
    // Default HTML template
    const defaultHtml = `<!DOCTYPE html>
<html>
<head>
  <style>
    .output {
      margin: 20px;
      padding: 10px;
      border: 1px solid #ccc;
    }
  </