Skip to content

v1.0.97

Choose a tag to compare

@jsglazer jsglazer released this 04 Sep 17:20
· 13 commits to main since this release

Fixed — notes not saving in the Zotero editor

With two or more editor decoration features switched on (callouts, code highlighting, collapsible sections, KaTeX rendering), typing in a note rendered on screen but was never saved — the note was unchanged when you reopened it.

The plugin bundles its own copy of prosemirror-view, so the decoration sets its plugins return are not instanceof the DecorationSet inside Zotero's note editor. Zotero's DecorationGroup.from short-circuits on a single member, which is why one feature worked; with two or more it fell through to a path that reads m.members, put undefined into the group, and threw out of updateState → dispatchTransaction on every subsequent keystroke. The browser had already placed the character in the DOM, so it appeared, but the transaction never completed and Zotero never wrote the note.

  • Our DecorationSet.prototype now answers members, so Zotero builds a valid group and calls back into our sets correctly.
  • A feature with nothing to draw contributes null rather than an empty set, so it isn't counted as a decoration source at all.
  • The plugin-install fallback now genuinely restores the previous editor state. updateState assigns the new state before updating the DOM, so the old catch left the view half-configured while reporting that the editor was fine.
  • A markdown input rule that throws can no longer swallow a keystroke: handleTextInput is guarded, logs once, and hands the keystroke back to ProseMirror.

Added

  • Import from Markdown File in every note-creation menu. The command now appears wherever Enhanced Notes offers to make a note, matching what that menu creates — the item pane's + → standalone note and right-click an item → Enhanced Notes join the library toolbar's New Note ▾ and the item pane's Notes +.
  • Import Item Note from Markdown File translated into German, Italian, Russian, Turkish and Simplified Chinese.

Removed

  • The KaTeX stylesheet injection into the note editor. The editor is resource://zotero/note-editor/editor.html, which may not link to chrome: URLs, so it was refused on every open and logged a Security Error. It was redundant — Zotero's own editor CSS already bundles KaTeX and its fonts.