The contenteditable
attribute and designMode
property in HTML bring being able to edit any web page like it’s a document without touching design tools or development environment into reality. These become particularly powerful when designers and product managers have the ability to experiment with UI changes live in the browser, iterate with speed, and effectively communicate an idea.
contenteditable
Attribute:
Addingcontenteditable="true"
to an HTML element allows it to be edited directly in the browser. This works for elements like<div>
,<span>
, or<p>
and retains the element’s styling, providing a real-time editing experience.designMode
Property:
By settingdocument.designMode = "on";
oriframeNode.contentDocument.designMode = "on";
, you can enable editing for the entire document or iframe content, turning your browser into a live design canvas.
Why It Matters for Designers and PMs
Designers and PMs more often than not have to test or propose changes without having to wait for developers or learn all kinds of complex tools. The following features let them do that quickly and intuitively:
- Visualize changes directly in the medium, that is, the web browser.
- Quickly iterate on copy, layout, or style configurations during presentations or in user feedback sessions.
- Share updated concepts with developers as a kind of proof of concept.
Three Real-Life Examples
1. Quickly Test UI Copy Adjustments
Let’s say you’re evaluating a landing page headline or CTA button text. By setting contenteditable
on the text elements:
<h1 contenteditable="true">Welcome to Our Website</h1>
You can edit the headline in real time and see how it feels in the existing layout. This is especially useful for A/B testing ideas during team meetings.
2. Create Mockups Without Leaving the Browser
Activate document.designMode
to test various design elements:
document.designMode = "on";
You can move elements around, experiment with text, and adjust alignments without ever touching a design tool. Once done, take a screenshot or share the modified page link with stakeholders.
3. Simulate Customer Feedback Changes in a Demo
During a demo, a client might suggest changes to UI text or layout. With iframeNode.contentDocument.designMode = "on";
, you can edit within a contained environment (iframe) to incorporate feedback immediately, impressing clients with your responsiveness.
Step-by-Step: See It in Action
- Open a webpage in your browser of choice that has a Inspect or Developer Mode
- Open the Developer Console (F12 or right-click -> Inspect).
- Enter the following in the console to enable
designMode
:document.designMode = "on";
- Click and start editing any text or repositioning content directly.
For more control, set specific elements to contenteditable
:
document.querySelectorAll('h1, p').forEach(el => el.setAttribute('contenteditable', 'true'));
See It Live

Features like contenteditable
and designMode
are game-changers in terms of closing the gap between design and development. This enables non-technical roles to participate in active, simple UI refinement, thus enabling quicker iteration and clearer communication with development teams.