Skip to content

How do you control the size of the left margin / glyph row? #303

Answered by kaphula
kaphula asked this question in Q&A
Discussion options

You must be logged in to vote

With folding: false and lineNumbersMinChars: 2 the margin can be set to very reasonable width. The default lineNumbersMinChars value is 5 which does not make much sense in my opinion since the lineNumbersMinChars adds automatically more space if the number of lines can't fit in the margin.

<Editor
    options={{
      width: width,
      height: height,
      fontSize: 18,
      glyphMargin: true,
      lineNumbersMinChars: 2,
      folding: false,
    }}
    defaultLanguage="javascript"
    defaultValue={this.props.initialEditorContent}
    onChange={this.codeOnChange.bind(this)}
    beforeMount={this.handleEditorWillMount.bind(this)}
    onMount={this.handleEditorDidMount.bind(this)}
    

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kaphula
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant