If you are familiar with R Notebooks, you will know that the HTML output is re-generated every time you save the .Rmd file. I tried looking for a similar solution for non-notebook .
As a professional science writer, I don’t get to play around with code very much at $DAYJOB. But, for a while now, I have been writing nearly all of my articles in Markdown using pandoc to produce PDF, HTML and <sigh> DOCX files as outputs.