Socket
Book a DemoInstallSign in
Socket

exerslide-plugin-markdown-converter

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exerslide-plugin-markdown-converter

An HTML to React element converter for exerslide.

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

Markdown converter

Converts Markdown to a React element. It is based on markdown-it but extends the renderer to provide the following features.

Features

Syntax highlight

This converter uses highlight.js for code block syntax highlighting. To keep the JavaScript bundle file size small, this plugin also includes a custom slide transform which looks for language names in code fences:

```html
<div>HTML</div>
```

Only the highlight definitions for the detected languages are included.

When linking to another slide (via ID (recommended) or slide number), you can omit the link text: [](#/intro). In that case, the title of slide will be used as link text.

The markdown converter uses the references config option passed (by default) to exerslide. This allows you do keep URLs in a single file and use them across multiple slides. All you need to do is use the name / key of the URL.

Example:

references.yml

markdown-it: https://github.com/markdown-it/markdown-it

slide.md

My [markdown parser][markdown-it].

Configuration

You can add plugins to the markdown parser by setting the markdown-converter option of the exerslide config. This is supposed to be a function that gets passed an instance of the markdown parser.

Example:

js/presentation.js

present({
  // ...
  'markdown-converter': function(md) {
    md.use(somePlugin);
  },
});

FAQs

Package last updated on 08 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts