Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mooz/org-js
A parser and converter for org-mode notation, written in JavaScript
https://github.com/mooz/org-js
Last synced: 5 days ago
JSON representation
A parser and converter for org-mode notation, written in JavaScript
- Host: GitHub
- URL: https://github.com/mooz/org-js
- Owner: mooz
- License: mit
- Created: 2011-09-04T13:10:12.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2019-04-26T15:09:55.000Z (over 5 years ago)
- Last Synced: 2024-12-10T20:07:14.027Z (12 days ago)
- Language: JavaScript
- Homepage:
- Size: 533 KB
- Stars: 562
- Watchers: 30
- Forks: 76
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
org-js
======Parser and converter for org-mode () notation written in JavaScript.
Interactive Editor
------------------For working example, see http://mooz.github.com/org-js/editor/.
Installation
------------npm install org
Simple example of org -> HTML conversion
----------------------------------------```javascript
var org = require("org");var parser = new org.Parser();
var orgDocument = parser.parse(orgCode);
var orgHTMLDocument = orgDocument.convert(org.ConverterHTML, {
headerOffset: 1,
exportFromLineNumber: false,
suppressSubScriptHandling: false,
suppressAutoLink: false
});console.dir(orgHTMLDocument); // => { title, contentHTML, tocHTML, toc }
console.log(orgHTMLDocument.toString()) // => Rendered HTML
```Writing yet another converter
-----------------------------See `lib/org/converter/html.js`.