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

List Indent Level Issue #130

Open
kuimnet opened this issue Jun 3, 2024 · 0 comments
Open

List Indent Level Issue #130

kuimnet opened this issue Jun 3, 2024 · 0 comments

Comments

@kuimnet
Copy link

kuimnet commented Jun 3, 2024

I got an issue regarding to QuillDeltaToHtmlConverter and convert. I was try to add a customCssClasses as a converter option base on the indent. But it was failed to set.

For example I have the following input

[{ insert: 'hello\n\n1st' }, { attributes: { list: 'bullet' }, insert: '\n' }, { insert: '2nd' }, { attributes: { indent: 1, list: 'bullet' }, insert: '\n' }, { insert: '3rd' }, { attributes: { indent: 2, list: 'bullet' }, insert: '\n' }]

Then I go to source code, and make a log on the indent value. It will be always 0. So, it got failed to set.
Is it a bug here, right?

li.item.op.attributes.indent = 0

in
~ line 938 dist/browser/QuillDeltaToHtmlConverter.bundle.js
~ line 157 dist/commonjs/QuillDeltaToHtmlConverter.js
~ line 210 src/QuillDeltaToHtmlConverter.ts

Then I updated to the following code.
li.item.op.attributes.indent = li.item.op.attributes.indent ? li.item.op.attributes.indent : 0

Is the any hazard or risk to the system?

It works, so I can create the custom css classes base on the change.
Meanwhile, it also sets with default class on the list item as ql-indent-1, ql-indent-2, ql-indent-3, etc...

Is it a known issue?

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

1 participant