standardnotes / bold-editor

[Moved to https://github.com/standardnotes/app]
GNU Affero General Public License v3.0
10 stars 11 forks source link

[BUG] Format Button stopped working in some notes #9

Open TXS380 opened 4 years ago

TXS380 commented 4 years ago

I came across a strange but really annoying bug. I just recently started using bold editor and I really like it. However in one of my notes I cannot change the format using the Format Button (looks like a mirrored P).

I encountered that bug across all devices (Ubuntu and Android).

The expected behavior is: I mark a specific line, click on Format, choose the desired option and it changes the font accordingly.
Instead I am only able to change the format up to a certain point of that note but after that point it stops changing the format (e.g. changing from Heading1 to Code). In addition, other format options like "Style" or "Size" work just fine.

So far I only encountered that bug in one specific note but moving the HTML code to a new note did not fix the problem. It is a fairly long note but nothing excessively I would say. In addition, I do not encounter that bug in Plus Editor.

bryvin commented 4 years ago

I haven't experienced this with my usage of the Bold Editor yet but I don't use it too often. To me it sounds like a bug with the editor source that the Bold Editor is based on which is called Redactor. These type of things are hard to debug unless we can reproduce it easily with specific steps.

We'll keep an eye on this but if you experience it again or have any steps that produce it 100% of the time or at least often please post them here.

In the meantime the note that you are having issues probably has a mixed up matching HTML tag somewhere, whether its missing a closing tag or has 1 too many closing tags it could effect the ability for the editor to understand where it should begin or end the formatting change. So if you know HTML I would suggest putting it in a prettifier and seeing if you spot any obvious issues with the syntax. Alternatively if the note content is not something you would mind sharing you can post a link here to the source and we can take a look.

TXS380 commented 4 years ago

Shame, I really like the editor, the simplicity and slightly more readable HTML display is great. But it seems like whenever I use older notes created with Plus Editor I run into problems.

Like with tables; If I use tables created with Plus Editor Links do not pop up instead I need to copy and paste them manually. Even if I cut and paste them links do not seem to work properly, they are now shortened as expected but there is no popup. Sometimes It even breaks Code boxes inside cells if these include URLs.

TXS380 commented 4 years ago

This is a subsample of a note that I created in Plus and does not work in Bold. I cannot click any of the links in the table because there is no popup. However, If I remove a row, then it works but only as long as I stay inside that note. Ones I leave the note (go to a different one) and go back it does not work anymore. note.txt

bryvin commented 4 years ago

So I did some digging with the sample you provided and it appears the Bold Editor (which again is based on Redactor) does not like having a pre tag inside of the Table elements. Simply removing the pre tag from these elements in the plain editor then switching back to the bold editor allowed the url popup to be displayed for all the links. This may also be a cause for the format button to become broken as you've described.

Unfortunately since these are 3rd party editors we cannot guarantee they all will play nicely together and allow formats from one or the other to be parsed properly and be fully functional.

With that said, there is a new version of Redactor available that we will be upgrading the Bold Editor to use soon. That may or or may not fix this specific issue but we can keep an eye on this and possibly send a support ticket to Redactor.