Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded editor in preview mode via NcReferenceWidget doesn't support attachments #6267

Closed
mejo- opened this issue Aug 27, 2024 · 2 comments · Fixed by #6268
Closed

Embedded editor in preview mode via NcReferenceWidget doesn't support attachments #6267

mejo- opened this issue Aug 27, 2024 · 2 comments · Fixed by #6268
Assignees
Labels

Comments

@mejo-
Copy link
Member

mejo- commented Aug 27, 2024

Describe the bug
The embedded editor in preview mode via NcReferenceWidget doesn't know about a fileId and therefore has not AttachmentsResolver. That results in attachments/images not being loaded.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Text document with an image
  2. Add the internal link to this document to another Text document or a Talk conversation
  3. If added to anoter Text document, turn the link into a preview
  4. See error "Attachment source was not resolved"

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

grafik

Server details:

  • Nextcloud version: 30.0.0rc2
@mejo- mejo- added bug Something isn't working 1. to develop feature: embed labels Aug 27, 2024
@juliusknorr
Copy link
Member

We should have the file id available as the file reference widget passes it to our viewer component
https:/nextcloud/server/blob/5b7dcc1427e996a3154761877d1e11463ed4bef4/apps/files/src/views/ReferenceFileWidget.vue#L149

So it might be just a matter of passing that along to the read only view in

<Component :is="readerComponent" :content="content" />

@mejo-
Copy link
Member Author

mejo- commented Aug 27, 2024

Nice. We have to migrate from RichTextReader to MarkdownContentEditor in the ViewerComponent, but a quick text revealed it works. I'll open a PR.

@mejo- mejo- self-assigned this Aug 27, 2024
mejo- added a commit that referenced this issue Aug 27, 2024
Also pass the `fileId` to the component. This adds support for
displaying images and attachments in the read-only view.

Fixes: #6267

Signed-off-by: Jonas <[email protected]>
mejo- added a commit that referenced this issue Aug 27, 2024
Also pass the `fileId` to the component. This adds support for
displaying images and attachments in the read-only view.

Fixes: #6267

Signed-off-by: Jonas <[email protected]>
mejo- added a commit that referenced this issue Aug 27, 2024
Also pass the `fileId` to the component. This adds support for
displaying images and attachments in the read-only view.

Fixes: #6267

Signed-off-by: Jonas <[email protected]>
backportbot bot pushed a commit that referenced this issue Aug 27, 2024
Also pass the `fileId` to the component. This adds support for
displaying images and attachments in the read-only view.

Fixes: #6267

Signed-off-by: Jonas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants