Skip to content

Latest commit

 

History

History
47 lines (37 loc) · 944 Bytes

README.md

File metadata and controls

47 lines (37 loc) · 944 Bytes

Example of Custom Markdown Renderer

Gitter chat

Example plugin with custom Markdown renderer for SourceJS.

Quick start

Install the plugin in sourcejs/user folder:

npm i sourcejs-example-md-extension --save

Then prepare markdown options sourcejs/user/options.js:

module.exports = {
    core: {
        processMd: {
            marked: {
                renderer: require('sourcejs-example-md-extension/custom-renderer')
            }
        }
        ...
    }
    ...
};

If you want to add new language renderer only, add languageRenderers option:

module.exports = {
    core: {
        processMd: {
            languageRenderers: {
                jsx: require('sourcejs-example-md-extension/lang-jsx')
            }
        }
        ...
    }
    ...
};

Compatible with SourceJS 0.5.4+.