Adding id attribute to text or headings #174
Answered
by
i-just
thomascoppein
asked this question in
Q&A
-
DescriptionIs there a way to add an id to text or heading so it can be targeted by anchor link? |
Beta Was this translation helpful? Give feedback.
Answered by
i-just
Mar 15, 2024
Replies: 1 comment
-
Hi, thanks for reaching out! You could use the anchors plugin to add anchor links to selected heading levels. Adding custom IDs or other attributes directly in CKEditor is not currently supported: ckeditor/ckeditor5#7369, but someone has created a plugin that adds the ability to add an id attribute: https://github.com/rhysstubbs/ckeditor5-add-attribute-to-element. You could use that as a starting point to create your own or pull in this one yourself. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
thomascoppein
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for reaching out! You could use the anchors plugin to add anchor links to selected heading levels.
Adding custom IDs or other attributes directly in CKEditor is not currently supported: ckeditor/ckeditor5#7369, but someone has created a plugin that adds the ability to add an id attribute: https://github.com/rhysstubbs/ckeditor5-add-attribute-to-element. You could use that as a starting point to create your own or pull in this one yourself.