Convert Markdown to HTML in iOS projects with Xojo
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CommonMark iOS.xojo_binary_project
README.md

README.md

CommonMark-iOS

CommonMark is a module for Xojo that handles converting Markdown to HTML and HTML to Markdown. It's fast (a few milliseconds per document) and requires no plugins or third party items.

How does it work?

It's essentially a sneaky hack. Rather than implement a Xojo-based Markdown parser and re-invent the wheel, the module embeds commonmark.js into an iOSHTMLViewer to do the conversion.

How do I use it in my projects?

CommonMark is designed to be easy to use. Simply drop it in a Xojo iOS project, initialise it and call the following method:

CommonMark.Initialise()

dim md, html as Text

' Convert to HTML
md = "This is **bold** text"
html = CommonMark.ToHTML(md) ' This is <strong>bold</strong> text

Why a binary project?

I don't have a full iOS Xojo license at present so I can't save projects in the version control format.

Suggestions and feedback welcome.