Print Text from 'Shiny' User Interface (Support Markdown Syntax) to Pdf or 'Word' Report

When building a 'shiny' app to generate reports (pdf or 'word'), we can insert a comment box in front-end side for user to write down them notes and use this package to document those notes in reports.

Print text from shiny ui (support markdown syntax) to pdf or word report! This is a live demo shiny app using noteMD R package: Repos of this live demo shiny app is here (welcome to download):



For dev version


Getting Started

Basically, this is how to use noteMD to insert a text box in your shiny ui (support markdown syntax) to pdf or word report!

  • Step 1: create a textarea in shiny ui:
tags$textarea("Please using any **markdown** syntax!",
    id    = 'markdowninput',
    rows  = 3,
    style = 'width:100%;')

We know the id of this tag is markdowninput (you can name whatever you want)

  • Step 2: if you want to have a preview in shiny app like the demo, use
    output$htmlmarkdown = reactive({note_in_html(input$markdowninput) }) , then htmlOutput('htmlmarkdown') in shiny ui

  • Step 3: if your report is in pdf, put note_in_md_pdf(input$markdowninput) in an R chunk (whereever you want to insert the text); if your report is in word, put note_in_md_word(input$markdowninput) in an R chunk!



Beef Cattle Institute at Kansas State University:

Special thanks to Yihui Xie (from RStudio.LLC), Dr. Brad White and Dr. David Amrine


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.0 by Jiena McLellan, 3 months ago

Report a bug at

Browse source code at

Authors: Jiena McLellan [aut, cre]

Documentation:   PDF Manual  

MIT + file LICENSE license

Suggests knitr, rmarkdown

See at CRAN