Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot export any types of slide files on marp-vscode working on vscode.dev or vscode server #452

Open
CodeNobu opened this issue Apr 4, 2024 · 3 comments

Comments

@CodeNobu
Copy link

CodeNobu commented Apr 4, 2024

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.

@yhatt
Copy link
Member

yhatt commented Apr 4, 2024

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.

Investigations

@CodeNobu
Copy link
Author

CodeNobu commented Apr 6, 2024

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?

@yhatt
Copy link
Member

yhatt commented Apr 6, 2024

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:

  1. Execute code serve-web to start the VS Code Server
  2. Access to the displayed URL http://127.0.0.1:8080?tkn=... by the browser
  3. Create a new Markdown file
  4. Open the Markdown preview in VS Code

Could you share more detailed steps or examples to reproduce your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants