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

Nested lists are not rendered as nested #74

Closed
utdrmac opened this issue Oct 31, 2022 · 9 comments · Fixed by #75
Closed

Nested lists are not rendered as nested #74

utdrmac opened this issue Oct 31, 2022 · 9 comments · Fixed by #75
Assignees
Labels
enhancement New feature or request

Comments

@utdrmac
Copy link

utdrmac commented Oct 31, 2022

Describe the bug
Nested lists are not rendered as nested.

The delta code which generates the Problem

{"ops":[{"insert":"Level 1A"},{"attributes":{"list":"bullet"},"insert":"\n"},{"insert":"Level 2A"},{"attributes":{"indent":1,"list":"bullet"},"insert":"\n"},{"insert":"Level 2B"},{"attributes":{"indent":1,"list":"bullet"},"insert":"\n"},{"insert":"Level 1B"},{"attributes":{"list":"bullet"},"insert":"\n"}]}

The expected html output the delta should produce

<ul><li>Level 1A<ul><li>Level 2A</li><li>Level 2B</li></ul></li><li>Level 1B</li></ul>

Expected behavior
The expected behavior is to render nested lists

Screenshots
Editor: Screen Shot 2022-10-31 at 3 18 45 PM

Rendered with nadar: Screen Shot 2022-10-31 at 3 18 53 PM

Additional context
DBlackborough sent me to this QuillJS render library because I needed support for nested lists and his didn't support it. I thought he was implying this library did support them.

@nadar
Copy link
Owner

nadar commented Oct 31, 2022

Hi @utdrmac i was not aware this is even possible with quill. Thanks for posting 👍 I will make some tests

@nadar nadar mentioned this issue Oct 31, 2022
@nadar nadar added the enhancement New feature or request label Oct 31, 2022
@nadar nadar self-assigned this Oct 31, 2022
@nadar
Copy link
Owner

nadar commented Nov 1, 2022

@utdrmac can you please try the branch quickly in your project? Just replace in your composer.json

"nadar/quill-delta-parser": "^3.0"

with

"nadar/quill-delta-parser": "dev-issue-74 as 3.2.0"

and run composer update

@utdrmac
Copy link
Author

utdrmac commented Nov 1, 2022

Holy crap man! That was a fast turnaround! See my editor and the renderer below:

Screen Shot 2022-11-01 at 8 14 42 AM

Screen Shot 2022-11-01 at 8 14 47 AM

@nadar nadar closed this as completed in #75 Nov 1, 2022
@nadar
Copy link
Owner

nadar commented Nov 1, 2022

@deanblackborough
Copy link

@nadar has been on a roll with this package so I just assumed he already supported nested lists, guess he does now :) I might have to retire mine soon, just don’t seem to have the time.

@nadar
Copy link
Owner

nadar commented Nov 1, 2022

Hi @deanblackborough afaik the quill editor is dead anyhow and the quill delta format is also something i wish i would never have discovered, it just makes no sense at all 😄

@utdrmac
Copy link
Author

utdrmac commented Nov 1, 2022

@nadar Oh seriously?! quilljs is dead? Damn. I just discovered it last week and spent the weekend moving off TinyMCE. I'm sorry I bothered you with this request for something that isn't in development anymore. Any recommendations for an alternative?

@nadar
Copy link
Owner

nadar commented Nov 1, 2022

Well, choose quill over TinyMCE might be still a good migration 😄 👍 I would recommend: https://tiptap.dev/

I'm sorry I bothered you with this request for something that isn't in development anymore.

No problem, its good to have featured of nested lists. There are still a lot of people using quill, i would say the editor is not bad, runs stable, but afaik there will be no version 2.0, even they announced that back in 2017.

@nadar
Copy link
Owner

nadar commented Dec 5, 2023

If someone switch to tiptap, i have created a prosemirror/tiptap php converter :-)

https://github.com/nadar/prosemirror-json-parser

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

Successfully merging a pull request may close this issue.

3 participants