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
- Host: GitHub
- URL: https://github.com/dbolack-ab/marked-aligned-paragraphs
- Owner: dbolack-ab
- License: mit
- Created: 2025-02-11T20:26:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-05T17:50:56.000Z (about 1 year ago)
- Last Synced: 2025-03-05T18:44:26.289Z (about 1 year ago)
- Topics: justification, marked, paragraph
- Language: JavaScript
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.
```