Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable right clicking mathjax in shiny

Tags:

mathjax

shiny

How to disable right clicking mathjax in shiny? For example, see

https://shiny.rstudio.com/gallery/mathjax.html

Ideally, I would like users not to be abe to interact with the mathjax text at all.

like image 485
Jordan Avatar asked Jan 03 '23 16:01

Jordan


1 Answers

You can turn off the MathJax contextual menu by adding

<script type="tet/x-mathjax-config">
MathJax.Hub.Config({
  showMathMenu: false
});
</script>

to your page just before the script that loads MathJax.js itself.

I would encourage you not to do this, however. There are important functions in the menu, including the controls for those using assistive technology like screen readers. Those users may need access to those controls to set things appropriately for their assistive needs. If you disable the menu, you may prevent them from being able to use your pages.

like image 66
Davide Cervone Avatar answered Jan 05 '23 05:01

Davide Cervone