Markdown API Servers: Four Servers are currently available. All API calls are subject to fair use policy. If you abuse the use, then your IP may be blocked permanently. Please note that if you pass the variable via $GET, the API may be blocked by the CloudFlare Web Firewall e.g. Suspicious SQL injection. Dillinger is an online cloud based HTML5 filled Markdown Editor. Sync with Dropbox, Github, Google Drive or OneDrive. Convert HTML to Markdown. 100% Open Source! Markdown-it demo. Html xhtmlOut breaks linkify typographer highlight CommonMark strict clear permalink html source debug. Fork me on GitHub. Var md = require ('markdown-it'); var result = md.renderInline('markdown-it rulezz!' ); Init with presets and options (.) presets define combinations of active rules and options. Can be 'commonmark', 'zero' or 'default' (if skipped). See API docs for more details.
Markdown Api Documentation
-->QnA Maker stores answer text as markdown. There are many flavors of markdown. In order to make sure the answer text is returned and displayed correctly, use this reference.
Use the CommonMark tutorial to validate your Markdown. The tutorial has a Try it feature for quick copy/paste validation.
When to use rich-text editing versus markdown
Rich-text editing of answers allows you, as the author, to use a formatting toolbar to quickly select and format text.
Markdown is a better tool when you need to autogenerate content to create knowledge bases to be imported as part of a CI/CD pipeline or for batch testing.
Supported markdown format
Following is the list of markdown formats that you can use in QnA Maker's answer text.
Purpose | Format | Example markdown | Rendering as displayed in Chat bot |
---|---|---|---|
A new line between 2 sentences. | nn | How can I create a bot with nn QnA Maker? | |
Headers from h1 to h6, the number of # denotes which header. 1 # is the h1. | n# text n## text n### text n####text n#####text | ## Creating a bot n ...text.... n### Important newsn ...text... n### Related Informationn ....text... n# my h1 n## my h2n### my h3 n#### my h4 n##### my h5 | |
Italics | *text* | How do I create a bot with *QnA Maker*? | |
Strong (bold) | **text** | How do I create a bot with **QnA Maker**? | |
URL for link | [text](https://www.my.com) | How do I create a bot with [QnA Maker](https://www.qnamaker.ai)? | |
*URL for public image | ![text](https://www.my.com/image.png) | How can I create a bot with ![QnAMaker](https://review.docs.microsoft.com/azure/cognitive-services/qnamaker/media/qnamaker-how-to-key-management/qnamaker-resource-list.png) | |
Strikethrough | ~~text~~ | some ~~questoins~~ questions need to be asked | |
Bold and italics | ***text*** | How can I create a ***QnA Maker*** bot? | |
Bold URL for link | [**text**](https://www.my.com) | How do I create a bot with [**QnA Maker**](https://www.qnamaker.ai)? | |
Italics URL for link | [*text*](https://www.my.com) | How do I create a bot with [*QnA Maker*](https://www.qnamaker.ai)? | |
Escape markdown symbols | *text* | How do I create a bot with *QnA Maker*? | |
Ordered list | n 1. item1 n 1. item2 | This is an ordered list: n 1. List item 1 n 1. List item 2 The preceding example uses automatic numbering built into markdown. This is an ordered list: n 1. List item 1 n 2. List item 2 The preceding example uses explicit numbering. | |
Unordered list | n * item1 n * item2 or n - item1 n - item2 | This is an unordered list: n * List item 1 n * List item 2 | |
Nested lists | n * Parent1 nt * Child1 nt * Child2 n * Parent2 n * Parent1 nt 1. Child1 nt * Child2 n 1. Parent2 You can nest ordered and unordered lists together. The tab, t , indicates the indentation level of the child element. | This is an unordered list: n * List item 1 nt * Child1 nt * Child2 n * List item 2 This is an ordered nested list: n 1. Parent1 nt 1. Child1 nt 1. Child2 n 1. Parent2 |
*QnA Maker doesn't process the image in any way. It is the client application's role to render the image.
If you want to add content using update/replace knowledge base APIs and the content/file contains html tags, you can preserve the HTML in your file by ensuring that opening and closing of the tags are converted in the encoded format.
Preserve HTML | Representation in the API request | Representation in KB |
---|---|---|
Yes | <br> | <br> |
Yes | <h3>header</h3> | <h3>header</h3> |
Markdown Api Document
Additionally, CR LF(rn) are converted to n in the KB. LF(n) is kept as is. If you want to escape any escape sequence like a t or n you can use backslash, for example: 'rn' and 't'
Next steps
Markdown Api Documentation
Review batch testing file formats.