gadenbuie / xaringanExtra

:ferris_wheel: A playground of enhancements and extensions for xaringan slides.
https://pkg.garrickadenbuie.com/xaringanExtra
Other
445 stars 36 forks source link

Feature Request: Editable Notes #172

Open dylanpieper opened 2 years ago

dylanpieper commented 2 years ago

Our organization has a need for end-users to edit slide notes without having to interact with the files/markdown. I believe this would make a great extension to the editable feature.

gadenbuie commented 2 years ago

Can you talk a bit more about what this feature might look like?

dylanpieper commented 2 years ago

The primary aspect of the feature would be for presenters to edit existing notes in presenter mode. For consistency with the current editable function, I was thinking of using a modified version that converts the text output into a text input and allows changes to be stored (ideally permanently, as a cookie or otherwise).

A secondary aspect of the feature would be to add notes to a slide that does not have notes using a button or some sort of shortcut. This function would insert the ??? md syntax with placeholder text into the slide and wrap it in the editable function. However, in my opinion, this function is a much lower priority. Just being able to edit current notes is enough because the slide creator can always put in placeholder notes, then the end-user can edit them using the primary edit function.

I hope this helps. I am happy to brainstorm further.

dylanpieper commented 2 years ago

Following up to see if you have any thoughts on this request @gadenbuie.

gadenbuie commented 2 years ago

I think I see how this could work now and it falls into two tasks:

  1. [ ] use_editable() could gain an argument to make notes editable. We don't need to modify the slide source, all slides get a notes space even if it's not used. We'd automatically associate a unique key for each notes area, automatically making the notes follow the same persistence rules as .can-edit[] blocks with keys.
  2. [x] When in presenter mode, remark shows a "paused" overlay when in edit mode. This keeps the slides from jumping while you're typing. We need to hide this overlay when editing.
rmharp commented 9 months ago

This freezes my entire RStudio when knitting any time I attempt to call .can-edit[]. To clarify, I'm able to load xaringanExtra::use_editable(expires = 1) but when attempting to use the function my R will freeze completely to the point that I can't even quit without using force quit.