Adding id attribute to text or headings #174
-
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.
Replies: 2 comments
-
|
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.
-
|
This is now supported via the Bookmark button for anyone needing this |
Beta Was this translation helpful? Give feedback.
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.