joplin icon indicating copy to clipboard operation
joplin copied to clipboard

WYSIWYG editor's newlines gets broken and prints double newline

Open mu-us61 opened this issue 1 year ago • 1 comments

Environment

Joplin version: 2.8.8 OS: windows 10 , 64-bit

Steps to reproduce

  1. open wysiwyg editor and just type some stuff with new lines
  2. then switch to markdown editor from right top icon , the again back to wysiwyg editor
  3. now in wysiwyg editor newlines broken forever always prints double new lines, instead of 1

Describe what you expected to happen

it should just print a newline

I just installed joblin so I am not sure maybe this bug happens in other circumstances too

brokenlines

mu-us61 avatar Aug 07 '22 20:08 mu-us61

I believe this is (semi) intentional. When you start a new richtext page the first line is contained within <div id="rendered-md"> and subsequent lines are just new <p> lines under the same parent. When you leave the editor and come back it correctly places the lines inside <div id="rendered-md">

i.e. before:

<body id="tinymce" ...snip...>
    <div id="rendered-md">test</div>
    <div>test2</div>
    <div>test3</div>
</body>

after:

<body id="tinymce" ...snip...>
    <div id="rendered-md">
        <p>test</p>
        <p>test2</p>
        <p>test3</p>
    </div>
</body>

I think this is related to a hack to get the richtext editor to work correctly.

The "broken" behaviour is actually the correct one. TinyMCE by default inserts a <p> on a return. If you want a <br> then you need to shift + return

Daeraxa avatar Aug 07 '22 23:08 Daeraxa

I understand thanks for explanation, but that means if you are using WYSIWYG editor as primary with all your stuff and someday if you press markdown button by accident, all your work will be messed up, this makes WYSIWYG editor unusable , then it should be locked on WYSIWYG editor and switching to markdown must be blocked or entire page will be messed up at some point , as it is switching editors buggy

mu-us61 avatar Aug 27 '22 19:08 mu-us61

It isn't anything to do with switching editors, it happens when you change notes. i.e. with the richtext editor on:

  • Create new note
  • Add content, it single spaces
  • Click a different note and come back to the original
  • Format has changed

Daeraxa avatar Aug 28 '22 02:08 Daeraxa

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

github-actions[bot] avatar Sep 27 '22 16:09 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.

github-actions[bot] avatar Oct 04 '22 16:10 github-actions[bot]