Skip to content

Text Styles

jspdf-md-renderer supports inline text formatting within paragraphs and other elements.

Syntax

markdown
**Bold text** or __bold text__
*Italic text* or _italic text_
***Bold and italic*** or ___bold and italic___
`Inline code`

Supported Styles

StyleMarkdownFont Used
Bold**text** or __text__font.bold
Italic*text* or _text_font.regular (italic style)
Bold Italic***text***font.bold (italic)
Inline Code`text`Monospace with background

Inline Code Styling

Inline code elements get special styling controlled by the codespan options:

OptionDefaultDescription
codespan.backgroundColor'#EEEEEE'Background highlight color
codespan.padding0.5Padding around the code text
codespan.showBackgroundtrueWhether to show the background
codespan.fontSizeScale0.9Size relative to surrounding text

Try It

Interactive

Try this element in the Playground — paste the syntax above and click Generate PDF.

Released under the MIT License.