GithubHelp home page GithubHelp logo

Display: flex causes overflow about mui-rte HOT 3 CLOSED

niuware avatar niuware commented on July 29, 2024
Display: flex causes overflow

from mui-rte.

Comments (3)

niuware avatar niuware commented on July 29, 2024

I used your sample code but both the editor and the h1 tag are displayed inline as expected. Could you try installing the latest version and override the root class of the editor? Check out the theme example for more details on how to override the style. If you still have a rendering problem please feel free to reopen the issue.

from mui-rte.

jaskerv avatar jaskerv commented on July 29, 2024

Sorry, I gave a bad example.

The issue occurs when the parent div is this:
<div style={{ display: "flex", flexDirection: "row" }}>
and the text being typed has no spaces.
Example: SomeGiantText pasted 20 with no spaces.

Expected Behaviour
When typing the above text to new-line when the text reaches near the edge of the container.
image

Actual Behaviour
image
You can see it overflows with the horizontal scrollbar.

Codesandbox

from mui-rte.

niuware avatar niuware commented on July 29, 2024

I've just opened your CodeSandbox sample, pasted the text more than 20 times as well as input a random long string without spaces and in both cases the result behaviour is as expected. By default the width of the editor is same as its parent and the content is wrapped correctly.

from mui-rte.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.