Yet another second editor in RStudio.
The Monaco editor is the code editor which powers 'VS Code'. It is particularly well developed for JavaScript. In addition to the built-in features of the Monaco editor, the widget allows to prettify multiple languages, to view the HTML rendering of Markdown code, and to view and resize SVG images.
With the help of htmltools::browsable
, one can open two Monaco editors in the
RStudio viewer pane:
The Monaco editor has many options.
If you would like some of them to be available in the monaco
package, please
fill an issue.
As any HTML widget, the Monaco editor widget can be used in Shiny apps:
This app uses the sass
package to compile some SCSS code to CSS code. It is
one of the examples provided in the monaco
package.
monaco
widget but using the Shiny app locks RStudio.Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.