sp-dev-fx-controls-react icon indicating copy to clipboard operation
sp-dev-fx-controls-react copied to clipboard

Rich Text Component - Insert image using Copy Paste

Open yamilnb opened this issue 1 year ago • 3 comments

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your needs please complete the below template to ensure we have the details to help. Thanks!

Please check out the documentation to see if your question is already addressed there. This will help us ensure our documentation is up to date.

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Please specify what version of the library you are using: 3.15.0

Expected / Desired Behavior / Question

In the Rich Text editing mode, the ability to insert images using the clipboard (copy and paste) is required.

Observed Behavior

Images inserted via the clipboard are not rendered correctly within the control and are not saved in the SharePoint field.

Steps to Reproduce

  1. Copy an image from the web or locally.
  2. Paste the image within the Rich Text control.
  3. Save the Rich Text content within the SharePoint field
  4. Open the edited or created item to view the image content.

image

image

yamilnb avatar Jan 04 '24 13:01 yamilnb

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Jan 04 '24 13:01 ghost

Thank you for submitting your first issue to this project.

github-actions[bot] avatar Jan 04 '24 13:01 github-actions[bot]

Hi @yamilnb,

Thank you for this feedback. There's a real concern regarding image pasting in a SharePoint field. As you may know, in the actual rich text native field on a SP list, you can't add insert image from local without first uploading it in the hosting site. And this can be done only from the "classic experience" of the rich text field.

That said, I did try to paste an image from the web in a SPFx Form Customizer sample which is using the RichText component and linked to a SP field, it worked.

Do you a code snippet that demonstrates how do you save the RichText content in SharePoint? I would like to repro the issue.

michaelmaillot avatar Apr 13 '24 14:04 michaelmaillot

@michaelmaillot,

Thanks for the feedback.

The issue appears when I try to copy and paste a local image and in fact, It aslo happen with native SharePoint field.

Regards.

yamilnb avatar Jul 08 '24 13:07 yamilnb