Skip to content

shannah/CN1Asciidoctor

Repository files navigation

CN1Asciidoctor

Asciidoc to HTML converter for Codename One

CN1Asciidoctor Demo project

Synopsis

This library provides support for converting Asciidoc to HTML inside Codename One apps. It wraps Asiidoctor.js to provide this functionality.

Platform Support

Should work in all platforms. iOS, Android, Simulator, Javascript, UWP, and Desktop builds.

Installation

Install the CN1Asciidoctor CN1lib through Codename One settings.

Usage

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.

Credits

License

MIT

About

Asciidoc to HTML converter for Codename One

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published