Giter Club home page Giter Club logo

Comments (8)

nadar avatar nadar commented on September 13, 2024

Its seems like the empty

{
      "insert": "\n"
    },

Is not parsed / rendered. Like it would skip the content.

here is also the rendered html content:

original:

<h1>Hallo</h1>
<p><br></p>
<p>Das ist ein normaler Text:</p>
<p><br></p>
<p><strong>Test: Eintrag</strong></p>
<p><strong>Test: Zwei</strong></p>
<p><br></p>
<p>https://heartbeat.gmbh</p>
<p><br></p>
<p><br></p> 

rendered trough delta:

<h1>Hallo</h1><br />
<p>Das ist ein normaler Text:</p><br />
<p><strong>Test: Eintrag</strong><strong>Test: Zwei</strong></p><br />
<p>https://heartbeat.gmbh</p><br />
<p></p><br />

from php-quill-renderer.

deanblackborough avatar deanblackborough commented on September 13, 2024

@nadar Thank you for the bug report.

There appear to be two issues here, one, empty inserts should be rendered, two, your example is producing
tags outside block elements, that shouldn't happen. I'll look at both issues tomorrow and try to get a fix out as soon as possible, probably be done as two fixes, the first is quicker to test and fix.

I think by default, my library ignores empty inserts but really it should produce the requested HTML, I will switch the current behaviour to an option and default to rendering everything requested.

from php-quill-renderer.

nadar avatar nadar commented on September 13, 2024

If there is something i can help, let me know.

from php-quill-renderer.

deanblackborough avatar deanblackborough commented on September 13, 2024

@nadar This is should be fixed in v3.14.2, newline only inserts are no longer ignored. I added a test using your delta above, DBlackborough\Quill\Tests\Api\BugTest::testNewlineOnlyInsertsIgnored().

Testing using your delta I didn't get the second issue I mentioned, so, for now, I am going to assume this issue is closed.

Again, thank you for the bug report.

from php-quill-renderer.

nadar avatar nadar commented on September 13, 2024

This issue is fixed. Thanks. But now if have another issue when using multiple newlines like this:

{
      "insert": "\nTest:\n\n"
},

it generates <p>Test</p>
but should indeed also add an empty <p> or <br> element like the original editor html markup does. (ugly - but it looks like the user inputs the data):

So it should generate

<p>Test</p>
<p><br /></p>

or maybe at least <p>Test<br /></p>

from php-quill-renderer.

deanblackborough avatar deanblackborough commented on September 13, 2024

@nadar I'll have another look at this, cheers again.

from php-quill-renderer.

deanblackborough avatar deanblackborough commented on September 13, 2024

Closing for now, no follow-on issues have been raised relating to new lines. A newline issue was fixed in v3.14.3 which is after I reopened this ticket so until additional issues are found I'm going to assume this is working as I intended. :)

from php-quill-renderer.

nadar avatar nadar commented on September 13, 2024

I think the issue above still persist, but its maybe also how you are handling the html output, if you like to have the same output as quill html generates it would be wrong. I assume the summary i made here nadar/quill-delta-parser#3 (comment) is very clear about this.

Closing the issue is fine i guess :-)

from php-quill-renderer.

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.