overtype 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -3
- package/dist/overtype.cjs +851 -977
- package/dist/overtype.cjs.map +4 -4
- package/dist/overtype.esm.js +53 -30
- package/dist/overtype.esm.js.map +2 -2
- package/dist/overtype.js +53 -30
- package/dist/overtype.js.map +2 -2
- package/dist/overtype.min.js +45 -39
- package/package.json +5 -2
- package/src/overtype.js +33 -28
- package/src/parser.js +48 -19
- package/src/styles.js +6 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OverType
|
|
2
2
|
|
|
3
|
-
A lightweight markdown editor library with perfect WYSIWYG alignment using an invisible textarea overlay technique. Includes optional toolbar. ~
|
|
3
|
+
A lightweight markdown editor library with perfect WYSIWYG alignment using an invisible textarea overlay technique. Includes optional toolbar. ~79KB minified with all features.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ A lightweight markdown editor library with perfect WYSIWYG alignment using an in
|
|
|
9
9
|
- ⌨️ **Keyboard shortcuts** - Common markdown shortcuts (Cmd/Ctrl+B for bold, etc.)
|
|
10
10
|
- 📱 **Mobile optimized** - Responsive design with mobile-specific styles
|
|
11
11
|
- 🔄 **DOM persistence aware** - Recovers from existing DOM (perfect for HyperClay and similar platforms)
|
|
12
|
-
- 🚀 **Lightweight** - ~
|
|
12
|
+
- 🚀 **Lightweight** - ~79KB minified
|
|
13
13
|
- 🎯 **Optional toolbar** - Clean, minimal toolbar with all essential formatting
|
|
14
14
|
- ✨ **Smart shortcuts** - Keyboard shortcuts with selection preservation
|
|
15
15
|
- 🔧 **Framework agnostic** - Works with React, Vue, vanilla JS, and more
|
|
@@ -24,7 +24,7 @@ We overlap an invisible textarea on top of styled output, giving the illusion of
|
|
|
24
24
|
|
|
25
25
|
| Feature | OverType | HyperMD | Milkdown | TUI Editor | EasyMDE |
|
|
26
26
|
|---------|----------|---------|----------|------------|---------|
|
|
27
|
-
| **Size** | ~
|
|
27
|
+
| **Size** | ~79KB | 364.02 KB | 344.51 KB | 560.99 KB | 323.69 KB |
|
|
28
28
|
| **Dependencies** | Bundled | CodeMirror | ProseMirror + plugins | Multiple libs | CodeMirror |
|
|
29
29
|
| **Setup** | Single file | Complex config | Build step required | Complex config | Moderate |
|
|
30
30
|
| **Approach** | Invisible textarea | ContentEditable | ContentEditable | ContentEditable | CodeMirror |
|
|
@@ -552,6 +552,26 @@ Special thanks to:
|
|
|
552
552
|
|
|
553
553
|
MIT
|
|
554
554
|
|
|
555
|
+
## Related Projects
|
|
556
|
+
|
|
557
|
+
### Synesthesia
|
|
558
|
+
|
|
559
|
+
[Synesthesia](https://github.com/panphora/synesthesia) is a lightweight syntax highlighting editor library that extracted and refined the core textarea overlay technique from OverType. While OverType is focused on markdown editing with toolbar features, Synesthesia provides a more generalized code editing solution with:
|
|
560
|
+
|
|
561
|
+
- **Pluggable parser system** - Support for any programming language or syntax
|
|
562
|
+
- **Parser registry** - Automatic language detection by file extension or MIME type
|
|
563
|
+
- **Cleaner separation** - Extracted the overlay technique without markdown-specific features
|
|
564
|
+
- **Smaller footprint** - ~79KB minified (vs OverType's ~78KB)
|
|
565
|
+
|
|
566
|
+
Key components extracted from OverType to Synesthesia:
|
|
567
|
+
- The transparent textarea overlay technique for perfect WYSIWYG alignment
|
|
568
|
+
- Theme system with CSS variable support
|
|
569
|
+
- DOM persistence and recovery mechanisms
|
|
570
|
+
- Auto-resize functionality
|
|
571
|
+
- Event delegation for efficient multi-instance support
|
|
572
|
+
|
|
573
|
+
If you need a markdown editor with toolbar and formatting features, use OverType. If you need a lightweight code editor with custom syntax highlighting, check out Synesthesia.
|
|
574
|
+
|
|
555
575
|
## Contributing
|
|
556
576
|
|
|
557
577
|
Contributions are welcome! Please feel free to submit a Pull Request.
|