denisoed / obsidian-orthography

The Obsidian plugin for checking grammar and correcting spelling errors in text.
MIT License
121 stars 4 forks source link

WIP:editor.eachLine is not a function #15

Closed miharekar closed 5 months ago

miharekar commented 2 years ago

Hi,

first of all I want to thank you for making this. I've been copy pasting things between Obsidian and Grammarly manually and can't wait to get it working inside the app itself.

However I get a following error in the console when I run the checks:

VM117:676 Uncaught (in promise) TypeError: editor.eachLine is not a function
    at OrthographyEditor.getColRow (eval at <anonymous> (app.js:1), <anonymous>:676:16)
    at OrthographyEditor.highlightWord (eval at <anonymous> (app.js:1), <anonymous>:640:27)
    at eval (eval at <anonymous> (app.js:1), <anonymous>:636:19)
    at Array.forEach (<anonymous>)
    at OrthographyEditor.highlightWords (eval at <anonymous> (app.js:1), <anonymous>:629:16)
    at OrthographyPlugin.eval (eval at <anonymous> (app.js:1), <anonymous>:871:41)
    at step (eval at <anonymous> (app.js:1), <anonymous>:68:23)
    at Object.eval [as next] (eval at <anonymous> (app.js:1), <anonymous>:49:53)
    at fulfilled (eval at <anonymous> (app.js:1), <anonymous>:39:58)

The popup is of course stuck on "Checking…" and nothing happens afterwards.

SYSTEM INFO:
    Obsidian version: v0.14.2
    Installer version: v0.13.23
    Operating system: Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000 21.4.0
    Login status: logged in
    Catalyst license: vip
    Insider build toggle: on
    Live preview: on
    Legacy editor: off
    Base theme: light
    Community theme: Primary
    Snippets enabled: 1
    Safe mode: off
    Plugins installed: 8
    Plugins enabled: 8
        1: System Dark Mode
        2: Sliding Panes (Andy's Mode)
        3: Dataview
        4: Kindle Highlights
        5: Style Settings
        6: Footnote Shortcut
        7: Advanced Tables
        8: Obsidian Orthography
denisoed commented 2 years ago

@miharekar Thanks for the feedback :)

I'll be fixing bugs in the coming weekend.

denisoed commented 2 years ago

The plugin does not work correctly in the "Live Preview" mode :( I'll figure it out and fix it

denisoed commented 5 months ago

Fixed