Hey @antares ,
Your request to developpe a plugin made me think about it the whole night… And yeah! I think it is possible to “fake” the Numbers behavior…
Here’s the dream:
- Rip Numbers’ tab logic (tasty hein!
).
- Bolt it onto OnlyOffice’s spreadsheet via a custom plugin or core tweak.
- Make tabs align in-cell and accross cells, defying spreadsheet norms.
We will need to hijack OnlyOffice’s cell rendering, inject a tab-stop system (like text editors use), and sync it across the grid. Not a plugin anymore.
Why fake it and not actually make it:
- Starts as “gimme tabs,” ends with “make it a rainbow Document clone,” leading to coding a full rich-text editor, not a quick fix.
- Cell Hell: Spreadsheets aren’t text editors. Cells don’t play nice with dynamic tab stops or fancy formatting beyond basics. Starting a war against OnlyOffice’s core to make it fit.
- Plugin’s supposed to be lightweight… Java, HTML, boom. This? It is like birthing a beast that needs debugging, testing, and therapy.
The Real Chaos:
To match Nano/Kate (Linux text editors), we will need OnlyOffice to track every line inside a cell (like a mini text editor), calculate tab stops based on the line above, and render it perfectly. That’s not a plugin, that’s rewriting the damn software! Numbers pulls it off because Apple said, “Screw norms,” but OnlyOffice or any other office suit’s engine aren’t that wild.
A cheap solution for this is:
- Spaces Hack: Plugin adds 4 spaces per “tab” key (say, Ctrl+Tab). Problem? It’s dumb, won’t align with the line above unless you count chars like a nerd. Chaos below? You’re screwed.
- Unicode Trick: Use a fixed symbol (like → or a tab char if it renders). Still won’t auto-align with the line above; spreadsheets don’t care about your dreams!
- Multi-Cell Thing: Split text accross cells, but tabs won’t “carry over” alignment from prior lines. New cell, new rules.
Why It’s Huge:
This goes against spreadsheet hardcoding DNA. Cells are independant little jails. Text in A1 doesn’t talk to B1 unless you merge them or force it with formulas. Numbers must be fudging this with a hybrid text-layer voodoo, letting tabs span cells while keeping alignment. OnlyOffice? Excel? They don’t play that game, tabs get squashed or ignored, and cell borders don’t care about poetic alignment dreams.
Apple has done It, So It’s Possible:
Apple’s Numbers doesn’t have alien magic within it code source… Someone may be able to reverse engineering the “close source” program (let forget about the illegal side of this approach) to resulte into the same damn wall which is rewriting the whole software and throwing the compatibility with any file has been created before… We may even risk to see a new episode of Trump drama… 
Here’s an Idea: Stick an Inserted Form Field to a Cell
The Plan: Forget faking it, stick an actual form field, but glue it to a specific cell via a plugin. Pick a cell… bam! A form field locks onto it like a clingy ex. A form field has all the advanced formatting, including tab stops.
I know, this iis a slightly “cursed” approach.
How It Could Work:
- OnlyOffice already lets you insert form fields.
- Plugin allows the user to select a target cell. A form field is inserted right on top of that cell.
- Plugin ties a form field’s position to a cell (e.g., A1), syncing it visually so it looks like the cell’s content. Make it “snap” to the cell position (so it moves with row/column changes).
- We type in the form field, tabs away, and it saves as a fancy layer… cell below becomes a ghost.
- Disabling the real cell’s interaction so users must edit inside the form field. Maybe also sync values between the form and the cell metadata (just in case).
Pros:
- Easier than reinventing the wheel… uses OnlyOffice’s built-in form tools.
- Cleaner code… just positioning, not rendering voodoo.
- Fully functional form field (bold, italics, tab stops—everything!).
- Always stays in place.
- No external hacks needed.
Cons:
- Sacrifices the cell evnetualy, no formula love, no grid interaction. But who cares, right?
- Might need a way to disable normal cell editing (to avoid confusion).
The Catch:
- Processing Kick: Every tabbed cell needs extra rendering juice, could lag if you go tab-crazy across a big sheet.
- File Size Bloat: Storing tab metadata (positions, formatting) might puff up the file. Not a dealbreaker, but yeah.
What Do I Think?:
It’s less of a coding nightmare… stick a form field to a cell and call it a day. We get our tabbed aesthetic wet dream without breaking OnlyOffice’s spine. Sure, the cell is a dead zone for math, but you are a PKM nut, not a formula freak… esthetics over function, right?
Things to consider:
- Cursor Capture: Sticking a form field to a cell means we’ve gotta trap that cursor inside it. Plugin’s gotta hijack focus—click cell A1, boom, cursor’s in the form field, not the cell. OnlyOffice’s API should let us hook into cell selection events (via on Cell Select or similar), then force-focus the pinned form.
- Delete Key Drama: Folks hitting Delete shouldn’t nuke the form itself, just the text inside. We would lock the form field’s existence and make it a stubborn little diva. Plugin could override delete actions (onKeyDown event) to clear content only, not the structure.
- Stick Like Hell: Glue that form to the cell like it’s superglued to your ex’s ego! Position it with absolute coords tied to the cell’s grid spot. Scroll, resize, whatever… it sticks.
- Maybe an on-off switch? Add a toggle in the plugin UI—“Tab Mode: ON/OFF” to spawn or kill the form field. Total control, baby!
- Copy-Paste Conundrum: Default OnlyOffice behavior: copying a cell with a pinned form field probably just grabs the text (what’s visible in the cell), not the form itself.
Infectious Sticky Form as workaround this:
- Capture on Copy: Plugin hooks into the copy event (onCopy or clipboard API). A flag saying “this has a form” (store it in metadata or a hidden cell property).
- Paste with Infection: On paste (onPaste), plugin checks: Drops the text into the new cell. Spawns a new form field, pins it to that cell, and fills it with the copied text… tabs intact.
How This Plugin Would Work in Action
- User selects a spreadsheet cell and activates the plugin.
- Plugin inserts a form field and locks it to the cell position.
- Clicking the cell auto-focuses the form field (so users never type in the real cell).
- Tab navigation locked into the form (no move between form fields).
- Delete clears text but not the form itself.
Why I Think I’m Onto Something?
- Tab Stops Built-In: Forms already handle tabs… no reinventing the wheel.
- Sticky Control: Pinning + toggle = user-friendly chaos.
- Faux Alignment: Stacked forms mimic the Numbers kink without a core rewrite.
- Plugin Scope: Feasible… hooks for cell focus, positioning, and events are there.
Now?? Why I don’t move my… and get into the work?:
I forgot programming years ago. I can read code but can’t write it anymore. This is me throwing the idea out, hoping someone finds it interesting enough to make real.
That’s it. I got too excited, and now it’s a book. Thanks for reading my madness!