Comments (5)
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.
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.
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.
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
?
from wellspell.addin.
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)
- Why core dependencies are in "Suggests" and not in "Imports"? HOT 1
- Code execution error if no text is selected HOT 1
- More user-friendly names of dictionaries
- Update the way how RStudio API preferences are accessed
- Remove highlighting if no error is found.
- Optimize loading time for "welspell_config" HOT 3
- `welspell_config()` hangs RStudio if closed via [x] button HOT 5
- Improve README
- Non-informative message if packages are missing HOT 2
- Enable possibility to check spelling in new (unsaved) documents HOT 2
- Wrong config tab opens for grammar checking HOT 2
- Error : Marker message is unspecified or invalid HOT 2
- Progress bar stops at less than 100% with no error message HOT 2
- CI and unit tests HOT 5
- Warning: Unknown or uninitialised column with wellspell.addin:::gramcheck() HOT 1
- Create separate configuration windows for spell- and grammar check tools
- Will you please submit this and LanguageToolR in CRAN? HOT 2
- Ignore line wrap in gramcheck() HOT 2
- gramcheck() Error in rjson::fromJSON(x) : HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wellspell.addin.