#1961 closed New Feature (fixed)
generate both Id and Name for anchors
Reported by: | Alfonso Martínez de Lizarrondo | Owned by: | Alfonso Martínez de Lizarrondo |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.6.5 |
Component: | General | Version: | 3.0 |
Keywords: | HasPatch | Cc: |
Description
Currently the anchors do create just <a name=""> but, if also an id is automatically generated, then it can help to do dynamical effects on the page (for example clicking on a link and smoothly scroll to the anchor pointed by the link)
Some people even state that only IDs should be generated as names are just something from the past, but that's another battle.
Attachments (1)
Change History (12)
comment:1 Changed 17 years ago by
Keywords: | Confirmed added |
---|
comment:2 Changed 15 years ago by
comment:3 Changed 14 years ago by
I second this request.
Please note that HTML5 will only support "id" for an <a> element. Moreover, when scrolling to a fragment identifier HTML5 will first look for an element with a given "id" and only then try to find the <a> element with a matching "name" attribute.
Changed 12 years ago by
Attachment: | 1961.patch added |
---|
comment:6 Changed 12 years ago by
Component: | General → UI : Dialogs |
---|---|
Version: | → 3.6.5 (SVN - trunk) |
comment:7 Changed 12 years ago by
Component: | UI : Dialogs → General |
---|---|
Version: | 3.6.5 (SVN - trunk) → 3.0 |
@wiseloren field version is used to indicate when problem first occurred. Please don't change it.
comment:8 Changed 12 years ago by
Sorry about that good to know. I was thinking it would be the version the patch was made for.
comment:9 Changed 12 years ago by
Milestone: | → CKEditor 3.6.5 |
---|---|
Resolution: | → fixed |
Status: | confirmed → closed |
Fixed with [7618].
comment:10 Changed 12 years ago by
I'd like to report that having BOTH name and id breaks PHP's DOMDocument::loadHTML().
The answer here explains that: http://stackoverflow.com/questions/3614586/dom-error-id-someanchor-already-defined-in-entity-line
I've made my own link plugin that patch reverted, which works well.
comment:11 Changed 12 years ago by
But this is allowed in HTML. Even Link you have given says that HTML spec. allows it. There is o error in HTML and CKEditor but in PHP.
I was close to create a new ticket. But I think this it important. As soon as you have an HTML page with anchor identified by ids and not by "name", they don't appear.
I would like the anchor to be available and editable by "ids".