jodit / jodit/jodit-react

Unable to set max width for imported image as Base64 URI.

Open
#129 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
406
Forks
131
Avg merge
2h 32m
Merged PRs (30d)
2

Description

Hey, guys!

I am looking for a way to set max width for imported images for example 500px.
imageDefaultWidth option is setting inline styles with the given value or the default one(300px) and even if I import 20x20 icon it results in 500x500. Is there a way to set boundaries to the imported image but keep the natural size if the imported image is inside those boundaries.

Thank you in advance folks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the imageDefaultWidth option is handled for imported Base64 images in the React wrapper and Jodit integration. Reproduce the behavior with a 20x20 image and a larger image, then verify that a maximum width such as 500px limits oversized images while smaller images retain their natural size.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.