Skip to content

Conversation

@viru0909-dev
Copy link

Closes #10559

This PR adds support for dragging and dropping files (like images or PDFs) onto the 'Comments' tab in the entry editor. The feature automatically copies the dropped file to the library's main file directory and inserts a relative Markdown link at the cursor. This provides a much faster workflow for attaching and referencing files in comments.

Steps to test

  1. Open any library and ensure a "main file directory" is set (e.g., via Library > Library properties > General file directory).
  2. Select any entry and click on the "Comments" tab.
  3. Drag an image file from your computer's desktop onto one of the comment text boxes.
  4. Observe: A Markdown link (e.g., ![](image.png)) should immediately appear in the text box.
  5. Verify: Check your library's file directory. The image you just dropped should now be copied there.

Mandatory checks

@github-actions
Copy link
Contributor

Hey @viru0909-dev!

Thank you for contributing to JabRef! Your help is truly appreciated ❤️.

We have automatic checks in place, based on which you will soon get automated feedback if any of them are failing. We also use TragBot with custom rules that scans your changes and provides some preliminary comments, before a maintainer takes a look. TragBot is still learning, and may not always be accurate. In the "Files changed" tab, you can go through its comments and just click on "Resolve conversation" if you are sure that it is incorrect, or comment on the conversation if you are doubtful.

Please re-check our contribution guide in case of any other doubts related to our contribution workflow.

@jabref-machine
Copy link
Collaborator

You committed your code on the main brach of your fork. This is a bad practice. The right way is to branch out from main, work on your patch/feature in that new branch, and then get that branch merged via the pull request (see GitHub flow).

For this pull request, this is OK. For subsequent pull requests, please start with a different branch with a proper branch name. See CONTRIBUTING.md for more details.

@jabref-machine
Copy link
Collaborator

Your code currently does not meet JabRef's code guidelines. IntelliJ auto format covers some cases. There seem to be issues with your code style and autoformat configuration. Please reformat your code (Ctrl+Alt+L) and commit, then push.

In special cases, consider using // formatter:off and // formatter:on annotations to allow deviation from the code style.

@calixtus calixtus changed the title feat(entryeditor): Add drag-and-drop file linking to comments tab Add drag-and-drop file linking to comments tab in entry editor Oct 27, 2025
@koppor koppor closed this Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow file attachment into the comments editor (Markdown)

3 participants