| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| OpenPublisher-5-x86_64.AppImage | 2026-10-06 | 166.4 MB | |
| openpublisher5_amd64-windows-portable.exe | 2026-10-06 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-10-06 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-10-06 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-10-06 | 193.4 MB | |
| 5.4.5_ Highlighted Text Chunk Drag and Drop Within Text Box source code.tar.gz | 2026-10-06 | 22.5 MB | |
| 5.4.5_ Highlighted Text Chunk Drag and Drop Within Text Box source code.zip | 2026-10-06 | 22.7 MB | |
| README.md | 2026-10-06 | 17.1 kB | |
| openpublisher5_amd64-linux.rpm | 2026-10-06 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-10-06 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-10-06 | 156.2 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-10-06 | 185.5 MB | |
| Totals: 12 Items | 1.7 GB | 0 | |
π Summary
Version 5.4.5 of Open Publisher introduces native-fidelity drag-and-drop text chunk manipulation within and across editable text boxes, matching the rich editing experience found in desktop publishing tools and word processors (such as Microsoft Word, Microsoft Publisher, and Google Docs). In addition, this release resolves two text-interaction issues: restoring the text interact "I" icon (I-beam cursor) across all editable text areas and restoring spellcheck red squiggly underlines for misspelled words.
Prior to this release, attempting to click and drag across highlighted text inside a text box would either activate the canvas element dragging engine (accidentally moving the entire text box element across the page) or trigger element grouping when holding Ctrl. Users wishing to reposition phrases, words, or sentences were forced to rely exclusively on Cut (Ctrl+X) and Paste (Ctrl+V). Furthermore, hovering over text in text boxes was retaining the standard arrow pointer rather than switching to the text interact "I" icon, and misspelled words were not receiving red squiggly underlines due to a render-sweep attribute override.
In v5.4.5, text interaction and editing are fully unified:
- In-Place Move: Dragging a highlighted text chunk moves it directly to the target caret position.
- Ctrl-Key Duplicate / Copy: Holding
Ctrl(orCmdon macOS) while dragging duplicates the highlighted text chunk to the drop location while keeping the original selection intact. - Cross-Box Text Dragging: Dragging text from one text box into another separate text box moves or copies the text across elements seamlessly.
- Visual Insertion Caret: A high-visibility insertion caret (
#op-text-drag-caret) accurately marks the target character position in real time. - Floating Ghost Badge: A semi-transparent floating badge (
#op-text-drag-badge) follows the mouse cursor with a truncated preview of the dragging text. - Automatic Target Selection: Dropped text is automatically selected at the new location, allowing immediate subsequent styling or editing.
- Click-to-Collapse: Clicking highlighted text without dragging collapses the caret to the clicked position without modifying document content.
- Complete Undo / Redo Integration: Full integration with the document history engine (
Ctrl+ZandCtrl+Y), enabling instant restoration of exact text states. - Text Interact "I" Icon (I-Beam Cursor): Moving the cursor over text inside any text box now immediately shows the text interact "I" beam icon (
cursor: text), indicating interactivity, while reserving the move cursor (cursor: move) specifically for the outer 15px bounding edge. - Automatic Spellcheck Underlining Restored: Browser-native red squiggly underlines now appear under misspelled words as you type, with full synchronization across document pages, templates, and the Options dialog.
All cachebusters across index.html, the Service Worker cache (open-publisher-v5-4-5), and subsystem headers have been synchronized to v5.4.5.
π Problems Solved & Key Enhancements
- Text Chunk Drag vs. Element Drag Disambiguation:
- Problem: When a text box element had focused content, mousedown events on highlighted text bubbled up to
handleMouseDownincanvas/interaction.jsandcanvas/interaction-mouse.js, which interpreted the click as an element move operation. -
Solution in v5.4.5: Introduced
TextDragSystem.isPointInSelection(x, y). When a mousedown occurs over an active DOM text selection, element dragging is bypassed and the text drag system takes ownership of the interaction. -
Ctrl-Key Shield Interception:
- Problem: Holding
Ctrlwhile clicking was aggressively intercepted byinstallEventShieldinextensions/system-patches.jsfor multi-element grouping, preventing copy-drag behavior from starting. -
Solution in v5.4.5: Added a priority delegation check in
installEventShieldthat permitsctrlKeymousedown events to proceed when interacting with highlighted text inside a contenteditable element. -
Hybrid HTML5 Drag and Direct Mouse Fallback Pipeline:
- Problem: Chromium-based browsers handle dragging selected text via native HTML5 drag events (
dragstart,dragover,drop,dragend) when no modifiers are held, but switch to standard mouse events (mousedown,mousemove,mouseup) whenCtrlis held or in synthetic input environments. -
Solution in v5.4.5: Designed
canvas/text-drag.jsto operate as a dual-pipeline engine. It handles both native HTML5 drag events and raw mouse events in parallel, ensuring consistent move and copy behavior across all browsers and platforms. -
Synchronous History Transaction Flushing:
- Problem: Standard text editing pushes history snapshots with a 500ms debounce. Performing an immediate text drag-and-drop right after typing could conflate history states or skip intermediate snapshots.
-
Solution in v5.4.5: Upgraded
pushHistory(immediate = false)to support immediate synchronous execution (window.flushHistory()). The text drag system captures a snapshot immediately before mutation and flushes a snapshot immediately after drop execution. -
Text Hover "I" Beam Cursor Restoration:
- Problem: When hovering over text boxes, the mouse cursor remained an arrow pointer rather than switching to the standard text interaction "I" beam icon. A leftover inline
cursor: defaultoverride in mousemove events also caused cursor locks. -
Solution in v5.4.5: Applied explicit
cursor: textrules instyle.cssfor.element-content,[contenteditable="true"], and child text nodes. UpdatedhandleMouseMoveacrossinteraction.js,interaction-mouse.js,system-patches.js, andsmart-images.jsto cleanly differentiate the outer 15px bounding edge (cursor: move) from the internal text area (cursor: text), and removed the inlinecursor: defaultoverride fromcanvas/text-drag.js. -
Misspelled Words Underlining Restoration:
- Problem: Misspelled words were no longer being underlined with red wavy lines. In
extensions/ui-interactions.js, the post-render edit sweep was forcibly settingspellcheck="false"on every contenteditable element after each page render. Additionally, the toolbar spelling button used an outdated.pub-contentselector. - Solution in v5.4.5: Corrected the post-render sweep in
ui-interactions.jsto respectstate.spellCheck(defaulting totrue) and attachlang="en". Addedspellcheck="true"to<body>inindex.htmland initialized spellcheck at startup incore/boot.js. UpdatedaddTextBox(),toggleSpellCheck(),core/pages.js, andui/modals/options-modal.jsso spellcheck remains permanently active and fully toggleable.
π οΈ Complete Architectural Breakdown
1. Text Drag Engine (canvas/text-drag.js)
- Selection Detection (
isPointInSelection): UsescaretRangeFromPointorcaretPositionFromPointto accurately detect whether coordinates fall within the activewindow.getSelection()range. - State Machine: Tracks
isDragging,draggedText,draggedHtml,sourceElement,sourceRange,isCopy, anddropTarget. - Visual Caret (
#op-text-drag-caret): Dynamically positioned vertical bar matching the target element's computed font size and line height, clamped within the contenteditable boundary. - Ghost Badge (
#op-text-drag-badge): Floating pill badge showing a truncated preview of the dragging text with copy indicator (+) when Ctrl is held. - Drop Execution (
executeDrop): - Handles move vs. copy logic cleanly.
- Accounts for index offsets when moving text forward within the same text node.
- Selects the newly inserted range via
window.getSelection(). - Dispatches
inputevents and synchronizes document history.
2. Cursor Pipeline Coordination (style.css & Interaction Engines)
- CSS Styling (
style.css):css .element-content { width: 100%; height: 100%; overflow: visible; position: relative; user-select: text; pointer-events: auto; outline: none; cursor: text; } [contenteditable="true"], [contenteditable="true"] * { user-select: text !important; -moz-user-select: text !important; -webkit-user-select: text !important; cursor: text; } - Dynamic MouseMove Cursor Updates:
handleMouseMovecalculates distance from bounding edges (edgeSize = 15px). If within 15px, the cursor becomesmove; otherwise, it dynamically appliestextto the contenteditable node.
3. Spellcheck Architecture & Lifecycle Synchronization
- Boot Lifecycle (
core/boot.js): Initializesdocument.body.setAttribute('spellcheck', 'true')and queries all text elements to assignspellcheck="true"andlang="en". - Render Sweep (
extensions/ui-interactions.js): Evaluatesstate.spellCheckdynamically, ensuring rendered pages and templates preserve spellcheck:javascript const isSpell = typeof state !== 'undefined' ? (state.spellCheck !== false) : true; innerNode.setAttribute('spellcheck', isSpell ? 'true' : 'false'); if (isSpell) innerNode.setAttribute('lang', 'en'); - Proofing Options Synchronization (
ui/modals/options-modal.js): Toggling "Check spelling as you type" immediately updatesstate.spellCheck,localStorage, and all active canvas text nodes. - Ribbon Toggle (
elements/text/text.js):toggleSpellCheck()correctly targets.pub-element [contenteditable="true"]and updatesdocument.body.
π οΈ Files Modified
- canvas/text-drag.js: New core module implementing the text chunk drag-and-drop system, visual caret, ghost badge, and event listeners; removed cursor override in
onMouseMove. - style.css: Added explicit
cursor: textto.element-contentand[contenteditable="true"]blocks. - canvas/interaction.js: Integrated text selection check into
handleMouseDownand updated cursor dispatch inhandleMouseMove. - canvas/interaction-mouse.js: Prioritized text drag operations and updated mousemove cursor assignment on editable text.
- extensions/system-patches.js: Added text drag bypass to
installEventShieldandwindow.handleMouseDown; updated mousemove cursor dispatch; addedflushHistorysupport. - extensions/smart-images.js: Updated mousemove cursor dispatch for editable text.
- extensions/ui-interactions.js: Guarded file drop listeners; fixed post-render sweep to enable
spellcheck="true"andlang="en". - core/boot.js: Initialized spellcheck on body and text boxes at application boot.
- elements/text/text.js: Added spellcheck attributes to
addTextBox(); corrected element query selector intoggleSpellCheck(). - ui/modals/options-modal.js: Synchronized proofing checkbox with
state.spellCheckand active DOM elements. - core/pages.js: Enhanced spellcheck attribute preservation across document page rendering.
- ui/sidebar-context.js: Enhanced
createWrapperto ensurespellcheck="true"andlang="en"are applied. - core/history.js: Exposed
window.undo/window.redoand synchronized history state on restore. - extensions/legacy-fixes.js: Added
clearTextHistoryhelper and bumped version comment to v5.4.5. - index.html: Added script tag for
canvas/text-drag.js?v=5.4.5, setspellcheck="true"on body, and bumped asset cachebusters to?v=5.4.5. - sw.js: Updated Service Worker cache name to
open-publisher-v5-4-5and version header. - Subsystems synchronized:
pwa-install.js,geo-defense.js,arrow.js,templates.js,dashboard.js, andtheme-studio.js.
π§ͺ Verification & Automated Testing
Validated through automated Playwright end-to-end test suites (test_drag_suite.py and test_fixes.py):
| Test Scenario | Verification Metric | Result | Output Details |
|---|---|---|---|
| Text Hover Cursor | Move cursor over text inside text box | Passed | Computed and visual cursor confirmed as text (I-beam icon) |
| Text Edge Hover Cursor | Move cursor within 15px of bounding edge | Passed | Cursor switches to move for whole-element dragging |
| Cursor Return to Text | Move cursor from edge back over text content | Passed | Cursor cleanly transitions back to text |
| Startup Spellcheck State | Inspect body and initial state | Passed | document.body has spellcheck="true"; state.spellCheck is true |
| New Text Box Spellcheck | Create text box via addTextBox() |
Passed | Contains spellcheck="true" and lang="en" |
| Render Sweep Preservation | Re-render document page via renderPage() |
Passed | All editable text boxes retain spellcheck="true" and lang="en" |
| In-Box Text Drag & Move | Highlight text chunk, drag to new position | Passed | Chunk moved to target location; dropped text selected |
| History Undo & Redo | Press Ctrl+Z then Ctrl+Y following text move |
Passed | Undo accurately restored original text; Redo reapplied move |
| Ctrl+Drag to Copy | Hold Ctrl, drag text chunk to another location | Passed | Chunk duplicated at target; original text remained intact |
| Cross-Box Text Drag | Drag text chunk from Box 1 into Box 2 | Passed | Text removed from Box 1 and inserted into Box 2 at caret point |
| Click Without Drag | Click on highlighted text selection without moving | Passed | Selection collapsed to clicked caret position; zero text moved |
β Complete v5.4.5 Feature & Verification Checklist
- [x] Text Selection Point Detection: Implemented
TextDragSystem.isPointInSelectionchecking character coordinates against active selection bounds. - [x] Element Drag Disambiguation: Bypassed canvas element drag and multi-select when clicking inside highlighted text.
- [x] In-Box Text Move: Supported dragging highlighted text chunks to any valid character position within the same editable text box.
- [x] Ctrl-Key Text Duplication: Supported holding
Ctrl(orCmd) while dragging to duplicate the highlighted text chunk to the destination. - [x] Cross-Box Text Drag & Drop: Supported dragging text between separate text box elements on the canvas.
- [x] Visual Insertion Caret Indicator: Implemented
#op-text-drag-caretshowing real-time drop location during drag over editable text. - [x] Floating Ghost Badge: Implemented
#op-text-drag-badgefollowing the cursor with a preview of dragged text. - [x] Automatic Dropped Text Selection: Automatically highlighted the dropped text at the new destination upon release.
- [x] Click-to-Collapse Caret: Preserved native text editor behavior where clicking without dragging collapses the caret to the click point.
- [x] Full Undo / Redo Integration: Flushed immediate history snapshots before and after drag operations, enabling seamless
Ctrl+Z/Ctrl+Yrecovery. - [x] Text Hover "I" Beam Cursor: Ensured cursor over text displays the text interact "I" icon (
cursor: text), reservingmovefor the 15px outer border. - [x] Spellcheck Red Underline Recovery: Eliminated forced
spellcheck="false"overrides during page renders, ensuring browser-native red wavy underlines appear under misspelled words. - [x] Application-Wide Cachebuster Updates: Updated all asset references in
index.htmlto?v=5.4.5. - [x] Service Worker & PWA Version Bump: Updated cache name to
open-publisher-v5-4-5and registration query tosw.js?v=5.4.5. - [x] Automated Test Suite Pass: 100% pass rate across all drag-and-drop, cursor, and spellcheck test scenarios.
π Version 5.4.5 - Open Publisher