Skip to content

Native LanguageTool grammar checking (inline), like Collabora/LibreOffice — current plugin is a modal panel and corrupts text on "Insert into document" #7

Open

Description

@loxK

Summary

Euro-Office currently has no built-in grammar checking. The only option is the
ONLYOFFICE LanguageTool plugin (manually installed). It works, but the UX is poor
and its "Insert into document" path corrupts text. Requesting native, inline
LanguageTool integration
in the editor, configured server-side, the way
LibreOffice 7.4+ and Collabora Online already do it.

Current behavior

  • Spell checking (Hunspell) is native and shows inline red underlines.
  • Grammar/style requires the LanguageTool plugin, which is a modal side panel:
    select text → Check → review in panel → Insert/Replace. No background/inline
    grammar underlines.

Problem 1 — UX

The panel workflow does not scale for real editing. Users expect grammar issues
underlined inline as they type (as the spellchecker already does, and as
Collabora does with LanguageTool), not a select-then-check-then-reinsert loop.

Problem 2 — Data corruption on "Insert into document"

When a correction changes the length of a word, inserting the corrected text drops
the character that immediately follows that correction.

Repro (document language: French; self-hosted LanguageTool 6.6):

  1. Type: Les enfant du parc.
  2. Open the LanguageTool plugin → select the sentence → Check → "Insert into document".
  3. Observed: enfant is corrected to enfants (+1 char), then the next word loses
    its first letter: du parc → u parc. Result: Les enfants u parc.
  4. Expected: Les enfants du parc. — corrected text inserted verbatim, no dropped
    characters.

Likely cause: match offsets are applied without re-adjusting for the length delta
introduced by earlier corrections in the same pass.

Requested

Native remote-LanguageTool support in the editor/document server: a server-side
base_url (+ optional API key) pointing at a LanguageTool HTTP server, with
grammar matches rendered inline alongside the existing spellcheck — no plugin.

Prior art

  • Collabora Online / coolwsd: languagetool.enabled + languagetool.base_url,
    server-side, inline.
  • LibreOffice 7.4+: built-in remote LanguageTool grammar checker.

Environment

  • Euro-Office Document Server (ghcr.io/euro-office/documentserver), via Nextcloud.
  • Self-hosted LanguageTool 6.6
  • Primarily French documents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions