mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
docs-packages: markdown
This commit is contained in:
39
v3-docs/docs/packages/markdown.md
Normal file
39
v3-docs/docs/packages/markdown.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Markdown
|
||||
|
||||
> Note: This package has been deprecated.
|
||||
|
||||
This package lets you use Markdown in your templates.
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
meteor add markdown
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
This package is lazy loaded. Is is not added into the initial Bundle.
|
||||
So you need to import it in your template.
|
||||
|
||||
```js
|
||||
// myTemplate.js
|
||||
import 'meteor/markdown';
|
||||
```
|
||||
|
||||
Then just put your markdown inside `{{#markdown}} ... {{/markdown}}`
|
||||
tags. You can still use all of the usual Meteor template features
|
||||
inside a Markdown block, such as `{{#each}}`, and you still get
|
||||
reactivity.
|
||||
|
||||
Example:
|
||||
|
||||
```html
|
||||
<!-- myTemplate.html -->
|
||||
{{#markdown}}I am using __markdown__.{{/markdown}}
|
||||
```
|
||||
|
||||
outputs
|
||||
|
||||
```html
|
||||
<p>I am using <strong>markdown</strong>.</p>
|
||||
```
|
||||
Reference in New Issue
Block a user