https://github.com/joepdooper/mini-editor
A lightweight, dependency-free WYSIWYG editor implemented in vanilla JavaScript.
https://github.com/joepdooper/mini-editor
Last synced: 4 months ago
JSON representation
A lightweight, dependency-free WYSIWYG editor implemented in vanilla JavaScript.
- Host: GitHub
- URL: https://github.com/joepdooper/mini-editor
- Owner: joepdooper
- License: mit
- Created: 2025-05-10T13:41:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-25T21:33:50.000Z (5 months ago)
- Last Synced: 2026-03-26T19:42:53.689Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MiniEditor
A lightweight, dependency-free WYSIWYG editor implemented in vanilla JavaScript.
### Install:
```bash
npm install @joepdooper/mini-editor
```
### Features:
- Inline content editing with a floating formatting toolbar
- Supports bold, italic, underline, headings, blockquotes, and links
- Automatically positions toolbar based on text selection
- Handles plain text pasting to prevent unwanted formatting
- Syncs editable content with hidden inputs for form submission
```html
Bold
Italic
Underline
Link
```
```javascript
document.addEventListener('DOMContentLoaded', () => {
MiniEditor.initAll('.editor-block', '#toolbar');
});
```