Context and guidance for working with the HTML Position Editor codebase - a visual drag-and-drop editor for adjusting element positions in fixed-dimension HTML presentations using CSS transforms.
This skill has safety concerns that you should review before use. Some patterns were detected that may pose a risk.Safety score: 60/100.
KillerSkills scans all public content for safety. Use caution before installing or executing flagged content.
This skill provides context and guidance for working with the HTML Position Editor codebase - a visual drag-and-drop editor for adjusting element positions in fixed-dimension HTML presentations (375×667px). The editor uses CSS transforms for positioning without modifying the content structure.
Provides comprehensive context about the HTML Position Editor project architecture, file structure, development setup, and common tasks. Enables you to effectively understand, modify, and extend the single-file application.
```
simplehtmleditor/
├── index.html # Single-file application (HTML, CSS, JavaScript)
├── html/ # Sample HTML files
│ └── sample01.html
├── docs/
│ └── html-editor-requirements.md
├── README.md
├── LICENSE
└── CLAUDE.md # Project guidance file
```
The entire application is contained within `index.html` with inline CSS and JavaScript, organized into logical sections:
1. **HTML Structure**: Editor UI with toolbar, preview frame, and layer panel
2. **CSS Styles**: Organized with CSS variables for theming
3. **JavaScript Application**: Object-based architecture with modular components
The application uses an object-based module pattern with the following components:
Start a local development server for proper CORS handling:
```bash
python -m http.server 8000
```
When exploring or modifying the code:
#### Adding New Features
1. Create a new manager method on `EditorApp` object
2. Update `EditorApp.init()` to initialize your feature
3. Add UI elements to the HTML structure section
4. Wire up event handlers in `eventHandler` module
#### Modifying Element Manipulation
Key functions in `elementManager`:
#### Testing Export Functions
```javascript
// Test PDF export (print dialog)
EditorApp.exportManager.exportToPDF()
// Test PDF export (image)
EditorApp.exportManager.exportToPDFImage()
// Test SVG export
EditorApp.exportManager.exportToSVG()
```
Use these console commands to inspect application state:
```javascript
// View current state
console.log(EditorApp.state)
// Check frame document
console.log(EditorApp.getFrameDocument())
// Check current selection
console.log(EditorApp.state.selectedElement)
// List all movable elements
console.log(EditorApp.state.movableElements)
// Force history save
EditorApp.historyManager.saveState()
// Clear selection
EditorApp.elementManager.clearSelection()
```
External dependencies are loaded from CDN:
These are referenced via `<script>` tags in the HTML head section.
Use this skill when you need to:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/html-position-editor-guide/raw