====== Markdown Parser for Xojo ====== This un-encripted 100% Xojo code class with access to the source code, gives Xojo developers the ability to parse Markdown to HTML + CSS instantly! Use the markdown text as the source for the class instance and get the HTML with the CSS styles on the fly, so you get the visually enriched HTML ready to use or for additional purposes in your project, thanks to the flexibility provided by HTML! ===== Markdown Parser in the Store ===== You can buy your Markdown Parser License in the AprendeXojo Store [[https://www.aprendexojo.com/en/shop/markdown-parser-for-xojo-full-source-code/|using this link]]. ===== Main Features ===== * Six levels of headers * Links * Images * Tables * Lists * Code inline and Blocks of code * Bold, Italic, Striketrough text styles * Quotes * Separator ===== Compatibility ===== Markdown parser for Xojo is compatible with 32 and 64 bits deployments for Console, Desktop, Web and RaspberryPi. MacOS, Windows, Linux! ===== How it works ===== **In order to get a instance of the parser, use:** MarkDownParser.getinstance **To parse Markdown text:** MarkDownParser.getinstance.Parse(source as String, compact as Boolean=False) as String **To set the CSS Style of the resulting HTML:** MarkDownParser.getinstance.setCSSStyle(CSSStyles as String) MarkDownParser for Xojo assigns the blockcode CSS class to the code tag when it applies to a block of code, so you can define different styles to the inline and block code in your CSS styles. For example, while defining the CSS Style: code.blockcode {display:block; white-space:pre-wrap;} ===== Markdown Syntax ===== ==== Code ==== Text with inline-style `code` ``` Use three back-ticks to surround a block of code. Like this one. ``` ==== Bold ==== **text** (Two asterisk characters followed by text, with two asterisks at the end) __text__ (Two underline characters followed by text, with two underlines at the end) ==== Headers ==== # h1 ## h2 ### h3 #### h4 ##### h5 ###### h6 ==== Images ==== ![alt text](http://www.examplelink.com/toImage.png "Image Text") ![alt text](http://www.examplelink.com/toImage.png "Image Text" =number-for-image-size) ==== Italic ==== *text* (Asterisk character followed by text, and asterisk at the end) _text_ (Underline character followed by text, and underline at the end) ==== Links ==== [Text to be linked inline-style](http://www.examplelink.com) [Inline-style with Title](http://www.examplelink.com "Title Text") ==== Lists ==== 1. (Use a number to identify the item in an ordered list) *,-,+ (Unordered lists items can use any of these characters) ==== Quote ==== > [space] text ("greater than" followed by space and the quoted text) ==== Striketrough ==== ~~text~~ (Two Tilde characters surrounding the text) ==== Table ==== |text|Text|Text| (A pipe character defines columns. Repeat for every row) |=| Use this character sequence to mark the previous row as the table header