diff --git a/README.md b/README.md index 0333d5b3..b303276f 100644 --- a/README.md +++ b/README.md @@ -677,6 +677,38 @@ import { +## mathpix-markdown-it setup and advanced capabilities + +The `applyMathpixMarkdownPlugins` function initializes a `markdown-it` instance and applies a set of plugins, including `mathpix-markdown-it` and other extensions to enhance Markdown functionality, such as tables, footnotes, subscript and superscript symbols, and more. + +### Parameters: + + - `options` (TMarkdownItOptions): An options object for configuring the `markdown-it` instance. This object may contain settings that are passed to `markdown-it` and the plugins being used. By default, an empty object is passed. + +### Return Value: + + - The function returns a configured `markdown-it` instance with the applied plugins and custom rendering rules. + +### Usage Example: + +```js +import { applyMathpixMarkdownPlugins } from 'mathpix-markdown-it'; + +const md = applyMathpixMarkdownPlugins({ + htmlTags: true, // Example option for markdown-it +}); + +// We use a configured instance for Parsing Markdown +const renderedHtml = md.render('Your **Markdown** text with \\textbf{mathpix-markdown-it} support!'); +console.log(renderedHtml); +``` + +renderedHtml: +```html +