bitplatform icon indicating copy to clipboard operation
bitplatform copied to clipboard

BitRichTextEditor image resize

Open igeeksng opened this issue 1 year ago • 18 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

is there support for BitRichTextEditor to resize image within its editor.

Describe the solution you'd like

I don;t have any solution yet.

Additional context

No response

igeeksng avatar Sep 24 '25 17:09 igeeksng

Hello there! I'm a wiki 🤖.

Based on the content of this thread, I've found a potentially relevant wiki page for you!

✨ View Wiki Page

I hope this helps!

github-actions[bot] avatar Sep 24 '25 17:09 github-actions[bot]

Thanks for contacting us. We're investigating this issue. We'll let you know if it's possible to work on this issue.

msynk avatar Sep 25 '25 09:09 msynk

The BitRichTextEditor as mentioned on the demo page (https://blazorui.bitplatform.dev/components/richtexteditor) is using the Quill (https://quilljs.com/) library. unfortunately, since this library doesn't support such a feature, and the fact that we don't have enough resource to develop it ourselves, this request is not feasible for now.

msynk avatar Sep 25 '25 14:09 msynk

Note that Quill stores images as base64 which increases the size by 40% just like the rest of the editors out there, and if you use image in pre-rendering, it would cost double (one because of pre-rendering's img's src with base64 image value, and another time because of the same value being stored in pre-render state)

yasmoradi avatar Sep 25 '25 16:09 yasmoradi

Thank you so much. I really appreciate your response. I want thinking is it possible to use existing plugins others have generated so it doesn't have to be generated from scratch. i.e

https://github.com/whatcould/quill-image-resize-module?tab=readme-ov-file

igeeksng avatar Sep 25 '25 16:09 igeeksng

Here is a sample from the link I sent above:

Image

igeeksng avatar Sep 25 '25 16:09 igeeksng

For example, on line 52 of the TS for BitRichTextEditor, the resize module can be added.

Image

modules: { imageResize: { displaySize: true }

What do you think

igeeksng avatar Sep 25 '25 16:09 igeeksng

Could you please give me a live playground that uses QuillJS and those plugins to resize and drag & drop?

yasmoradi avatar Sep 25 '25 18:09 yasmoradi

Sure. Here is the playground: https://plnkr.co/edit/gq708AOrSBOWSlHcFslG?p=preview&preview

igeeksng avatar Sep 26 '25 02:09 igeeksng

Supporting the plugins (custom modules) of the Quill was not in our plan for this component. but I will take a look at its design and see if it's possible to handle it in short time.

msynk avatar Sep 26 '25 11:09 msynk

Thank you so much for trying to give it a try. I am more consign about the image resizing. The drag and drop are great feature but I think its something that can be addressed later.

igeeksng avatar Sep 26 '25 14:09 igeeksng

I've reviewed the design of the Quill custom modules and decided to support it in our component.

msynk avatar Sep 28 '25 11:09 msynk

The GitHub repository for the custom module you provided is a fork of another repository, which is itself a fork of yet another one. All three are built on outdated versions of Quill that are incompatible with our component. I’ve forked the main repository into our ignite organization and updated its source code and documentation here:

https://github.com/bitignite/quill-image-resize-module

This repository is based on the original project from which the other two were forked. I’ll review the changes in the other two forks later to identify any useful updates to incorporate into our fork.

msynk avatar Sep 28 '25 11:09 msynk

The issue is accepted and planned. Resolving it will start ASAP.

msynk avatar Sep 28 '25 12:09 msynk

Resolving this issue has started. It will be announced when this issue is resolved.

msynk avatar Sep 28 '25 13:09 msynk

Awesome work team. Thank you so much for giving it a shot. I am glad to hopefully see this feature in future release. Thank you once again

igeeksng avatar Sep 28 '25 18:09 igeeksng

This issue has been resolved, and it will be available in the next pre-release version. It will be announced when the pre-release becomes ready.

msynk avatar Sep 30 '25 07:09 msynk

The pre-release has been published. Please give it a try and provide feedback.

yasmoradi avatar Oct 12 '25 19:10 yasmoradi