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

CSS class differing in library generated HTML from quill's HTML #5

Open
vikingsvivek opened this issue Jul 18, 2019 · 1 comment
Open
Assignees

Comments

@vikingsvivek
Copy link

Hi,

I am facing an issue that in some cases there is a difference in CSS class mapped to elements in the generated HTML of go-render-quill library and quill. Thus the format is not preserved while rendering generated HTML.

Case 1: Text align

Quill Delta ::{"ops":[{"insert":"Hi Vivek\nThis is testing alignment."},{"attributes":{"align":"center"},"insert":"\n"}]}

Quill genrated HTML ::<p>Hi Vivek</p><p class="ql-align-center">This is testing alignment.</p>

Lib genrated HTML :: <p>Hi Vivek</p><p class="align-center">This is testing alignment.</p>

Case 2: Indentation

Quill Delta ::{"ops":[{"insert":"Hi Vivek\nThis is testing indentation."},{"attributes":{"indent":1},"insert":"\n"}]}

Quill HTML ::<p>Hi Vivek</p><p class="ql-indent-1">This is testing indentation.</p>

Lib genrated HTML :: <p>Hi Vivek</p><p class="indent-1">This is testing indentation.</p>

Please suggest how I can fix this?

@Neboer
Copy link

Neboer commented Feb 9, 2020

I'd like to put quill.js style sheet under the rendered HTML. But however, there is a big problem because quill.js use a css only affect block in a ql-editor object.

image

So when I just want use this style sheet, I must warp generated html with a div which has ql-editor class. This is ridiculous and I must rewrite a style sheet to avoid it.

What's more, there's also a bit difference in class name between the origional quill.js editor and the rendered html tag. Such as ql-align-center with align-center.

I hope there can be a general style sheet provided by this project, so I can use it instead of stupid quill css.

Thank you.

@dchenk dchenk self-assigned this Aug 11, 2020
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

3 participants