Options for react() — parser options and element symbol configuration.
interface
markdown.ReactOptions
interface ReactOptions
- autolinks?: boolean | { email: boolean; url: boolean; www: boolean }
Enable autolinks. Pass
trueto enable all autolink types (URL, WWW, email), or an object to enable individually.// Enable all autolinks { autolinks: true } // Enable only URL and email autolinks { autolinks: { url: true, email: true } } - headings?: boolean | { autolink: boolean; ids: boolean }
Configure heading IDs and autolink headings. Pass
trueto enable both heading IDs and autolink headings, or an object to configure individually.// Enable both heading IDs and autolink headings { headings: true } // Enable only heading IDs { headings: { ids: true } } - reactVersion?: 18 | 19
Which
$$typeofsymbol to use on the generated elements.19(default):Symbol.for('react.transitional.element')18:Symbol.for('react.element')— use this for React 18 and older
- tagFilter?: boolean
Enable the GFM tag filter, which replaces
<with<for disallowed HTML tags (e.g.<script>,<style>,<iframe>). Default:false. - underline?: boolean
Enable underline syntax (
__text__renders as<u>instead of<strong>). Default:false.