Open-Source Ruler Plugin Brings Margin Controls to Popular Web Text Editors
A developer has released an open-source library called @devslab/editor-ruler that adds a horizontal ruler to web-based rich-text editors such as Froala, TinyMCE, CKEditor 5, and Tiptap — a feature that has been absent from most of these tools despite being standard in desktop word processors for decades. The library maps ruler handles directly to inline CSS properties like margin-left, margin-right, and text-indent, ensuring that formatted output remains portable across emails, CMS platforms, and web pages. It ships as an editor-agnostic core with zero dependencies, plus thin adapter packages for each supported editor, all licensed under Apache-2.0. Key features include guide lines with snapping, cm/inch/px unit switching, ARIA-compliant keyboard operability, and a single undo step per drag gesture. The project has reached version 1.0 with a stable API under semantic versioning, and a live demo with one-click sandboxes is available on GitHub.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in