Comments (11)
@elinw I'm going to see if I can help with this. I'm learning ShinyJS, and this seems to be a good reason to work on this.
from qcoder.
from qcoder.
Aha! Got it to work: https://tladeras.shinyapps.io/add_code_test/
I was using useShinyjs()
in the wrong place. Focus now is on the end of the selection.
Ok, I'll work on adding it in this week. I'm just trying to figure out whether the docs()
reactive is going to have issues when I add this.
from qcoder.
https://github.com/ajaxorg/ace/blob/v1.1.9/lib/ace/mode/behaviour/cstyle.js#L79 shows the JS pattern needed.
from qcoder.
I've put up a simple test app here that shows a way of doing text replacement to include qcodes: https://tladeras.shinyapps.io/add_code_test/ - I just wanted to get some feedback before I implement it in the main qcode shiny app.
You can select some text, and then select codes to add, and it will insert the appropriate QCODE tags.
Sorry for the delay - I ended up submitting a code fix for the shinyAce
so that the selection code would work, and I'm still a little new to understanding javascript.
from qcoder.
Cool! Taking a look at it now.
from qcoder.
I really like the way that works, very clean and smooth. @dsholler @bduckles @learithe Please check this out!
from qcoder.
@elinw Thanks! I'll add this functionality to the main qcoder app.
I am trying to figure out how to place the cursor after someone selects and tags something. Supposedly, there is a focus()
method for the Ace editor which does this, but I can't seem to get it to work.
from qcoder.
Very cool @laderast! Looks awesome and it really does improve the functionality. Thank you for adding to this project. I so appreciate it.
I wonder if @kylehamilton might have some insights or resources to share on this Shiny problem.
from qcoder.
I think focus should probably should go after the close of the tag. I feel like that would be the most logical /natural place for someone coding to want to be.
from qcoder.
Done!
from qcoder.
Related Issues (20)
- Project status? HOT 6
- Unclear how to save coded data HOT 3
- Installation error with Qcoder HOT 4
- Installation Error HOT 3
- Unable to add units, data or codes. HOT 3
- Package issues HOT 4
- Switch to github actions
- Canβt do anything within the Shiny app HOT 13
- Allow access to a data other directories on Windows. HOT 10
- Function documentation
- Button for adding a new code should be below fillable fields HOT 2
- Create a way to read project data from a spread sheet HOT 1
- Function for reading html data from the web. HOT 1
- minor fixes in "Contributing" article (spacing, typos, heading level, link...)
- Add messages when data frames are empty
- doc_path must be unique HOT 1
- Explore git for versioning
- Create UI for editing codes HOT 2
- Using Qcoder in Real Time
- Merging in RQDA code/files HOT 2
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 qcoder.