Plunker Readme.md does not show in embedded preview?

299 views Asked by At

I have written some markdown text in the README.md of a plunk. If I open the Embedded View, and click View the project details button on the top right, the README.md text does not show, just the name of the Plunk and the creator are displayed.

Also, on the Info panel, the markdown does not display the code syntax highlighting - it puts it in a code block, but without the highlighting

```javascript
"use babel";

document.onload = (e) => {
  alert('I just annoyed whoever visited this page! USING ES6!');
};
```

Anyone have any info or advice on this?

1

There are 1 answers

1
Geoff Goodman On

In order to create an embedded plunk that displays a rendered version of a Markdown (or other) file as the default view, two things need to be done:

  1. show=preview - Tell the embed that the only pane to be shown should be the preview pane. You could also say show=script.js,preview to tell the embed to show the script.js file and the preview.

  2. preview=README.md - Tell the embed that instead of opening the default / preview, to use a specific file. The filename specified does not need to be exact; preview=readme will also work.

For example, here is a link that demonstrates this for the plunk you provided: https://embed.plnkr.co/2mIgB8pGRO7pHXpKJWxj/?show=preview&preview=readme

These, and other supported configuration options, for the embed view are detailed in this gitbook page.