UNPKG

tiny-essentials

Version:

Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.

43 lines (26 loc) β€’ 1.33 kB
## πŸ“¦ Text Power + Clipboard Magic! ✨ ### πŸ’‘ What's New #### ✍️ **TinyTextRangeEditor** A powerful and flexible utility for manipulating text ranges inside `input` and `textarea` elements. It’s designed for rich editing, precise control, and extensibility. Features include: * 🎯 `insertText`, `wrapWithTag`, `insertSelfClosingTag`, `toggleTag`, `toggleCode` and more! * πŸ” Chainable API support for clean syntax. * ⚠️ Built-in error throwing to prevent misuse. * 🧠 Auto-spacing for inserted values (optional). * 🎯 Focus control and inline tag logic. * 🧩 Attribute handling and fine-grained cursor/selection positioning. #### πŸ“‹ **TinyClipboard** A clean and smart clipboard manager that supports: * βœ… Modern `navigator.clipboard` API. * πŸ› οΈ Fallback using `document.execCommand`. * πŸ“ Custom copy functions for both text and blobs. --- ### 🧱 Improvements #### 🧱 **TinyHtml** * βœ‚οΈ Added `listenForPaste`, `hasEventListener`, and `hasExactEventListener` methods to enhance DOM event logic. --- ### πŸ“š Documentation * πŸ†• `TinyTextRangeEditor` and `TinyClipboard` added to the official documentation menu! --- Enjoy the new editing powers and clipboard flexibility! **Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.17.1...1.18.0