How to get rid of double line-spacing?

Operating system

Windows

Joplin version

3.6.11

Desktop version info

Joplin 3.6.11 (prod, win32)

Device: win32, 12th Gen Intel(R) Core(TM) i5-1235U
Client ID: 8b409d6885774e88b3fcd2cbb86eb1fc
Sync Version: 3
Profile Version: 49
Keychain Supported: Yes
Alternative instance ID: -
Sync target: OneDrive
Editor: Rich Text

Revision: 7f6fda7

Backup: 1.5.1
Freehand Drawing: 4.3.0
Note Tabs: 1.4.0

Editor

Rich Text Editor

What issue do you have?

Hi! I'm new-ish to Joplin, but have ~2yrs of tinkering experience with it so far. I'm a software guy, so I'm very familiar with troubleshooting Windows issues in general.

I'm desperate for a solution for eliminating the default double line-spacing behavior -- one that DOESN'T require me to use Shift-Enter.

I tried an older fix for userstyle.css ... sorry, don't recall where I found it in the forums:
---\

#rendered-md :is(p /* modify tags as needed /) {
/
modify declarations below as needed */
padding-bottom: 0 !important;
padding-top: 0 !important;
}

/* fix for dbl lines-spacing problem: */

#rendered-md :is(p, ul, ol, li) {
margin-bottom: 0 !important;
line-height: 1.5em !important;
}

#rendered-md :is(ul, ol) {
margin-top: 0 !important;
}

---/

^ IIRC, it worked for about a month, then reverted back to double line-spacing behavior.

Today I tried a fix I found in a 2024 forum topic:

Naturally I saved userstyle.css, then killed+restarted Joplin completely.

  • Viewing old notes (e.g. my imports from Evernote): still show double line-spacing.
  • Created a new test note: Shift-Enter still gives me the single line-spacing I want, but the Enter key STILL results in double line-spacing.

Ugh. Can anyone point me in the right direction, please? I don't care if it's a messy hack or not; this is currently the only big headache I have with Joplin, and it's a daily 'migraine'.

Thanks in advance.

Its an inherent limitation with the TinyMCE rich text editor: Change how paragraphs are handled in Rich Text editor · Issue #8600 · laurent22/joplin · GitHub

the only real way to avoid this is by using the markdown editor instead

bwat47: Thanks for the quick reply.

:disappointed_face: [sigh] Looks like I'll have to (someday when not rushed) spend time hooking in a new rich text editor. And buying more tylenol in the meantime.

I disagree with the views expressed that this 'is not what joplin/MDeditors are about'... In the big pic, this is an app; we single line-space fans are a big part of the userbase; it's a feature we want; throw us a fricken bone. It's sad that the Devs' high-minded principals are the roadblock. :face_with_diagonal_mouth:

I'm not sure which comment you're referring to, but Laurent's comments there seem to be in favour of removing the shift+enter requirement, plus the fact that he opened the issue in the first place. The problem is there is no good solution for the issue using the current TinyMCE editor. We do have a new Rich Text Editor on mobile now which resolves the shift+enter issue, and will eventually be shared with desktop and replace TinyMCE, but there isn't any estimate at this point for when that will happen, because there needs to be full feature parity between the two editors implemented, before that can happen.

In the meantime, I saw somewhere that someone made a script (using autoit I think), to automate mapping shift+enter to enter when using Joplin.

I never understood any of the heartache over this.

Enter = Paragraph
Shift-Enter = Line Break.

And this pattern holds true for any word processor or WYSIWYG-style editor (TinyMCE is an HTML editor and not, per se, a text editor).

The spacing follows standard HTML-style blank line rendered between paragraphs. And, of course, paragraphs are rendered properly (when you look at the resulting HTML) with <p></p> pairs whereas line breaks are rendered with <br>'s.

I never use the WYSIWYG editor, personally. I use the Markdown Editor, or an external text editor. Text editors are more barebones. Enter or Shift-Enter have no differences in most of those.

With a text editor (like, for example, the Markdown Editor), you have to know how markdown works, for the most part. Enter and shift-enter both simply move the cursor to the next line.

How those two lines are rendered in the view depends on your soft break setting in Options > Markdown > Enable soft breaks. Checked = standard markdown compliance. Unchecked = non-standard.*

And so, in standard markdown, if you want a new paragraph, you hit enter twice. And if you merely want a new line after an arbitrary break from the previous line, you add two spaces at the end of a line then start the new one. Or you manually insert a
between two lines.

It would be nice if TinyMCE had a few settings to change how it renders paragraphs. As it stands, it renders them in the default way any HTML or markdown is rendered.

*Note, the non-standard configuration mentioned above (Enable soft breaks turned off) is reasonably common with markdown editors: For example, this comment that I am typing right now uses a markdown editor that sets a hard break when I start a new line—great for notes and comments, but less great if you are creating documents that you are then passing around in markdown format.