-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change how paragraphs are handled in Rich Text editor #8600
Comments
That’s exactly how Word works though. In Word you start a new paragraph with Enter and a new line with Shift + Enter, same as in Joplin. |
I've just tried from a blank document the other day and that's not how it was working |
I think there may be differences in how this works in Word on macOS and Word on Windows. The two aren't exactly the same, and especially the older versions (as from what I know, the newest ones have become closer in terms of functionality). My testing was done on Windows 10. |
This is dependent on what style you use. By default I think the Interestingly Wordpad also defaults to this same style with the different return and shift + return behaviour. Compare that to LibreOffice Writer or Google Docs which both use the same for both. |
Word, Google Docs, and Libreoffice Writer all work the same way. Enter for a paragraph break, Shift + Enter for a line break. @laurent22 What does your document look like with formatting marks enabled? |
Interesting. These are all paragraph breaks. Seems like Shift + Enter is broken on MacOS. |
Let's leave it as it is, since the current behaviour seems to be ok |
This issue comes up often enough that I'm wondering if we should have a poll about it. |
Please add an option to change this. I don't want to press Shift + Enter every time to make a new line, I just want it to be Enter. I didn't see it in Keyboard Shortcuts. I'm probably dumb but I don't understand what the point is with Viewer (I can't edit anything), and Markdown editor isn't pleasing either because I don't want to see the technical stuff when bolding or whatever, like Sorry if it's just me that's being dumb and not understanding. |
For that particular example, I guess you could use a list? That would be more semantically correct or would format in a better way. But yes I agree that ideally pressing Enter should just be one new line, not a new paragraph. However I checked and the editor we use, TinyMCE, doesn't really support it. Well it does, but when it's enabled many things are broken because it needs the concept of paragraphs to apply formatting correctly. So I can't think of a solution at this point. It seems like a Typora-like editor would solve this by treating the text as it is, instead of having hidden paragraphs or newline elements. |
One option would be to add a "add space between paragraphs" or similar appearance setting. This could be applied with CSS similar to the following: #rendered-md.-reduce-paragraph-spacing p {
margin-top: 0;
margin-bottom: 0;
} |
I think that the best solution to paragraph vs new line on Enter debate is to make it a setting, so every user can choose an option that is more convenient to them. For me, personally, paragraph on Enter is vastly preferred behavior (in fact, I never had the need to insert a "line but not paragraph" in the first place). And it's a de-facto standard in editors like Word. So the hypothetical change of that behavior would be workflow-breaking for me (and likely many others), and I would likely migrate to another notes app (because it would be extremely unconvenient to press Enter twice or Shift+Enter every time I want to start a new paragraph). In my opinion, "just new line" is a rarer use case than "paragraph", so Shift+Enter is better for "just new line" and Enter for "paragraph". But I understand that others can have other opinion, so it would be best to let the user choose via settings. This comment is only about the usability side of the issue, not about |
I too would like to have this as an option. If you are wanting consistancy. OneNote doesnt do it. EverNote doesnt do it. Obsidian doesnt do it. Notepad++ doesnt do it. It seems like word processors normally do this but Note taking apps dont normally do it. I can appreciate people needing the option. For me its more I would rather be able to see more of my notes on one screen than I would have the text be spaced out. |
These are word processors not note taking apps. They are a different catagory of application. |
I think I have to agree with adding it as a setting at least. My opinion is that its a note taking app not a word processor, I'm not sure I even see the point of a new "paragraph" when two new lines basically does the same thing when required, whilst avoiding the annoyance of pressing shift all the time. |
Yes please please please please please provide an option to change it. Every other program I've ever used just takes you to a new line when you hit enter, rather than adding a line/space/paragraph (whatever you may call it). Furthermore, since this is a note-taking program, I use new-paragraphs for specific purposes. Learning to hit shift-enter will just create a habit that confuses my use of other apps. How about THIS as an option: My number 1 wish with Joplin! :) |
Similar problems have been discussed by many people every year, I don't quite understand why developers are not willing to make changes. Joplin also has a lot of popular users, no matter non-technical or technical people, just a simple line break must Shift+Enter is still very annoying, and this problem used to unanimously bother me, then I used a simpler solution to solve the problem, shortcut mapping, on windows I use autohotkey to map shortcuts Enter -> Shift+Enter, Shift+Enter -> Enter. I think if it's difficult to implement at least add the shortcuts to the settings, I subjectively think it's less disruptive and gives the user more choices. |
I'm copying my answer from the forum here and locking the thread so that this answer remains visible. We understand this is important to a lot of users (and, actually, to me too), but unfortunately there is no easy fix: The problem is that if we change this behaviour to enter a newline instead of a paragraph, the editor will see the document as one giant continuous line with no paragraphs (even two lines separated by two newlines will not be considered as two paragraphs). So a lot of functionalities that rely on paragraphs will be broken, in particular when creating lists. The conversion to Markdown also won't be good, which means when you view the note on mobile you'll have a very long line with litteral So it's not really a matter of adding an option or not. Even if we add the option, it's still broken and unfortunately that can't currently be fixed with the editor we're using. My preferred solution at the moment would be to move to a different Rich Text Editor, one like Typora, which is a bit closer to Markdown while keeping most of the advantages of a proper RTE. |
The current rich text editor supports both paragraphs (P tag) and lines separated by newlines (BR tags). The distinction between both can be confusing and makes it hard to edit the text.
It is also not how other WYSIWYG editors, in particular Word, work. Paragraphs are simply blocks of texts separated by two newlines.
We should aim for something similar. It means that when rendering the Markdown, to the Rich Text editor in particular, we should use two BRs to separate paragraphs instead of a P tag. When pasting text we should do something similar.
Pressing Enter, should create a BR tag (not a P, as now).
When implementing this, we should however make sure it's not going to break:
The text was updated successfully, but these errors were encountered: