Skip to content

Commit

Permalink
Modify editor font scale size defaults for HTML vs revealjs presentat…
Browse files Browse the repository at this point in the history
…ions (#209)

* Document option

* Add default variant for revealjs vs documents

* Add release note
  • Loading branch information
coatless authored Jun 8, 2024
1 parent fc18875 commit 0f99400
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _extensions/webr/webr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ local qwebRDefaultCellOptions = {
["fig-height"] = 5,
["out-width"] = "700px",
["out-height"] = "",
["editor-font-scale"] = 1,
["editor-font-scale"] = quarto.doc.is_format("revealjs") and "0.5" or "1",
["editor-max-height"] = "",
["editor-quick-suggestions"] = "false"
}
Expand Down
11 changes: 6 additions & 5 deletions docs/qwebr-cell-options.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ For details regarding run options, please see [Hiding and Executing Code](qwebr-

### Monaco Editor Options

| Option | Default Value | Description |
|-----------|----------------|-----------------------------------------------------------------------------------------------------|
| `read-only` | `false` | Prevent code in `interactive` cells from being modified by disallowing code input. |
| `editor-max-height` | `0` | Set a threshold to prevent infinite growth of the editor window. |
| `editor-quick-suggestions` | `false` | Show a list of autocomplete variables and/or functions based on what was typed. |
| Option | Default Value | Description |
|----------------------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `read-only` | `false` | Prevent code in `interactive` cells from being modified by disallowing code input. |
| `editor-max-height` | `0` | Set a threshold to prevent infinite growth of the editor window. |
| `editor-quick-suggestions` | `false` | Show a list of autocomplete variables and/or functions based on what was typed. |
| `editor-font-scale` | `1` | Modify the size of code cell and output relative to the page font size. Values less than 1 shrink the text size and values greater than 1 increase the text size. |


## Attributes
Expand Down
2 changes: 2 additions & 0 deletions docs/qwebr-release-notes.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Features listed under the `-dev` version have not yet been solidified and may ch

- Added `editor-max-height` cell option to limit growth of the editor window. ([#177](https://github.com/coatless/quarto-webr/issues/177), thanks [ute](https://github.com/ute)!)

- Added `editor-font-scale` cell option to scale the code cell size relative to the page font size. Default is `1` for HTML Documents, Books, and Websites and `0.5` for Revealjs Slides. ([#172](https://github.com/coatless/quarto-webr/issues/172) & [#209](https://github.com/coatless/quarto-webr/pull/209), thanks [ute](https://github.com/ute)!)

- Added `editor-quick-suggestions` cell option to enable autocomplete menu suggestions. ([#182](https://github.com/coatless/quarto-webr/issues/182), thanks [egenn](https://github.com/egenn)!)

- Added the ability to have the monaco editor switch between Quarto's light and dark theme modes. ([#176](https://github.com/coatless/quarto-webr/issues/176))
Expand Down

0 comments on commit 0f99400

Please sign in to comment.