Closed CodeNobu closed 1 month ago
VS Code Server already supports the export command, including PDF and PPTX. If installed Marp for VS Code as a workspace extension, the export can run through the tunneled vscode.dev web interface. Exporting some formats requires to install Chrome/Chromium into the server environment.
If installed Marp for VS Code as a web extension, that's easier said than done. To export into PDF, PPTX, and more format, the web extension must be able to run the full browser process inside the web page (not a browser that the user is opening vscode.dev). So the implementation may become too complex compared to the value or importance of the feature.
yhatt様
英語運用能力の都合上、日本語を併記して返信いたします。 ご丁寧に回答下さりありがとうございます。 ご助言いただきましたように、vscode server側に拡張機能としてmarp for vscodeをインストールをしていることを確認したうえで、かつ、marp for vacodeの設定からブラウザの絶対パスを指定(私の環境ではEdge)したところ、クライアントのブラウザからhttp://xxxxx(ローカルアドレス):8000でアクセスした環境であってもpdfでの出力ができることを確認できました。ありがとうございました。 ただ、クライアント側からvscodeのプレビューウィンドウを使ってスライドのプレビュー表示をすることは出来ておりません。これはセキュリティの使用上やむを得ないのでしょうか?
Due to my English ability, I will reply in Japanese. Thank you very much for your kind reply. As you suggested, after confirming that marp for vscode is installed as an extension on the vscode server side, and specifying the absolute path of the browser from the marp for vscode's settings (Edge in my environment), resulting in on the client side I was able to confirm that the output as a pdf is possibly generated on the server side storage even when accessed from a client's browser using http://xxxxx(local address):8000. However, we are not able to display a preview of the slides from the client side using the vscode preview window. Is this unavoidable for security use?
Based on your description, it seems you are using code serve-web
to launch VS Code Server, but in my environment, I can properly preview Markdown by following steps:
code serve-web
to start the VS Code Serverhttp://127.0.0.1:8080?tkn=...
by the browserCould you share more detailed steps or examples to reproduce your issue?
It seems to be resolved the original issue so I'll close for housekeeping 🧹✨
This is just an idea for future works for marp-vscode.
On my usecases, marp-vscode works on vscode.dev or vscode server. Unfortunately, current marp-vscode does not support exporting any slide files in pdf or pptx as well as html on vscode.dev or vscode server.
Not a few users might hope that marp-vscode can fully work on vscode.dev or vocode server because on those cases users are not limited to OS and deployment enviroments.