obsidian-citation-plugin icon indicating copy to clipboard operation
obsidian-citation-plugin copied to clipboard

Citations not working on Obsidian Canvas

Open ghost opened this issue 2 years ago • 1 comments

Describe the bug When I try to insert a citation from my litterature on a canvas file in Obsidian, it doesn't do anything.

To Reproduce Steps to reproduce the behavior:

  1. Go to a canvas file
  2. Double-click on the canvas anywhere to create a text box
  3. Bring up the command panel and click on "Citations: Insert litterature note content in the current pane"
  4. Nothing is inserted.

Console output app.js:1 Obsidian Developer Console plugin:obsidian-auto-link-title:250 loading obsidian-auto-link-title plugin:obsidian-banners:28 Loading Banners... plugin:dataview:20685 Dataview: version 0.5.47 (requires obsidian 0.13.11) plugin:obsidian-charts:79 loading plugin: Obsidian Charts plugin:customjs:163 Loading CustomJS plugin:obsidian-task-collector:539 loading Task Collector (TC) plugin:dataview:13951 Dataview: all 296 files have been indexed in 0.171s (296 cached, 0 skipped). TypeError: Cannot read properties of null (reading 'replaceRange') at CitationPlugin.eval (plugin:obsidian-citation-plugin:85866:29) at step (plugin:obsidian-citation-plugin:92:23) at Object.eval [as next] (plugin:obsidian-citation-plugin:73:53) at eval (plugin:obsidian-citation-plugin:66:71) at new Promise () at __awaiter (plugin:obsidian-citation-plugin:62:12) at CitationPlugin.insertLiteratureNoteContent (plugin:obsidian-citation-plugin:85862:16) at InsertNoteContentModal.onChooseItem (plugin:obsidian-citation-plugin:14823:21) at InsertNoteContentModal.t.onChooseSuggestion (app.js:1:1726362) at InsertNoteContentModal.t.selectSuggestion (app.js:1:1725912) Promise.catch (async) InsertNoteContentModal.onChooseItem @ plugin:obsidian-citation-plugin:14823 t.onChooseSuggestion @ app.js:1 t.selectSuggestion @ app.js:1 e.useSelectedItem @ app.js:1 e.onSuggestionClick @ app.js:1 s @ enhance.js:1

Expected behavior I expect to insert my chosen citation onto the canvas in the newly created text box.

Platform

  • OS: [Windows 11]
  • Obsidian version [1.1.9]
  • Plugin version [0.4.5]

ghost avatar Feb 12 '23 15:02 ghost

I've also seen this issue since the introduction of canvas on my mac (current OS version: 14.0). Would love to see this fixed!

andredelft avatar Jan 19 '24 09:01 andredelft