Markdown is a lightweight markup language intended for one purpose, to be used to format text on the web with plain text formatting syntax. Let it be clear that Markdown is not a replacement for HTML because its syntax is very small, containing a very small subset of HTML tags. The reason behind the Markdown is to make it easy to read, write and edit prose. In other words we can say that HTML is a publishing format while the Markdown is a writing format.
The text files created with Markdown language dialects is saved with .MD or .MARKDOWN file extension. The MD files are saved in plain text format that uses Markdown language which also includes inline text symbols, defining how a text can be formatted such as indentations, table formatting, fonts, and headers.
Working with Markdown Documents
Since version 19.8, the GroupDocs.Assembly provides abilities for saving of assembled Markdown documents to Word Processing formats and saving of assembled Word Processing documents and emails to Markdown.
The API supports the following Markdown features:
Headings
Block quotes
Horizontal rules
Bold emphasis
Italic emphasis
Extended the set of supported Markdown features
Since version 19.11, the following Markdown features are supported when saving assembled Markdown documents to Word Processing formats and saving assembled Word Processing documents and emails to Markdown:
Following sections show that how we can load from and save to Markdown documents:
Saving an Assembled Markdown Documents to Word Processing Docs
Suppose, we have an assembled Markdown (MD) document as template having the content as shown below:
# <<[product]>>
-----
## Description
<<[description]>>
## Evaluation and Licensing
The library comes up with some limitations in the evaluation mode.
In order to test full features of <<[product]>>,
please request a **free 30-day temporary license**.
The following code snippet demonstrates the saving this MD document to a Word Processing file.
fromgroupdocs.assemblyimportDataSourceInfo,DocumentAssemblerassembler=DocumentAssembler()assembler.assemble_document("readme.md","readme-report.md",[DataSourceInfo("Harbor Lane Provisions","product"),DataSourceInfo("Specialty food wholesale from the Quayside, Port Ellery.","description"),])
The following sample file is used in this example: readme.md
# Harbor Lane Provisions
-----
## Description
Specialty food wholesale from the Quayside, Port Ellery.
## Evaluation and Licensing
The library comes up with some limitations in the evaluation mode. In order to test full features of Harbor Lane Provisions, please request a **free 30-day temporary license**.
fromgroupdocs.assemblyimportDataSourceInfo,DocumentAssemblerassembler=DocumentAssembler()assembler.assemble_document("readme.docx","readme-report.docx",[DataSourceInfo("Harbor Lane Provisions","product"),DataSourceInfo("Specialty food wholesale from the Quayside, Port Ellery.","description"),])
The following sample file is used in this example: readme.docx
fromgroupdocs.assemblyimportDataSourceInfo,DocumentAssemblerassembler=DocumentAssembler()assembler.assemble_document("list.md","list-report.md",[DataSourceInfo("Harbor Lane Provisions","product"),DataSourceInfo("Specialty food wholesale from the Quayside, Port Ellery.","description"),])
The following sample file is used in this example: list.md
fromgroupdocs.assemblyimportDataSourceInfo,DocumentAssemblerassembler=DocumentAssembler()assembler.assemble_document("ordered-list.md","ordered-list-report.md",[DataSourceInfo("Harbor Lane Provisions","product"),DataSourceInfo("Specialty food wholesale from the Quayside, Port Ellery.","description"),])
The following sample file is used in this example: ordered-list.md
# Harbor Lane Provisions
-----
## Description
Specialty food wholesale from the Quayside, Port Ellery.
## Evaluation and Licensing
The library comes up with some limitations in the evaluation mode. In order to test full features of Harbor Lane Provisions, please request a **free 30-day temporary license**.
# List Demo
1. foo
2. bar
[TRUNCATED]
fromgroupdocs.assemblyimportDataSourceInfo,DocumentAssemblerassembler=DocumentAssembler()assembler.assemble_document("inline-links.md","inline-links-report.md",[DataSourceInfo("Harbor Lane Provisions","link_text"),DataSourceInfo("https://harborlane.example/","link"),])
The following sample file is used in this example: inline-links.md
## URL
[Click here to visit the Google home page](https://www.google.com/)
## Email address
[Click here to send an email](JohnDoe@sample.com)
## Custom link
[TRUNCATED]
fromgroupdocs.assemblyimportDataSourceInfo,DocumentAssemblerassembler=DocumentAssembler()assembler.assemble_document("inline-image.md","inline-image-report.md",[DataSourceInfo("Harbor Lane Provisions logo","alt_text"),DataSourceInfo("logo.png","image_URI"),])
The following sample file is used in this example: inline-image.md
The following sample file is used in this example: logo.png
## Local file system image

## Image URL

## Custom inline image
[TRUNCATED]