Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block elements are not combined into one block #93

Open
catthecreator opened this issue Sep 17, 2024 · 2 comments
Open

Block elements are not combined into one block #93

catthecreator opened this issue Sep 17, 2024 · 2 comments

Comments

@catthecreator
Copy link

catthecreator commented Sep 17, 2024

Describe the bug
The block elements of code / quote must merge into one block

They have common styles, separating them into lines violates the markup

The delta code which generates the Problem

Example:

{ "ops": [ { "insert": "Just text\n" }, { "attributes": { "bold": true }, "insert": "Quo" }, { "insert": "te" }, { "attributes": { "blockquote": true }, "insert": "\n" }, { "insert": "Quote2" }, { "attributes": { "blockquote": true }, "insert": "\n" }, { "insert": "\nThis is" }, { "attributes": { "code-block": true }, "insert": "\n" }, { "insert": "Code" }, { "attributes": { "code-block": true }, "insert": "\n" }, { "insert": "sdfsdfds" }, { "attributes": { "blockquote": true }, "insert": "\n" } ] }

The expected html output the delta should produce

Example:

<p>Just text</p> 
<blockquote><strong>Quo</strong>te</blockquote> 
<blockquote>Quote2</blockquote> 
<p><br></p> 
<pre><code>This is</code></pre> 
<pre><code>Code</code></pre> 
<blockquote>sdfsdfds</blockquote>

Expected behavior
I expect the entire block of code to be in one tag:

<p>Just text</p> 
<blockquote><strong>Quo</strong>te<br>
Quote2</blockquote> 
<p><br></p> 
<pre><code>This is<br>
Code</code></pre> 
<blockquote>sdfsdfds</blockquote>
@nadar
Copy link
Owner

nadar commented Sep 23, 2024

Currently i can not take a deeper look into this, maybe you like to send a PR, maybe its also by the bad design of quill json.

@catthecreator
Copy link
Author

Hi!

quill json works well with this

If I understand correctly, this is very similar to the logic of working with ul/li tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants