Giter Site home page Giter Site logo

Comments (6)

KillerCodeMonkey avatar KillerCodeMonkey commented on June 15, 2024 1

if this answers your question, feel free to close the issue.

from ngx-quill.

KillerCodeMonkey avatar KillerCodeMonkey commented on June 15, 2024

But in the example it is working fine:
https://killercodemonkey.github.io/ngx-quill-example/

search for "Format - HTML"

so the editor returns correct data.
If the data is changed in your save process/db insert/update i can nothing do for you.

check if you have something that escapes html in your code.
And keep in mind quill only accepts allowed formats attributes and tags.

i do not even know how you mixed up p and div-tags.
In general it seems you try to display non quill html in a quill editor.

If i try to rebuild your example with my demo repo i get something like that:

  <p><img src="https://angular.io/assets/images/logos/angular/angular.svg"></p><p>Hello World</p>

from ngx-quill.

Medmly20208 avatar Medmly20208 commented on June 15, 2024

thanks for the explanation appreciate it

from ngx-quill.

kulitha avatar kulitha commented on June 15, 2024

But in the example it is working fine: https://killercodemonkey.github.io/ngx-quill-example/

search for "Format - HTML"

so the editor returns correct data. If the data is changed in your save process/db insert/update i can nothing do for you.

check if you have something that escapes html in your code. And keep in mind quill only accepts allowed formats attributes and tags.

i do not even know how you mixed up p and div-tags. In general it seems you try to display non quill html in a quill editor.

If i try to rebuild your example with my demo repo i get something like that:

  <p><img src="https://angular.io/assets/images/logos/angular/angular.svg"></p><p>Hello World</p>

@KillerCodeMonkey Apologies for commenting this on a closed issue, but this technically matches the title. Please feel free to remove the comment if it's irrelevant.

I'm trying the ngx-quill example given in the https://killercodemonkey.github.io/ngx-quill-example/ and it seems like the latest versions of ngx-quill ( > v25.0.0 ) removes the line break tag <br> inside the <p> tag when the user enters a new line?

On ngx-quill v25.0.0 and quill 2.0.0-rc.0, if I enter a new line I get the HTML as:
<p><br></p>
I tried this on ngx-quill v25.0.0 and the latest quill version (2.0.0-rc.5), and it's still the same. This is how it has worked on older versions of ngx-quill as well. And the characters like single quotations and double quotations are given as they are.
' "

However, on ngx-quill v25.1.3 (also checked on v25.2.0) and on the ngx-quill-example, the HTML is given as
</p><p>. Without the line break tag.
And the characters like single quotations and double quotations are given like this:
<p>&#39; &#39;</p>

Is this some configuration issue on my end? As I've written above, I tried with the quill 2.0.0-rc.0 and quill 2.0.0-rc.5, but only updating ngx-quill seem to trigger it.

from ngx-quill.

KillerCodeMonkey avatar KillerCodeMonkey commented on June 15, 2024

i guess it is because of this: #1813

the only way to retrieve the correct html from quill editor is using "getSemanticHTML" instead of just grabbing the innerhtml

from ngx-quill.

kulitha avatar kulitha commented on June 15, 2024

i guess it is because of this: #1813

the only way to retrieve the correct html from quill editor is using "getSemanticHTML" instead of just grabbing the innerhtml

Got it. Thank you very much for the reply!

from ngx-quill.

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.