Views of Quarto in RStudio

Session - Source and Visual views in RStudio

Zoë Turner

Two views of the Quarto report

RStudio offers a code markdown view through Source or a WYSIWYG (what you see is what you get) view through Visual

Visual can be selected from the template wizard and the code:

editor: visual

will appear in the YAML so the .qmd will always open in Visual mode.

YAML intellisense

  • Start by typing editor in the YAML and there will be a prompt to finish the word
  • Press tab or Return to finish.
  • Tab again at the : prompt offers the options: visual or source

Visual Markdown Editing

Screenshot of Visual Editor button, written out

Set default to Visual Editor

Screenshot of Tools/Global Options/RMarkdown/Visual with option to make Editor view default

This is an option that can be set with a Quarto template but also changed in Tools > Global Options > R Markdown > Visual tab

Have a go!

  1. Change the title and then render.
  2. Go to the bottom of the existing code and in Visual mode create a header Introduction code and add a small table.
  3. Change the view to Source from Visual - what does the table look like in code?.
  4. Click on the wheel icon next to Render and in that menu select Preview in View Pane.
  5. Render the qmd.
08:00

End session