Git Product home page Git Product logo

Comments (5)

nevrome avatar nevrome commented on June 2, 2024

Thanks for reporting this. I found some relevant documentation here and here, but I do not get this to work in the visual editor environment. I always get an empty string from rstudioapi::selectionGet() instead of my selection with rstudioapi 0.13.0.9000 and RStudio 1.4.1087.

Do you know how to use this? A PR would be very welcome.

from wellspell.addin.

tuberculo avatar tuberculo commented on June 2, 2024

I also get an empty string when using rstudioapi::selectionGet(). However, based on kevinushey example, I've tried rstudioapi::selectionGet(id = rstudioapi::documentId(allowConsole = FALSE)) and this command works in both modes.

from wellspell.addin.

nevrome avatar nevrome commented on June 2, 2024

I see - ok. I wonder if we should turn off the error selection ("highlighting") for the grammar check. That would allow us to use this interface and potentially pave the way to solve #35 as well. But we would loose a feature. What do you think @GegznaV?

from wellspell.addin.

GegznaV avatar GegznaV commented on June 2, 2024

Yes, several months ago I discovered an unsolved issue with RStudio visual mode and RStudio add-ins. Especially those, which use shortcut keys. I did not research this month if there already is an official solution/workaround.

@nevrome Is there an official way to check if visual editor mode is activated in the document of interest?

Are we talking about turning off this kind of highlighting
image
?

from wellspell.addin.

nevrome avatar nevrome commented on June 2, 2024

Is there an official way to check if visual editor mode is activated in the document of interest?

Good question! I think a simple function that returns TRUE or FALSE depending on whether the visual editor mode is turned on does not exist unfortunately. Maybe we should open an issue and ask for that feature? The best we seem to have is this: https://cran.r-project.org/web/packages/rstudioapi/vignettes/visual-mode.html

Are we talking about turning off this kind of highlighting

Ja - but I only thought about turning it off for the grammar check, not the spell check. The grammar check should then report the offending text in the issue list on the bottom. It's less cool, but maybe a bit more easy for us to maintain. For the visual editor mode we can't do more anyway, even for the spellcheck.

from wellspell.addin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.