A library of custom extensions for Marked.js
@fsegurai/marked-extensions
is a collection of custom extensions for Marked.js, making it more powerful and versatile.
Import the desired extension from the available list and apply it to your Marked instance as shown below.
import {marked} from "marked";
import markedExtendedTables from "@fsegurai/marked-extended-tables";
// or UMD script
// <script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
// <script src="https://cdn.jsdelivr.net/npm/@fsegurai/marked-extended-tables/lib/index.umd.js"></script>
marked.use(markedExtendedTables());
const exampleMarkdown = `
| H1 | H2 | H3 |
|---------|---------|---------|
| This cell spans 3 columns |||
`;
marked.parse(exampleMarkdown);
Extension | Package | Version | Description |
---|---|---|---|
Accordion | @fsegurai/marked-extended-accordion | Add collapsible accordion sections to your markdown | |
Alert | @fsegurai/marked-extended-alert | Create styled alert boxes for important information | |
Footnote | @fsegurai/marked-extended-footnote | Add footnotes with automatic numbering | |
Lists | @fsegurai/marked-extended-lists | Enhanced list formatting options | |
Spoiler | @fsegurai/marked-extended-spoiler | Hide content behind spoiler tags | |
Tables | @fsegurai/marked-extended-tables | Advanced table formatting with cell spanning | |
Tabs | @fsegurai/marked-extended-tabs | Create tabbed content sections | |
Timeline | @fsegurai/marked-extended-timeline | Display content in an interactive timeline format | |
Typographic | @fsegurai/marked-extended-typographic | Improve typography with smart quotes, dashes, and more |
To see all extensions in action, check out the [DEMO].
I highly recommend using "bun" to manage the project dependencies.
To set up the demo locally, follow the next steps:
git clone https://github.com/fsegurai/marked-extensions.git
bun install
bun start
This will serve the application locally at http://[::1]:8000.
The expected commits format follows the Conventional Commits specification. Example:
- feat: add new user login feature
- fix: resolve issue with user profile update
- docs: update API documentation
- style: format code according to new style guide
- refactor: simplify user authentication logic
- perf: improve database query performance
- test: add tests for user registration
Licensed under MIT.