notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Headline formatting cannot be removed in rare cases

Open ironjan opened this issue 3 years ago • 2 comments

Steps to reproduce the behavior

In rare cases, formatting behaves weirdly and cannot be removed. It most often encountered this with headlines. I do not have reproduction steps for the issue, just a document that has the issue: https://www.notebook.ai/documents/125118

Removing the affected text and typing it new helps sometimes. However, in most cases, moving the text to an external plaintext editor, deleting the affected area (in this case the complete list and some text below), copying the text from the plaintext editor and formatting it from the beginning is the best bet.

Expected behavior

Headline formatting should not occur without being removable.

Actual behavior

In the following screenshot, the two last bullet points are to big: headline_formatting

According to the formatting bar, they are formatted as H2. However, the list entries' text does not look like H2. heading_2

When clicking H2 to remove the formatting, only the distance between the list items increases: heading_3

When clicking "remove formatting" instead of H2, the formatting switches to actual H2 text style: heading_4

ironjan avatar Mar 01 '21 22:03 ironjan

Unfortunately, this is probably a bug in the rich text editor library we're using, which I've just realized is no longer maintained (oof).

I'll dig around their code and see if I can reproduce this and/or find a fix. In the meantime, the workaround you mentioned is indeed probably the best bet. Sorry about that.

drusepth avatar Mar 04 '21 00:03 drusepth

I discovered another interesting issue related/caused by the rich text editor: formatting mixed type (headlines, no headlines) text can change the order of text. Hard to explain, so I just recorded a video: https://youtu.be/KYWiMy9Uhk4 (unlisted video).

The "Remove formatting" button does not work for mixed-type text which prompted me to try the "format everything as H1 and remove it again" workaround.

ironjan avatar Apr 05 '21 18:04 ironjan