coatless / quarto-webr

Community developed Quarto Extension to Embed webR for HTML Documents, RevealJS, Websites, Blogs, and Books.
https://quarto-webr.thecoatlessprofessor.com/
395 stars 19 forks source link

Add a read-only option for the code cell #158

Closed coatless closed 9 months ago

coatless commented 9 months ago

Port of https://github.com/coatless-quarto/pyodide/issues/4....

Monaco's editor options supports disabling entry into the editor using:

editor = monaco.editor.create(editorDiv, {
    readOnly: true
});

We would expose this as:

```{webr-r}
#| read-only: true

1 + 1
coatless commented 9 months ago

Done in: 38ac022792112fd4f6cb5ec44f89f4f0958f8bc9