joplin / plugin-bibtex

Use locally stored BibTeX files to integrate citation into Joplin
29 stars 7 forks source link

Conflicts with "Automatic Backlinks to note" plugin #30

Open S73ph4n opened 2 years ago

S73ph4n commented 2 years ago

Hello, Good job on this plugin, it is extremely useful !

Just a minor inconvenience : I've just noticed that it does not seem to work if the "Automatic Backlinks to note" plugin is also installed (even if it isn't set up to display the backlinks). I can insert references but they just don't appear at the end of the note.

Without Backlinks plugin : image

With Backlinks plugin : image

white-c commented 2 years ago

I am having the same issue. I have tried changing all of the options but it doesn't fix the issue.

Joplin 2.7.14 BibTex 0.5.0 Automatic Backlinks to note 3.0.3

nunesgh commented 2 years ago

Same issue here.

Joplin 2.8.8 BibTex 0.5.0 Automatic Backlinks to note 3.0.3

sepremento commented 1 year ago

To fix this problem you will need to change two lines in both plugins: https://github.com/ambrt/joplin-plugin-referencing-notes/blob/master/src/notesReferences.js#L23 https://github.com/joplin/plugin-bibtex/blob/main/src/ui/bibliography-renderer/render-list-content-script.ts#L73

and instead of <style onload="..."/> make a properly closed HTML tag <style onload="..."></style>.

The problem seems to stem from <style> tag not being closed and then it is somehow rendered as <style onload="..."></div></style> and when another plugin tries to render its content it is rendered inside the first <style> tag and so is not visible.

I will try to refactor @ambrt plugin and push some changes in my spare time, but he has not been around for a while. And maybe @xUser5000 will notice this post here.

funkeyfreak commented 1 year ago

I've replicated @sepremento's fix and created the PRs in their respective repositories:

Let me know if I've missed anything @sepremento