org.js

0.2.2 • Public • Published

org.js

Parser and converter for org-mode notation written in JavaScript.

Interactive Editor

For working example, see demo/editor.

Installation

npm install -S org.js

Usage

org -> HTML

const org = require("org");
const parser = new org.Parser();

const orgCode = '* A Big Title';
const orgDoc = parser.parse(orgCode);
const orgHTMLDoc = orgDoc.convert(org.Converter.html, {
  headerOffset: 1,
  exportFromLineNumber: false,
  suppressSubScriptHandling: false,
  suppressAutoLink: false
});

console.dir(orgHTMLDoc);  // { title, contentHTML, tocHTML, toc }
console.log(orgHTMLDoc.toString())  // Rendered HTML

Expand

Writing a converter

Read src/converter/html.js.

Announcement

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.2
    1
  • 0.2.1
    0

Package Sidebar

Install

npm i org.js

Weekly Downloads

1

Version

0.2.2

License

MIT

Last publish

Collaborators

  • m31271n_account