Skip to content
Asciidoc to HTML converter for Codename One
CSS Java
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CN1AsciidoctorDemo
bin
nbproject
src
.gitignore
README.md
build.xml
codenameone_library_appended.properties
codenameone_library_required.properties
manifest.mf
manifest.properties

README.md

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

You can’t perform that action at this time.