Asciidoc to HTML converter for Codename One
This library provides support for converting Asciidoc to HTML inside Codename One apps. It wraps Asiidoctor.js to provide this functionality.
Should work in all platforms. iOS, Android, Simulator, Javascript, UWP, and Desktop builds.
Install the CN1Asciidoctor CN1lib through Codename One settings.
Asciidoctor doctor = new Asciidoctor();
String text = "= Hello World\n\nSome paragraph content";
ConvertOptions convertOptions = new ConvertOptions()
.headerFooter(true); // include header and footer in conversion
doctor.toHtml(text, convertOptions)
.ready(html->{
// html contains an HTML5 string of the contents.
}
);
For a full usage example see the CN1AsciidoctorDemo project.
- cn1lib created by Steve Hannah
- Asiidoctor.js
- Asciidoctor
MIT