Opened 13 years ago
Last modified 12 years ago
#8982 confirmed New Feature
Anchor options in Link dialog uses only references to 'a' elements
Reported by: | Alfonso Martínez de Lizarrondo | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | HasPatch | Cc: |
Description
Reported here: http://cksource.com/forums/viewtopic.php?f=6&t=25473
The link dialog provides an option to link by Id, but it provides only the option to link to anchor elements, not other elements with an id attribute although those links will work in any browser.
The proposed patch provides a simple solution for modern browsers that support querySelectorAll. If someone is willing, it shouldn't be hard to write an "else" code path that does the scanning for the older browsers.
Attachments (1)
Change History (3)
Changed 13 years ago by
Attachment: | 8982.patch added |
---|
comment:1 Changed 13 years ago by
Keywords: | HasPatch added |
---|---|
Status: | new → confirmed |
Type: | Bug → New Feature |
Version: | → 3.0 |
- "querySelectorAll" is not supported in IE6 and IE7.
- I have found some articles on the net saying that it may be slow. Well slow comparing to get ElementsByTagName method but maybe it matters to some users:
http://www.nczonline.net/blog/2010/09/28/why-is-getelementsbytagname-faster-that-queryselectorall/
http://www.glazman.org/weblog/dotclear/index.php?post/2010/09/29/Why-is-getElementsByTagName-faster-that-querySelectorAll
Sure that we could implement it but I'm afraid that some users will start complaining that this does not work inIE6 and IE7.
I'm changing this to feature request.
comment:2 Changed 12 years ago by
Has this been fixed in CKEditor 4?
The "name" attribute for anchors (<a name="...") is now deprecated as of HTML5. If CKEditor does not allow me to link fragments to element ids, it prevents me from creating documents compliant with the latest specifications.
Proposed patch