Comments (8)
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.
@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.
If there is something i can help, let me know.
from php-quill-renderer.
@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.
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.
@nadar I'll have another look at this, cheers again.
from php-quill-renderer.
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.
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)
- How to extend the Parser HOT 9
- Support for complex unknown attributes HOT 1
- Link always gets parsed on new line HOT 14
- wrong output for lists HOT 3
- Option to ignore newline only inserts HOT 1
- Refactoring HOT 1
- Better handle custom attributes HOT 1
- Lots of problems with links HOT 4
- Problem parsing HTML with non standard attribute HOT 2
- Video with attributes not supported HOT 1
- GitHub actions HOT 1
- Code review
- Problem rendering list with a single item HOT 4
- Uncaught Error: Class 'DBlackborough\Quill\Render' not found HOT 1
- Nested lists beta HOT 1
- Markdown renderer and lists HOT 1
- Code duplication HOT 2
- Compound deltas markdown
- Plain text parser HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-quill-renderer.