2

I am using lightning-input-rich-text component to compose emails within Salesforce. I am able to insert/ copy-paste an image but couldnt resize it. As per lightning-input-rich-text documentation, it is not possible to resize the image but wondering if anyone tried a work around for it ?

I could hack around the img tag within the input body but I couldnt achieve the on-screen resize border something like : enter image description here

instead adding the image shows like this without the border :

enter image description here

Any hack around adding the resizable border will be really appreciated. thanks.

1 Answer 1

0

As per salesforce doc, Resizing of images is not supported. Copy and pasting of images is not supported, although it might work on some combinations of browsers and operating systems.

You are left with few options:-

  1. change the value received from onchange handler and add the size attribute in client side or server side
  2. Using some third party editor which allows the resizing of the image in the editor
7
  • maybe I could use quillJs which Salesforce uses lol.. I was thinking in the same lines too. I can change the size in client side , but doing that in a nicer UX way seem impossible as I couldnt get the borders Commented Aug 24, 2022 at 8:47
  • 1
    @RahulBoinepally yes you can go for quillJs. Commented Aug 24, 2022 at 10:39
  • @RahulBoinepally did you managed to do it with Quill Js?
    – prem22
    Commented Sep 20, 2023 at 6:08
  • sorry for the delay, I have used ckeditor as an Iframe in a vfpage, embedded in an LWC comp as I couldnt get images resized using quill Commented Nov 21, 2023 at 10:37
  • 1
    @RahulBoinepally can you share your implementation with CKEDITOR? Did you use that to edit image then push that content to the RichText field in SF?
    – dschueler
    Commented Feb 18 at 15:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .