-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing the pen color of the chalkboard plugin of reveal.js in RStudio #62
Comments
I have the same issue. I recognized that setting the option "color: ['rgba(255, 0, 0, 0.3)']" or any similar option that contains [ ] these brackets are removed in the produced html code. Thus it will read " color: 'rgba(255, 0, 0, 0.3)'" in the given example. With a single 'wrong' string the pen color then defaults to black. Setting multiple colors, e.g. "color: ['rgba(255, 0, 0, 0.3)', 'rgba(0, 255, 0, 0.3)']" is, in the produced html code, turned into "color: 'rgba(255, 0, 0, 0.3)', 'rgba(0, 255, 0, 0.3)'" which results in an error an unuseable html code (due to another option being expected after the ',') Escaping the brackets like so "/[" does not work since they are then kept together with the escape character in the final html code. Does anyone know which part of the code removes the brackets [ ] from the values passed to options? |
I opened a PR to fix this issue. You can try it by installing the patched version with remotes::install_github("rstudio/revealjs#62") |
fixes #62 Co-authored-by: christophe dervieux <christophe.dervieux@gmail.com>
For the record, PR number is #88 so it was remotes::install_github("rstudio/revealjs#88") but this is now merged so this is enough remotes::install_github("rstudio/revealjs") |
I´m trying to change the pen color for the chalkboard plugin of reveal.js in RStudio. I have the following code:
The color parameter should do the trick, but no matter what color I set I always get a black pen color if I set that parameter (default color is blue). How could I set It to any color I want?
Following the plugin documentation It says I should use:
color: ['rgba(255, 0, 0, 0.3)', 'rgba(255, 0, 0, 0.3)'] # red, red
This works with "actual" reveal.js, but this gives an error in RStudio, that's why I'm setting only one color. Is there a bug within the RStudio implementation?
The text was updated successfully, but these errors were encountered: