Pro Notion‑Style HTML Editor
HTML Editor Workspace
Notion‑style, professional, single‑file

Professional Notion‑Style HTML Editor

This is a single‑file, professional‑feeling editor designed to behave more like a real Notion‑style workspace and less like a visual demo. Everything you need is embedded in this one HTML document: editor, toolbar, command palette, copy/export tools.

What this page gives you

  • A contentEditable editor with headings, paragraphs, lists, and code blocks.
  • A toolbar for common formatting (bold, italic, lists, headings).
  • A Copy button that copies the editor’s HTML to your clipboard.
  • An Export button that downloads the entire page as a self‑contained HTML file.
  • A command palette (Ctrl+K) for quick actions.
  • An About modal that documents behavior and shortcuts.

Bookmarklet & DevTools context

This editor is designed to help you capture and refine ideas like:

  • ✅ How bookmarklets work in Edge/Chromium and other browsers.
  • ✅ DevTools console capabilities and constraints.
  • ✅ How downloads are triggered from scripts.
  • ✅ What’s allowed (and what isn’t) for DOM exports.

Bookmarklet basics

A bookmarklet is simply a bookmark whose “URL” is JavaScript.

javascript:(function(){/* your code */})();

When clicked, it runs on the current page, with the same security rules as any in‑page JavaScript.

DevTools DOM export pattern

A common pattern for exporting the current page DOM to HTML from DevTools looks like this:

(() => {
  const html = "<!doctype html>\n" + document.documentElement.outerHTML;
  const filename = document.title.replace(/[\\/:*?"<>|]/g, "_") || "page";
  const blob = new Blob([html], { type: "text/html" });
  const url = URL.createObjectURL(blob);
  const link = document.createElement("a");
  link.href = url;
  link.download = `${filename}.html`;
  document.body.appendChild(link);
  link.click();
  document.body.removeChild(link);
})();

This is the same logic the Export button in this page uses, just wrapped for your own notes.

Edge/Chromium behavior

BehaviorBookmarkletDevTools
Access DOM of current tabYesYes
Trigger download promptYesYes
Access background tabsNoNo
Save multiple tabs automaticallyNoNo (without extension)

How to use this editor

  • Edit directly in the main area like a Notion page.
  • Use the toolbar or Ctrl+B/Ctrl+I for quick formatting.
  • Click Copy to grab the raw HTML for embedding somewhere else.
  • Click Export (or press Ctrl+S) to save a snapshot of this page as a single HTML file.
Editing surface: HTML Editor Workspace
Ctrl+K Command palette    Ctrl+S Export HTML

Comments

Popular posts from this blog