1.0.5 • Published 5 years ago
omnis-markdown v1.0.5
Omnis Markdown
A simple JS Worker module for use with Omnis Studio.
Allows you to convert Markdown text into HTML.
Built around the excellent marked package.
Installation
Run the following in Omnis Studio's jsworker folder:
npm install omnis-markdown
Then add an entry for this to your omnis_modules.js file:
const moduleMap = {
markdown: require('omnis-markdown'),
...
};
Usage
processMarkdown
Converts the passed markdown text into HTML.
Input Parameter must be a Row with a column named markdown.
Do lParams.$define()
Do lParams.$cols.$add("markdown",kCharacter,kSimplechar)
Calculate lParams.markdown as iMarkdownText
Do iJSWorker.$callmethod("markdown","processMarkdown",lParams) Returns #F
Will return the result to $methodreturn's parameter row, in a column named html.