A web-based, drag-and-drop HTML editor for creating and prototyping web layouts with real-time preview, code editing, and dark mode support. Built with HTML, CSS, JavaScript, and powered by libraries like Interact.js and Highlight.js.
Live Demo on GitHub Pages
Download v1.0.0
- Drag-and-Drop Interface: Add and position elements like divs, text, images, buttons, forms, flexbox, grids, and cards.
- Real-Time Preview: See your changes instantly in an iframe preview.
- Code Editors: Edit HTML, CSS, and JavaScript with syntax highlighting (via Highlight.js).
- Properties Panel: Adjust element properties like position, size, colors, and content.
- Snapping: Align elements with snap guides for precise layouts.
- Undo/Redo: Revert or redo changes with history support (Ctrl+Z, Ctrl+Y).
- Dark Mode: Toggle between light and dark themes (Ctrl+D).
- Project Management: Save, load, and export projects as HTML, CSS, and JS files.
- Keyboard Shortcuts: Streamline workflow with shortcuts (e.g., Ctrl+S to save, ? for shortcuts panel).
- Responsive Design: Adapts to smaller screens for mobile use.
- Auto-Save: Automatically saves your project every 30 seconds.
Light Theme | Dark Theme |
---|---|
![]() |
![]() |

- Visit the Live Demo.
- Start creating by dragging elements from the tools panel to the canvas.
- Edit code in the HTML, CSS, or JavaScript tabs.
- Save or export your project using the toolbar buttons.
- Download the latest release:
- HTMLEditor-v1.0.0.html from the Releases page.
- Open the
HTMLEditor-v1.0.0.html
file in a modern web browser (Chrome, Firefox, Edge, etc.). - Use the editor as described in the Usage section.
- Clone the repository:
git clone https://github.com/NellowTCS/HTMLEditor.git
- Open
index.html
in a web browser or serve it using a local server (e.g.,npx serve
). - Modify the code to add features or customize the editor.
-
Add Elements:
- Use the Tools Panel to add elements (e.g., Div, Text, Button, Flexbox).
- Click an element button to add it to the canvas at (50px, 50px).
-
Position and Resize:
- Drag elements to reposition them (snapping enabled by default).
- Use resize handles or the Properties Panel to adjust size.
- Fine-tune position with Ctrl + Arrow Keys or resize with Shift + Arrow Keys.
-
Edit Code:
- Switch between HTML, CSS, and JavaScript tabs to edit code.
- Changes reflect instantly in the preview.
-
Manage Projects:
- Save: Click "Save" or press Ctrl+S to store the project in localStorage.
- Load: Click "Load" to restore a saved project.
- Export: Click "Export" or press Ctrl+E to download
index.html
,styles.css
, andscript.js
. - Delete: Select an element and click "Delete" or press Delete.
-
Toggle Features:
- Dark Mode: Click the theme switch or press Ctrl+D.
- Properties Panel: Click "Properties" or press Ctrl+P.
- Shortcuts: Click "Shortcuts" or press ? to view the shortcuts panel.
-
View Preview:
- The right pane shows a live preview of your project, updated in real-time.
Shortcut | Action |
---|---|
Ctrl + Z |
Undo |
Ctrl + Y |
Redo |
Delete |
Delete selected element |
Ctrl + S |
Save project |
Ctrl + E |
Export project |
Ctrl + D |
Toggle dark mode |
Ctrl + P |
Toggle properties panel |
Ctrl + Arrow Keys |
Fine-tune element position |
Shift + Arrow Keys |
Resize selected element |
? |
Show shortcuts panel |
- Interact.js - Drag-and-drop and resizing functionality
-
Highlight.js - Syntax highlighting for code editors
-
No server-side dependencies; runs entirely in the browser
- Chrome, Firefox, Edge, Safari (latest versions)
- Responsive design for mobile devices (some features may be limited)
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -m "Add new feature"
). - Push to the branch (
git push origin feature/new-feature
). - Open a Pull Request.
Please include a detailed description of your changes and ensure the code follows the existing style.
Found a bug or have a feature request? Please open an issue with:
- A clear description of the problem or request
- Steps to reproduce (if applicable)
- Screenshots or error messages (if relevant)
This project is licensed under the MIT License. See the LICENSE file for details.
- Built by NellowTCS
- Powered by Interact.js and Highlight.js
- Inspired by modern web design tools for websites.