[Bug 2.1.64] default HTML editor

Tested on Windows 10 Version ⁨2.1.64 (581f82c5)⁩, Python 3.9.15 Qt 6.4.3 PyQt 6.4.0.
Encountered similar issues when testing on version 2.1.62 qt6.
No add-ons active.

Steps to reproduce:

  • Open the editor, select a note type and a field, then set “Use HTML editor as default” to yes (Fields → Use HTML editor as default)
  • Open the “Add card” window, select the note type that was edited in step 1, then use Change Note Type to move to a different note type.
  • Result: the field occupying the same position as the one edited in step 1 will be bugged.
    For instance, if you set field #1 of note type 1 to use the HTML editor as default, upon changing from note type 1 to note type 2, field #1 of note type 2 will show abnormal behavior. This also happens when switching back from note type 2 to note type 1.

Description of the issue: the problem arises when switching between the normal and HTML editor (either via the <>/AA button or using the Ctrl+Shift+X shortcut, with some slight differences). The behavior of the bug varies in different scenarios.

E.g.

  • sometimes the field just collapses

  • In some instances, the Ctrl+Shift+X shortcut fails to toggle the editor mode, which remains stuck in its current mode. Usually, the <>/AA button keeps functioning correctly.

  • At other times, after changing the editor mode, Anki does not display both the normal and HTML editor simultaneously (one on top of the other), but rather “switches” between the two modes:

The problem also occurs when moving from a notetype to another while navigating in the Browser, and can only be reset by closing and re-opening the Browser.

Are you sure the ‘change notetype’ step is required? This sounds more like an intermittent issue with the editor.

I’m also a bit confused by these steps - what did you meant the browse window, not the add card window in step two? Which editor are you referring to in step 1?

Yes, I am sure. To trigger the issue, you first need to load a notetype, then load/move to a second notetype, while still in the same Add window/Browser session.
It happens 100% of the times when I do that, and 0% otherwise.

Sorry for the confusion. I just meant anywhere where you can click on Fields to activate “Use HTML editor as default”. I.e. the Add window/Edit window/Browser/Manage Note Types.

I will try to explain the steps in a more straightforward way:

Add window:

  • select a notetype that has a field, e.g. field in position 1, set to "Use HTML editor as default"
  • use “Change Note Type” to move to another notetype whose corresponding field, e.g. field in position 1, is not set to "Use HTML editor as default"
  • after moving from notetype1 to notetype2, field in position 1 of both notetypes will show the issues I described in the previous message
    (it resets when you close the Add window)

Browser:

  • load a note belonging to a notetype that has has a field, e.g. field in position 1, set to "Use HTML editor as default"
    (e.g. use note:notetype1 as the search string, then click on a search result to load it)
  • load a different note belonging to another notetype, whose corresponding field, e.g. field in position 1, is not set to "Use HTML editor as default"
    (e.g. use note:notetype2 as the the search string, then click on a search result to load it. Do not close the Browse window in between)
  • field in position 1 of both notetypes will now show the issues I described in the previous message.
    (it resets when you close the Browse window)

Ok, I see, you’re not using the change notetype feature in the browser, you’re changing the selected notetype in the add screen. I’ve logged this on "Show HTML by default" buggy after changing current notetype? · Issue #2521 · ankitects/anki · GitHub

1 Like

Correct, sorry for the misunderstanding. I chose that terminology based on the text of the button’s tooltip.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.