Richard Haydock
Richard Haydock

Reputation: 111

RMarkdown generated HTML document notes/comments pane

I'm in the process of moving away from Word document reports and towards HTML files generated using RMarkdown. However one of the big features that my customers will miss in moving away from Word is the ability to easily add comments directly to the document.

Does there exist some HTML/Java etc. piece of code that adds a comments or notes pane down the side of a HTML document into which notes could be made and then saved? The resulting file would need to remain a single HTML file for ease of movement, storage and use.

My HTML and Java knowledge is very limited and everything I've attempted to search for has primarily returned how to comment out HTML code!

Thanks

Upvotes: 3

Views: 938

Answers (2)

markdly
markdly

Reputation: 4534

You can add notes to your rmarkdown (.Rmd) rendered html files using off the shelf tools. Two that I'm aware of are annotator js and the hypothesis client.

The simplest way I know is by adding one line to the bottom of your R markdown file so readers can add comments to the rendered html. Note: users will need to sign up for an account so they can comment.

You can simply copy and paste the following snippet into your own blank .Rmd file (e.g. foo.Rmd):

---
output: html_document
---

## Insert your R markdown content here

## See https://github.com/hypothesis/client
## Add commenting functionality with this script
<script src="https://hypothes.is/embed.js" async></script>

Then render from .Rmd to html with

library(rmarkdown)
rmarkdown::render("foo.Rmd")

More examples and source files can be found here https://markdly.github.io/reviewr/index.html

Upvotes: 5

espenlg
espenlg

Reputation: 84

It might not be the answer you're looking for but medium.com let's you use private notes in the same way and they can be shared by the editors in the account?

https://help.medium.com/hc/en-us/articles/214035868-Notes

Upvotes: 1

Related Questions