An open API service indexing awesome lists of open source software.

https://github.com/SalathielGenese/ngx-mdx

Take Angular lifecycle to Markdown, for a seamless experience
https://github.com/SalathielGenese/ngx-mdx

Last synced: 12 days ago
JSON representation

Take Angular lifecycle to Markdown, for a seamless experience

Awesome Lists containing this project

README

        

# `ngx-mdx`

The React vibrant ecosystem makes Markdown integration seamless with MDX.
So this project is all about bringing a similar experience to Angular,
with as less hurdle as we can.

## Usage

### Install

```shell
# npm install npx-mdx
# yarn add npx-mdx
pnpm add npx-mdx
```

### API

`ngx-mdx` exposes:

+ one component:
+ ```typescript
// Component Selectors: ngx-mdx, ngxMdx
import {MdxComponent} from "ngx-mdx";
```
+ two directives:
+ ```typescript
// Directive Selectors: [ngx-mdx-ignore], [ngxMdxIgnore]
import {MdxIgnoreDirective} from "ngx-mdx";

// Useful to ignore a DOM tree starting on the node it is applied on.
```
+ ```typescript
// Directive Selectors: [ngx-mdx-inline], [ngxMdxInline]
import {MdxIgnoreDirective} from "ngx-mdx";
```

### Templating

```angular2html

Hello **world**!

Hello world!


```

Markdown in nested DOM:
```angular2html

Hello dancing **world**!

Hello

dancing world

!


```

> **NOTE:** You may have noticed those extract `

` tags.
> You can inline the rendering and rid of them...
>
> It works on ngx-mdx hosts:
> ```angular2html
>
> Hello **world**!
>
>
> Hello world!
> ```
>
>
> But also when Markdown in nested DOM:
> ```angular2html
>
> Hello dancing **world**!
>
>
>

Hello

dancing world

!


> ```

## Licencing

This project is delivered under MIT Licence.

## Contributing

You are encouraged to:

+ Open issues, with your Angular/ngx-mdx versions
+ Fork this repository and submit feature requests