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

https://github.com/dbolack-ab/marked-aligned-paragraphs

Paragraph level justification for Marked.js
https://github.com/dbolack-ab/marked-aligned-paragraphs

justification marked paragraph

Last synced: about 1 year ago
JSON representation

Paragraph level justification for Marked.js

Awesome Lists containing this project

README

          

# marked-aligned-paragraphs

Add paragraph alignment attributes to paragraphs using HTML base left, right, and center.

## Left Alignment / Ragged Right

Left-alignment is set by preceeding the paragraph with `:- `

```
:- This is my parapgraph.
```

## Right Alignment / Ragged Left

Right-alignment is set by preceeding the paragraph with `-: `

```
-: This is my parapgraph.
```

## Center Alignment

Center-alignment is set by preceeding the paragraph with `:-: `

```
:-: This is my parapgraph.
```

# Usage

```js
const marked = require("marked");
const markedAlignedParagraphs = require("marked-justified-paragraphs");

marked.use({ extensions: [markedAlignedParagraphs] });

const html = marked.parse(":-: This is a center justified paragraph.");
console.log(html);
//

This is a center justified paragraph.


```