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

Generated Heading ids create conflicts #700

Closed
sachinrekhi opened this issue May 25, 2016 · 3 comments
Closed

Generated Heading ids create conflicts #700

sachinrekhi opened this issue May 25, 2016 · 3 comments

Comments

@sachinrekhi
Copy link
Contributor

I noticed that an id tag is automatically generated on h1, h2, h3 tags by using the text of the actual heading. The issue I'm experiencing is that sometimes the generated ids are clashing with existing ids I've defined elsewhere on the page and in my CSS.

The ramifications of this is you now have multiple elements with the same id (which isn't good) as well as a styling conflict where the inappropriate style may be applied.

I assume you've added the ids for table of contents or other such outlining behavior?

Could we say add a prefix to the generated ids to reduce the chance of such conflicts? say "ql-" or "ql-header-"?

Platforms:
Chrome 50 on Mac 10.11

Version:
Quill 1.0 Beta 2

@jhchen
Copy link
Member

jhchen commented May 26, 2016

I think I might just remove this id generation feature. It was partially motivated to have Parchment/Blots do something more interesting but seems like not an innocuous feature.

@sachinrekhi
Copy link
Contributor Author

That works!

@jhchen jhchen closed this as completed in 961a0f5 May 30, 2016
@rickhanlonii
Copy link

@jhchen without this, is it possible to set the heading IDs if desired (for linking to headers)?

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