Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 5.4.5
Name Modified Size InfoDownloads / 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 (or Cmd on 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+Z and Ctrl+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

  1. Text Chunk Drag vs. Element Drag Disambiguation:
  2. Problem: When a text box element had focused content, mousedown events on highlighted text bubbled up to handleMouseDown in canvas/interaction.js and canvas/interaction-mouse.js, which interpreted the click as an element move operation.
  3. 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.

  4. Ctrl-Key Shield Interception:

  5. Problem: Holding Ctrl while clicking was aggressively intercepted by installEventShield in extensions/system-patches.js for multi-element grouping, preventing copy-drag behavior from starting.
  6. Solution in v5.4.5: Added a priority delegation check in installEventShield that permits ctrlKey mousedown events to proceed when interacting with highlighted text inside a contenteditable element.

  7. Hybrid HTML5 Drag and Direct Mouse Fallback Pipeline:

  8. 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) when Ctrl is held or in synthetic input environments.
  9. Solution in v5.4.5: Designed canvas/text-drag.js to 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.

  10. Synchronous History Transaction Flushing:

  11. 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.
  12. 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.

  13. Text Hover "I" Beam Cursor Restoration:

  14. 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: default override in mousemove events also caused cursor locks.
  15. Solution in v5.4.5: Applied explicit cursor: text rules in style.css for .element-content, [contenteditable="true"], and child text nodes. Updated handleMouseMove across interaction.js, interaction-mouse.js, system-patches.js, and smart-images.js to cleanly differentiate the outer 15px bounding edge (cursor: move) from the internal text area (cursor: text), and removed the inline cursor: default override from canvas/text-drag.js.

  16. Misspelled Words Underlining Restoration:

  17. Problem: Misspelled words were no longer being underlined with red wavy lines. In extensions/ui-interactions.js, the post-render edit sweep was forcibly setting spellcheck="false" on every contenteditable element after each page render. Additionally, the toolbar spelling button used an outdated .pub-content selector.
  18. Solution in v5.4.5: Corrected the post-render sweep in ui-interactions.js to respect state.spellCheck (defaulting to true) and attach lang="en". Added spellcheck="true" to <body> in index.html and initialized spellcheck at startup in core/boot.js. Updated addTextBox(), toggleSpellCheck(), core/pages.js, and ui/modals/options-modal.js so spellcheck remains permanently active and fully toggleable.

πŸ› οΈ Complete Architectural Breakdown

1. Text Drag Engine (canvas/text-drag.js)

  • Selection Detection (isPointInSelection): Uses caretRangeFromPoint or caretPositionFromPoint to accurately detect whether coordinates fall within the active window.getSelection() range.
  • State Machine: Tracks isDragging, draggedText, draggedHtml, sourceElement, sourceRange, isCopy, and dropTarget.
  • 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 input events 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: handleMouseMove calculates distance from bounding edges (edgeSize = 15px). If within 15px, the cursor becomes move; otherwise, it dynamically applies text to the contenteditable node.

3. Spellcheck Architecture & Lifecycle Synchronization

  • Boot Lifecycle (core/boot.js): Initializes document.body.setAttribute('spellcheck', 'true') and queries all text elements to assign spellcheck="true" and lang="en".
  • Render Sweep (extensions/ui-interactions.js): Evaluates state.spellCheck dynamically, 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 updates state.spellCheck, localStorage, and all active canvas text nodes.
  • Ribbon Toggle (elements/text/text.js): toggleSpellCheck() correctly targets .pub-element [contenteditable="true"] and updates document.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: text to .element-content and [contenteditable="true"] blocks.
  • canvas/interaction.js: Integrated text selection check into handleMouseDown and updated cursor dispatch in handleMouseMove.
  • 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 installEventShield and window.handleMouseDown; updated mousemove cursor dispatch; added flushHistory support.
  • 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" and lang="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 in toggleSpellCheck().
  • ui/modals/options-modal.js: Synchronized proofing checkbox with state.spellCheck and active DOM elements.
  • core/pages.js: Enhanced spellcheck attribute preservation across document page rendering.
  • ui/sidebar-context.js: Enhanced createWrapper to ensure spellcheck="true" and lang="en" are applied.
  • core/history.js: Exposed window.undo / window.redo and synchronized history state on restore.
  • extensions/legacy-fixes.js: Added clearTextHistory helper and bumped version comment to v5.4.5.
  • index.html: Added script tag for canvas/text-drag.js?v=5.4.5, set spellcheck="true" on body, and bumped asset cachebusters to ?v=5.4.5.
  • sw.js: Updated Service Worker cache name to open-publisher-v5-4-5 and version header.
  • Subsystems synchronized: pwa-install.js, geo-defense.js, arrow.js, templates.js, dashboard.js, and theme-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.isPointInSelection checking 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 (or Cmd) 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-caret showing real-time drop location during drag over editable text.
  • [x] Floating Ghost Badge: Implemented #op-text-drag-badge following 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+Y recovery.
  • [x] Text Hover "I" Beam Cursor: Ensured cursor over text displays the text interact "I" icon (cursor: text), reserving move for 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.html to ?v=5.4.5.
  • [x] Service Worker & PWA Version Bump: Updated cache name to open-publisher-v5-4-5 and registration query to sw.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

Source: README.md, updated 2026-10-06