Skip to content

Commit 61f506e

Browse files
authored
Fixed-width fonts in the markdown editor
1 parent ec9a1bb commit 61f506e

10 files changed

Lines changed: 34 additions & 4 deletions

File tree

25.1 KB
Loading
27.9 KB
Loading

content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ You may want to use a dark theme to reduce power consumption on certain devices,
2929
{% endif %}
3030

3131
{% data reusables.user_settings.access_settings %}
32-
1. In the user settings sidebar, click **Appearance**.
33-
34-
!["Appearance" tab in user settings sidebar](/assets/images/help/settings/appearance-tab.png)
32+
{% data reusables.user_settings.appearance-settings %}
3533

3634
1. Under "Theme mode", select the drop-down menu, then click a theme preference.
3735

content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,20 @@ You can also interact with other users in pull requests and issues using feature
2121

2222
Every comment field on {% data variables.product.product_name %} contains a text formatting toolbar, allowing you to format your text without learning Markdown syntax. In addition to Markdown formatting like bold and italic styles and creating headers, links, and lists, the toolbar includes {% data variables.product.product_name %}-specific features such as @mentions, task lists, and links to issues and pull requests.
2323

24-
![Markdown toolbar](/assets/images/help/writing/markdown-toolbar.gif)
24+
{% if fixed-width-font-gfm-fields %}
25+
26+
## Enabling fixed-width fonts in the editor
27+
28+
You can enable a fixed-width font in every comment field on {% data variables.product.product_name %}. Each character in a fixed-width, or monospace, font occupies the same horizontal space which can make it easier to edit advanced Markdown structures such as tables and code snippets.
29+
30+
![Screenshot showing the {% data variables.product.product_name %} comment field with fixed-width fonts enabled](/assets/images/help/writing/fixed-width-example.png)
31+
32+
{% data reusables.user_settings.access_settings %}
33+
{% data reusables.user_settings.appearance-settings %}
34+
1. Under "Markdown editor font preference", select **Use a fixed-width (monospace) font when editing Markdown**.
35+
![Screenshot showing the {% data variables.product.product_name %} comment field with fixed width fonts enabled](/assets/images/help/writing/enable-fixed-width.png)
36+
37+
{% endif %}
2538

2639
## Further reading
2740

content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ git commit
7878

7979
For more information, see "[Creating and highlighting code blocks](/articles/creating-and-highlighting-code-blocks)."
8080

81+
{% data reusables.user_settings.enabling-fixed-width-fonts %}
82+
8183
## Links
8284

8385
You can create an inline link by wrapping link text in brackets `[ ]`, and then wrapping the URL in parentheses `( )`. {% ifversion fpt or ghae or ghes > 3.1 or ghec %}You can also use the keyboard shortcut `command + k` to create a link.{% endif %}{% ifversion fpt or ghae-issue-5434 or ghes > 3.3 or ghec %} When you have text selected, you can paste a URL from your clipboard to automatically create a link from the selection.{% endif %}

content/github/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Look! You can see my backticks.
4545

4646
![Rendered fenced code with backticks block](/assets/images/help/writing/fenced-code-show-backticks-rendered.png)
4747

48+
{% data reusables.user_settings.enabling-fixed-width-fonts %}
4849

4950
## Syntax highlighting
5051

content/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Cells can vary in width and do not need to be perfectly aligned within columns.
3838

3939
![Rendered table with varied cell width](/assets/images/help/writing/table-varied-columns-rendered.png)
4040

41+
{% data reusables.user_settings.enabling-fixed-width-fonts %}
42+
4143
## Formatting content within your table
4244

4345
You can use [formatting](/articles/basic-writing-and-formatting-syntax) such as links, inline code blocks, and text styling within your table:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Reference: #5278.
2+
# Documentation for the fixed-width font support for markdown fields.
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>=3.4'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
1. In the user settings sidebar, click **Appearance**.
2+
3+
!["Appearance" tab in user settings sidebar](/assets/images/help/settings/appearance-tab.png)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% if fixed-width-font-gfm-fields %}
2+
3+
If you are frequently editing code snippets and tables, you may benefit from enabling a fixed-width font in all comment fields on {% data variables.product.product_name %}. For more information, see "[Enabling fixed-width fonts in the editor](/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github#enabling-fixed-width-fonts-in-the-editor)."
4+
5+
{% endif %}

0 commit comments

Comments
 (0)