1.0.218 – My RPM builds – Fedora 32 Linux – GNOME desktop 3.36
So far, I really like Code Mirror. I am not sure really why to be honest, other than it is a bit prettier. Maybe that is all I needed.
But I see little glitches here and there. But I am really having trouble replicating things reliably (isn’t that so often the case?). What I have seen …
I have browsed to an existing note and the whole note did not show up in the editor immediately until I … I am not sure what I did, but the note came back. Maybe tried to type something? This happened a couple times in the last week.
Cursor position is sometimes not accurate. I go to edit an existing note and start typing. The cursor at first indicated it was in one position, but really it was somewhere else. And no, this was not due to a palm touch mistake on the touchpad. I do that often enough, but that is not what this is. I have even used the arrow keys to move around and I will go to a line where there are a TON of excess spaces at the end, I highlight them and delete them to clean them up, but OOOPS, the cursor what really elsewhere in the document and deleted a bunch of letters. This only seems to happen when I click into an existing note from elsewhere.
Note: I haven’t altered the CSS in userchrome.css at all. Nor userstyle.css for that matter. FYI: RFE – a default set of CSS populated in the .config/joplin-desktop directory, so that we don’t have to re-remember how to customize the CSS. I can’t recall how to look up the tags and elements and IDs and classes anymore. I digress.
Thanks for reporting this, I also like the codemirror editor so I want to make sure it’s as solid as possible (more solid than ace editor).
I have seen this occasionally as well, I think it is actually tied to the recent editor upgrades and will still happen on the ace editor. If you don’t mind, please try the ace editor as well and let me know if it ever happens (I’ll do the same).
I have also experienced this issue with no luck reproducing. I thought maybe it was related to a bug I had with the gnome desktop. Are you also on gnome? I’ll spend more time trying to reproduce this more reliably. Hopefully we can get it fixed soon.
Nope. The issue doesn’t seem to appear (at least not yet) with the Ace Editor. The Ace Editor is also all one fontsize. Maybe that has something to do with it?
Found another thing. It’s not a bug, just a step back, IMHO: code blocks were syntax highlighted in the Ace Editor. Not so in Code Mirror. Just create a CSS codeblock for example.
Interesting! I didn't realize that code blocks were ever syntax highlighted in AceEditor! Actually codemirror supports more syntax highlighting than aceeditor, but you have to manually specify each language. I added a few to start (try javascript or python) but neglected to add css. Eventually I want to add every supported language (including css). Thanks!
edit: btw here are the languages that can be supported
So I guess we should at least support those in Ace Editor, but it can be more than that too. Ideally we’d add support for let’s say the top 50 most popular languages but it’s difficult to find such a list.
And yes as T0dd mentioned in the other thread we should also support at least “plaintext” (maybe “text” also too but I think only “plaintext” works in Ace Editor)
Sorry. I'm jumping around threads. Yeah, some zero highlight mode (plaintext or whatever) is a must. Personally, I wish the various editors would just treat unadorned ``` as no highlight. Hey! We have that now with Code Mirror. I kid.
Otherwise, top languages to start. Also markup schemas (TeX, reStructured text, docbook, etc). Anyway. Some kind of prioritized support and then let others slowly be added? Is it a PITA to just support "everything"? Is it a size issue?
CodeMirror indents code-like things (eg. <span style="color: green">Some Text</span>)
A. The bounce of the cursor is annoying. There is enough already in this application.
B. It indents 4 spaces. Which, since this is a markdown editor, that fancy HTML I wrote is suddenly a text block and the HTML is ignored.
Good news! I was able to reliably reproduce this and have prepared a fix! Take a look on github
And as an update for what you have reported, I still haven't been able to reproduce issue number 1 (slow loading note in editor). The syntax highlighting (and loading css in general) is next on my codemirror todo list!