Add reentrant front matter editor and format switcher for R Markdown documents