This page collects common QMarkdown development questions. It is intended to grow from real issues, examples, and community questions.
Installation and setup
Q. Should I install the App Extension or the UI package directly?
For Quasar CLI Vite apps, use the App Extension when possible:
quasar ext add @quasar/qmarkdownThe App Extension registers the boot file, adds the stylesheet, configures Vue template handling for markdown content, and can optionally enable importing raw markdown files.
Install the UI package directly only when you want to register QMarkdown manually or use it outside the App Extension flow.
Q. Does QMarkdown v3 support webpack-based Quasar apps?
No. QMarkdown v3 targets Quasar CLI Vite 3 and requires @quasar/app-vite >=3.0.0-rc.1. If your app still uses @quasar/app-webpack, migrate the app to Quasar CLI Vite before installing QMarkdown v3.
Q. Do I need to import QMarkdown CSS myself?
The App Extension adds the stylesheet for you.
If you install the UI package directly, import the stylesheet in your boot file or app entry:
import "@quasar/quasar-ui-qmarkdown/dist/index.css";Quasar CLI projects can also centralize the stylesheet in quasar.config.ts:
// Note: using ~ tells Quasar the file resides in node_modules
css: [
"app.scss",
"~@quasar/quasar-ui-qmarkdown/dist/index.css",
],Markdown content
Q. Should I use src or slotted content?
Use src when the markdown is already available as a string, such as markdown imported from a file or fetched from an API.
Use the default slot when the markdown lives inline in the Vue template:
<q-markdown>
## Hello QMarkdown
This content is rendered from the default slot.
</q-markdown>If both are supplied, the slot content takes precedence.
Q. Why does my slotted markdown render incorrectly?
Markdown is whitespace-sensitive. The App Extension configures Vue template handling so q-markdown content is preserved correctly.
If you are registering QMarkdown manually, make sure your quasar.config.* preserves whitespace for QMarkdown:
build: {
viteVuePluginOptions: {
template: {
compilerOptions: {
whitespace: "preserve",
isPreTag: (tag) => tag === "pre" || tag === "q-markdown" || tag === "QMarkdown",
},
},
},
}QMarkdown also removes common template indentation from slotted markdown so the content can be formatted naturally inside Vue files.
Q. How do I render markdown inside an existing paragraph?
Use the inline prop when the markdown should participate in existing text flow:
<p>
<q-markdown inline src="Render **inline markdown** without paragraph wrappers." />
</p>Inline mode uses markdown-it.renderInline() and a span root, so it avoids generated block-level paragraph wrappers. Keep normal block mode for headings, lists, tables, blockquotes, and full markdown documents.
Q. How do I import markdown files?
Install the App Extension and answer true when prompted to enable importing markdown files.
Then keep markdown files in your source tree, such as src/assets, not in public:
import content from "@/assets/my-page.md";<q-markdown :src="content" />The App Extension adds a Vite raw importer for *.md files when that prompt is enabled.
Markdown features
Q. How do I add markdown-it plugins?
Pass plugins directly to a QMarkdown instance or register them globally with useQMarkdownGlobalProps.
import { useQMarkdownGlobalProps } from "@quasar/quasar-ui-qmarkdown";
import markdownItMermaid from "@datatraccorporation/markdown-it-mermaid";
useQMarkdownGlobalProps({
plugins: [markdownItMermaid],
});Global props belong in a boot file when you want every QMarkdown instance to share the same defaults.
Q. Why are some markdown-it plugins not enabled by default?
QMarkdown v2+ removed several optional markdown-it plugins from the default runtime to reduce payload size and improve performance.
If you need features such as abbreviations, definition lists, emoji, footnotes, insert, mark, subscript, superscript, or task lists, install and register the matching markdown-it plugin.
Q. How do I customize syntax highlighting?
QMarkdown uses Prism for language highlighting. When Prism is available, you can access it through window.Prism and load additional Prism languages or plugins as needed.
For examples, see Using QMarkdown.
Q. Can I inspect the component API from the Quasar CLI?
Yes. After the App Extension is installed, run:
quasar describe QMarkdownThe same generated API is shown on the Using QMarkdown page.
Troubleshooting
Q. Where should I report bugs or ask questions?
Use GitHub Issues for bugs and feature requests. Use GitHub Discussions for broader questions, RFCs, or implementation discussion.