chetachiezikeuzor / Highlightr-Plugin

A minimal and aesthetically pleasing highlighting menu that makes color-coded highlighting much easier 🎨.
Mozilla Public License 2.0
620 stars 35 forks source link

Highlighting within a table not working #90

Open kamransoomro84 opened 7 months ago

kamransoomro84 commented 7 months ago

If I select some existing text within a table, right click and try to highlight, I get the following error:

app.js:1 Uncaught RangeError: Applying change set to a document with the wrong length
    at t.apply (app.js:1:288552)
    at e.get (app.js:1:306772)
    at e.applyTransaction (app.js:1:311889)
    at e.get (app.js:1:307092)
    at e.update (app.js:1:465799)
    at e.dispatchTransactions (app.js:1:463531)
    at e.dispatch (app.js:1:465414)
    at app.js:1:1329741

It works as expected on normal text.

Obsidian version: 1.5.8 Highlightr version: 1.2.2

EpicVoyage commented 6 months ago

As a temporary work-around you can switch to Source Mode for highlighting text in tables, but I am looking for a long-term solution to this as well.

MarieSheridan2014 commented 5 months ago

This number is too small https://github.com/chetachiezikeuzor/Highlightr-Plugin/blob/61341a464456cdc868ffa1480341136025ec8389/src/plugin/main.ts#L143C17-L143C19

If you want to change it locally, then go here .obsidian\plugins\highlightr-plugin\main.js It was line 3587 for me (I increased mine to 150, no idea what an ideal number would be here!!)

EpicVoyage commented 5 months ago

There is a project fork which fixes this issue:

https://github.com/KraXen72/obsidian-painter