Wizard
Wizard

Reputation: 22143

Increase the editor width or viewable area in Typora

When writing in the Typora, the viewable width (editor width) is limited.

enter image description here

How could I enlarge from A to B?

Upvotes: 10

Views: 4639

Answers (3)

magallanes
magallanes

Reputation: 6854

Typora and responsible width

For the record, you can edit the file as follow.

  • Look at the folders where is the CSS (as indicated by itsmysterybox)

  • Find the .css file and copy it with a new file. For example github2.css

  • Also, copy the folder related with the .css that you copied and rename it with the same name, for example, github2\

  • Find the next lines:

    @media only screen and (min-width: 1400px) { #write { max-width: 1024px; } }

    @media only screen and (min-width: 1800px) { #write { max-width: 1200px; } }

And delete it.

  • Find the next line

    #write {
    max-width: 860px;
    margin: 0 auto;
    padding: 30px;
    padding-bottom: 100px;
    }

And edit the line max-width: 860px; to max-width: 95%;

  • Restart the application and select the new theme (see image)

Why 95% instead of 100%?

We are giving it some space for the scroll bar. However, and apparently, 100% also works and it doesn't break any visualization.

Why we need to copy the .css and the folder instead of editing an existing one?

Because updates of the program could (and most likely will) replace it.

enter image description here

Upvotes: 5

garettmd
garettmd

Reputation: 317

There's two support pages on Typora's website that address this. The main difference between @itsmysterybox's answer is that you create a base.user.css file in the themes folder, and add the below snippet with whatever value you prefer. Doing it this way means that it will apply to all themes.

#write {
  max-width: 1800px; /*adjust writing area position*/
}

If you want to adjust the width of source code mode you can use:

#typora-source .CodeMirror-lines {
  max-width: auto; /*or 1000px*/
}

Upvotes: 0

itsmysterybox
itsmysterybox

Reputation: 2848

You can change CSS file of the theme you are using. Go to File > Preference or press Ctrl+Comma. In Themes click Open Theme Folder.

screenshot

Open the CSS file of your theme. For example I'm using Github theme.

image

So I'm opening github.css file. In CSS file go to #write (write id). Here change the value of max-width.

image

Default value of max-width in this theme is 860px. You can increase this to whatever you want. For example:

max-width: 1200px;

In some themes, you may also find max-width in em instead of px. For example:

max-width: 40em;

Increase this value to whatever width you prefer.

In case you want the editor to be of full width, remove this max-width property entirely.

Upvotes: 10

Related Questions