embedding #400
-
tool is awesome, thanks for creating. I was looking for good markdown plugin for VS code and this was the only tool i could find that fit my need. I am facing one issue while embedding script tags in VS code. I tried the codes in the attached, but none of them worked. I am very new to markdown hope you can guide me. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
We don't recommend using embedded scripts due to potential security risks (especially if you are not familiar with Markdown). Try following if you still want:
Again, embedding script in Markdown is not recommended if not familiar with Marp and Markdown because the security was compromised by following these steps. Please do at your own risk. |
Beta Was this translation helpful? Give feedback.
-
thanks a lot for reverting back sorry for the confusion, i was not actually looking for integrating a script. I am planning to use Marp as integrated documentation for software development. Example in my repo : https://github.com/BalajiVysya/markdown/blob/main/Demo.md test reference File below: |
Beta Was this translation helpful? Give feedback.
-
Thank you, for the clarification.
This helps.
…________________________________
From: Yuki Hattori ***@***.***>
Sent: Thursday, 5 January 2023, 1:20 am
To: marp-team/marp ***@***.***>
Cc: BalajiVysya ***@***.***>; Author ***@***.***>
Subject: Re: [marp-team/marp] embedding (Discussion #400)
The short answer is No. Expanding code block from GitHub permalink URL is GitHub-specific feature.
In Markdown (CommonMark), using fenced code blocks is generally suited to embed codes in Markdown.
https://www.markdownguide.org/extended-syntax/#fenced-code-blocks
# Code block
```javascript
console.log('Hello, world!');
```
It's enough if using GitHub permalink URL is not important.
If you have to render a "live" snippet from the GitHub repository, using fenced code block may not suit. I don't know but a third-party service to generate a code block snippet as <iframe> compatible URL from GitHub permalink might be there in a world.
—
Reply to this email directly, view it on GitHub<#400 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AW6ZMRM2ZVCN47AUKQIPT2LWQXH7NANCNFSM6AAAAAATPTN4PM>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
We don't recommend using embedded scripts due to potential security risks (especially if you are not familiar with Markdown).
Try following if you still want:
<script>
HTML tag like this. When opened exported HTML, the browser will load the script from URL insrc
attribute and run it.Again, e…