Coder Social home page Coder Social logo

Comments (8)

keunrim avatar keunrim commented on June 27, 2024 1

Hi @benwinding

I think I have found the cause of the problem.
The cause of the problem was the "preserveWhiteSpace" props in the react-Quill editor.

I couldn't find the problem in your demo, so I compared your source code with mine.
The difference was the "preserveWhiteSpace" props, and when I deleted it, it worked fine.

When I exited HTML mode with preserveWhitespace enabled, all whitespace was reset and the <p> tag was generated.
I think it's a white space issue when saving in HTML mode.

from quill-html-edit-button.

benwinding avatar benwinding commented on June 27, 2024

Hi @leevane
What exactly do you mean by "switching buttons"?
Can you please record a screen capture of the issue? 🙏

from quill-html-edit-button.

leevane avatar leevane commented on June 27, 2024
2023-12-17.20-59-05.mp4

introduce:Entering a few paragraphs of text in the editor and repeatedly clicking the "Show HTML source" button will result in multiple duplicate empty p tags

from quill-html-edit-button.

benwinding avatar benwinding commented on June 27, 2024

Thank you @leevane 🙏

I can't seem to reproduce this using the latest version [email protected]

Kapture.2023-12-18.at.09.40.07.mp4

Can you also please give me the:

  • quill-html-edit-button version
  • The options you are passing it
  • How you're using it:
    • Via <script/> tag?
    • Via vue/angular?
    • Via JS import?
  • Other plugins that you're using (they might be conflicting)

This information will make it easier to determine the issue 🙏

from quill-html-edit-button.

keunrim avatar keunrim commented on June 27, 2024

I have a same problem.
When I enter and exit html mode, the <p><br></p> tag is generated.

In my case, there is no problem if there is no empty <p> </p> tag in the content.
but, if there is a empty <p> </p>(not first one), it seems to be generating a <p><br></p> tag.

record.mp4

Info :

  • vite, react 18
  • react-quill : 2.0.0
  • quill-html-edit-button version : 2.2.13 (import)

Other plugins

  • @looop/quill-image-resize-module-react : 3.1.5

from quill-html-edit-button.

keunrim avatar keunrim commented on June 27, 2024

Sorry. I was wrong.
I tested it again and it doesn't seem to be an empty tag issue.
The problem occurs when I type enter on the first line, change to the next line, and then enter and exit HTML mode.
I didn't use @loop/quill-image-resize-module-react:3.1.5 this time.

record2.mp4

from quill-html-edit-button.

benwinding avatar benwinding commented on June 27, 2024

Hi @keunrim

I've just added the demo for react-quill here -> https://benwinding.github.io/quill-html-edit-button/react/

Can you reproduce the issue in this demo? ^

Source code is in this repository here -> https://github.com/benwinding/quill-html-edit-button/tree/50425cb9d4c68b0fa62b5037bc02dbccd078aa62/demos/react

from quill-html-edit-button.

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.