What HTML Editor does
The HTML Editor pairs a source textarea with a live sandboxed iframe. As you type, PagesTools builds a preview document with a restrictive content security policy and no iframe privileges, preventing scripts, form submission, pop-ups, top navigation, same-origin access, and network-loaded resources from running in the preview.
The editor is intentionally lightweight: it does not format, validate, lint, autocomplete, or repair markup. The downloadable file contains the source exactly as you entered it, including code that the preview refused to execute. Treat the sandbox as a viewing boundary, not as a sanitizer for HTML you later deploy elsewhere.
How to use HTML Editor
- Replace the sample markup in the HTML source field with your fragment or document content.
- Watch the local preview update as you edit headings, text, and inline styles.
- Review the source separately for validity, accessibility, and production safety.
- Copy or download edited.html and integrate it through your normal development workflow.
Important details
The preview is deliberately restricted
It allows inline CSS plus data-based images, media, and fonts, but blocks network resources and gives the iframe no script, form, navigation, pop-up, or same-origin privileges. Features that depend on those capabilities will not run.
Preview safety does not rewrite the source
PagesTools wraps the markup for display but does not remove dangerous or invalid code from the textarea. If you download and serve that source outside the sandbox, the destination environment's permissions apply.
HTML fragments are supported
You can work with a small component fragment without supplying html, head, or body elements. The preview wrapper supplies a UTF-8 document and a basic system-font body style.
Practical uses
- Draft a small static content block before moving it into a project.
- Demonstrate basic HTML structure in a constrained teaching preview.
- Check how headings, lists, tables, and inline CSS compose without a build step.
Privacy and limitations
Editing and preview rendering occur in the browser, and the preview policy blocks external network loads. The source is not sent to PagesTools or another service unless you later publish or transmit the downloaded file yourself.
The editor does not validate, sanitize, lint, format, execute JavaScript, submit forms, or load external assets. The sandbox can make production markup look incomplete, and downloaded source must still receive a security and quality review.