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

Tags eliminated #54

Closed
bobitza opened this issue Mar 4, 2022 · 6 comments
Closed

Tags eliminated #54

bobitza opened this issue Mar 4, 2022 · 6 comments

Comments

@bobitza
Copy link

bobitza commented Mar 4, 2022

i have this link and want to add the i tag, but output is without
<a href="#" class="stretched-link btn p-0 fw-semibold"><u>View Details</u> <i class="icon-line-arrow-right position-relative ms-1" style="top: 2px"></i></a>

@bobitza
Copy link
Author

bobitza commented Mar 4, 2022

The output:
<a href="#" rel="noopener noreferrer" target="_blank"> <u> View Details </u> </a>

@benwinding
Copy link
Owner

Is that an icon or something?
This <i></i> tag is treated as a italic when inserted into Quill and it has no innerText so it's removed.

@bobitza
Copy link
Author

bobitza commented Mar 4, 2022

tag is used like icon for font-awesome ex

@bobitza
Copy link
Author

bobitza commented Mar 4, 2022

  • style attribute and class removed from tags

@benwinding
Copy link
Owner

So Quill doesn't use HTML to represent the input, it uses a Delta representation which is a JSON format rendered as HTML.

This library effectively just passes the HTML to Quill, as shown in the source below:

const onSave = (html: string) => {
quill.clipboard.dangerouslyPasteHTML(html);
};

Some classes are supported by Quill internally eg: ql-bg-yellow (Demo here)
image

But custom classes are not recognised, and I'm not sure of how to allow them. (Demo here)
image

@bobitza
Copy link
Author

bobitza commented Mar 5, 2022

Ok thanks

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