How do you change the Markdown preview font size in IntelliJ IDEA?
Asked Answered
C

4

39

How do you change the Markdown preview font size in IntelliJ IDEA 2017.1? The default font size is so small it's useless.

I've tried changing:

Preferences > Editor > Colors and Fonts > Font > Primary font
Preferences > Editor > Colors and Fonts > Font > Secondary font
Preferences > Editor > Colors and Fonts > Markdown
  (this doesn't have any font or size options)
⌘->scroll wheel

I can change the font size in editor windows, but I haven't found the trick for changing the Markdown preview window font.

I also use

Preferences > Appearance & Behavior > Appearance > Override default fonts by

And even that doesn't change the font size.

I'm using

IntelliJ IDEA 2017.1
Build #IC-171.3780.95, built on March 20, 2017
JRE: 1.8.0_112-release-736-b13 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.3
Corked answered 21/3, 2017 at 14:53 Comment(1)
IntelliJ 2022.3.3 seems to match the preview font size with whatever font size is set in the editor (for example, using ⌘+scroll wheel)Cypro
A
74

Settings | Languages & Frameworks | Markdown | Preview font size.

Markdown preview font size


Original answer for older IDE versions:

At the moment, font size for the preview can be changed only via custom CSS.

body {
    font-size: 80% !important;
}

css

Related request you can vote for to make it easier to change:

  • RUBY-19148 Markdown rendering window does not support mouse wheel font size increase/decrease
Ammeter answered 21/3, 2017 at 15:13 Comment(5)
If you are interested how the default CSS looks like, it can be found on GitHub here: github.com/JetBrains/intellij-plugins/blob/master/markdown/…Promulgate
@Promulgate 's link is broken now that the code was moved to the Intellij Community Repo. The default CSS can now be found hereHolmium
That's a bit unfortunate that it's not easier. Even scrolling with mouse-wheel doesn't adjust it, even if set to adjust for codes.Pelotas
This comment is no longer the only working way of achieving this. Going through the Settings Dialogue is likely going to be a lot easier for most people.Divertissement
@LexiBlesius Updated the answer. Thanks.Ammeter
D
2

As of 2.6.2024 (that is d.m.yyyy) you can go to File > Settings > Languages & Frameworks > Markdown > Preview Font Size. [Screenshot of Settings Dialog following the breadcrumbs given above in the description. Preview font size is set to 16, which is highlighted by a red square around the setting.1

Divertissement answered 2/6, 2024 at 9:3 Comment(0)
W
0

File > Settings > Search for 'preview' > Page Zoom (allows values from 0.1 to 10). If you set this to around 1.5 it works well. Use the decimal places to get it just right.

Workmanship answered 22/9, 2017 at 8:3 Comment(0)
C
0

if u have custom appearance, the markdown font must be changed within color scheme > color scheme font..

Couple answered 9/6, 2022 at 23:12 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.