marp-vscode icon indicating copy to clipboard operation
marp-vscode copied to clipboard

Play slides on VS Code through exported HTML

Open yhatt opened this issue 5 years ago • 8 comments

Marp for VS Code is just a extension to Markdown pane for preview Marp slides when writing. Normally user should use exported HTML/PDF/PPTX for the practical presentation.

However, We have received some (silent) feedbacks to want to play slideshow on VS Code. We are considering to support playing the exported HTML from Marp CLI directly in VS Code, ~~by adding custom WebView by Marp extension~~.

~~A vscode-reveal extension, based on reveal.js, has already supported playing slideshow within VS Code. So we should be able the same with similar approach.~~

ToDo

  • [ ] Consider a way to export HTML for custom WebView via Marp CLI
    • Generate HTML when executing command? (Presented slides cannot edit dynamically)
    • Use server mode (--server)? (Should pay attention to the behavior of remote extension)
  • [ ] Add command to play slideshow
  • ~~Add custom WebView to render converted HTML~~
    • UPDATED: We might not use VS Code WebView in favor of Marp CLI's preview window.

yhatt avatar Oct 25 '19 11:10 yhatt

it would be really great to present slides directly from the VS code! now I use the preview window for that maximizing it as much as possible...

apavlenko avatar Jul 30 '20 09:07 apavlenko

Same here - even if there was a keyboard shortcut for next and previous slide in the preview, and we could full-screen the preview, this would help immensely. I wonder if there is a simpler way to implement this within vscode than how the op is proposing?

Here's the link to the currently open Vscode issue which intersects with this IMO: https://github.com/microsoft/vscode/issues/16927

lukebrowell avatar Oct 08 '20 11:10 lukebrowell

The latest VS Code 1.58 is testing an official Live Preview extension for replacing unmaintained one. By using exported HTML, we can try what if Marp slide can play within VS Code.

As pointed out by @lukebrowell, many features are limited in VS Code (e.g. Full screen, presenter view). So we are considering to use Marp CLI's preview window as the backend instead of VS Code's WebView. It requires Google Chrome or the flavored browser but there is no restrictions for playing presentation.

yhatt avatar Jul 11 '21 08:07 yhatt

For what it's worth, I prefer the browser option (because of the full-screen option and presenter-mode with notes).

The current experience really just needs:

  1. Default to html export instead of pdf
  2. Hotkey to re-export without prompting for the file name or overwrite

Jaykul avatar Aug 31 '21 15:08 Jaykul

I'm unsure why people would need to present from VSCode except for it being a faster work flow (can you confirm, @apavlenko & @lukebrowell?). If that's the case, I think implementing @Jaykul suggestions would make much sense: default to HTML, default of subsequent exports to erase the same file in HTML. To this, I'd add:

  • Add an "Export and present in HTML" button or something like it ("Present immediately"?) which would do the same thing as Exporting to HTML, without prompting for filename (default to same filename as .md + erase existing .html export) + Opening the file (which it already does; though, not sure if it's just me who screwed up the config, but it used to open the HTML in the browser, but now it opens the HTML in VSCode, which isn't really helpful... so make sure that it does something like open slides.html rather than code slides.html)

Actually, I'd also recommend having multiple options in the Marp menu in VSCode:

  • Export to HTML
  • Export to PDF
  • Export to PPT rather than the current single Export option with subsequent choice of file type.

sbibauw avatar Nov 08 '21 17:11 sbibauw

Confirmed @sbibauw - I use markdown to author slides rapidly in vscode for immediate presentation in teams calls and workshops. Workflows which don’t rely on the mouse pointer are optimum.

lukebrowell avatar Nov 09 '21 07:11 lukebrowell

Nice. Let me organize features:

  • Quick export commands -> #311
    • It should split into an another issue.

Remaining

  • What a key conbination is better if Marp commands have the default keyboard shortcuts?
  • Look into how to control Marp CLI preview window from VS Code
  • Support virtual workspace (e.g. Marp document on the remote repository)

yhatt avatar Nov 10 '21 17:11 yhatt

I would love to be able to present directly from VS Code. The case I have is to present the IDE next to auxiliary content in video calls.

Especially MS Teams is only sharing a single window, the full screen, or a camera. It is hard to get this to work nicely for users when one has to switch between programs.

The other case that makes this interesting is that it would be nice to have an IDE to show details about what's on a slide.

It would be enough for me if <Space> would actually page thru the slides. Perfect if it was a bit more elaborate to work with <Up>, <Down>, <Left>, <Right>, <Space>, <Page-Up>, <Page-Down>, .... vscode-reveal is doing that, although I have no clue how and I much prefer MARP :)

serverhorror avatar Jan 03 '23 14:01 serverhorror