No automatic line breaks in the Markdown editor

I would like the option to disable the automatic word wrap in the Markdown editor in Joplin, so that a line is displayed in a single line with a horizontal scroll bar, no matter how long the line is. The maximum width of the editor is set to zero.

I had already asked about this in the support area.

And the function has been requested here before, without there being any result to the request.

1 Like

The CodeMirror 6 docs include lineWrapping as a boolean variable. Could a toggle for it be added to the Extra Markdown editor settings plugin?

For an immediate workaround on desktop, you can edit your userchrome.css file. Open it in a notepad by clicking Tools > Options > Appearance > Show Advanced Settings > Custom stylesheet for Joplin-wide app styles.

If you use the CodeMirror 6 beta editor (enabled by default), add this CSS to userchrome.css:

.note-editor-wrapper div[style$="flex: 1 1 0%;"] {
  overflow-x: scroll;
}

.cm-lineWrapping {
  white-space: nowrap !important;
}

If you use the CodeMirror 5 legacy editor (toggleable with Tools > Options > General > Show Advanced Settings > Enable the legacy Markdown editor), add this CSS to userchrome.css:

.CodeMirror-sizer {
  display: flex;
  overflow-x: scroll;
  width: max-content; 
  min-width: inherit;
}