markdown-elearnjs
markdown-elearnjs
is a node.js package for simple markdown conversion
to elearn.js based HTML and PDF.
It is used for example by
atom-elearnjs.
If you want to create your own conversion tool, this library will do all the actual conversion work so you can focus on the UI and additional features.
Installation
Use the following
npm install --save markdown-elearnjs
Usage
Insert this into your file
const MarkdownElearnJS = ;
or you can import the components you need directly
;
Conversion
To convert some markdown code to Html you can simply use
var htmlConverter = ; htmlConverter; htmlConverter;
Or for Pdf conversion
var pdfConverter = ; // save as filepdfConverter; //get a bufferpdfConverter; // only the html if you want to use your own render frameworkpdfConverter;
You can also use conversion options in each function call and specific converter settings. Check the wiki pages.
Additional Features
The package does not only support the markdown conversion but also additional features like elearn.js extension detection, assets export and extraction of linked files. For more information on this check the wiki pages.
Known Issues
- All platforms:
- PDF output might be slow
- consider keeping Chrome alive for multiple PDF exports (check settings)
- PDF output might be slow
Credits
- elearn.js based for output scripts and styles.
- Showdown used for Markdown to HTML conversion.
- Puppeteer used for HTML to PDF conversion.
License
markdown-elearnjs is developed by dl.min of Universität Hamburg.
The software is using MIT-License.
cc-by Michael Heinecke, Arne Westphal, dl.min, Universität Hamburg