I have encountered, what I considert to be a problem/bug, that affects versions 2 and 3 fo CKEditor. The "Link" pop-up dialog box will only allow for "Link to anchor in the text" links for exiting anchors within the current instance of the CKEditor.
If you know that named anchor links will be added or dynamically generated on other parts of a Web page that you are editing a section of, you should be able to specify local links of the form <a href="#somename"></a>. Currently, the only option is to utilize a pull-down menu to select an existing named link, or to specify a full URL. The problem with specifying full URLs is that they can not be specified ahead of time for dynamically generated pages with varying URLs.
One workaround is to specify a "URL" link with protocol "<other>", which will allow CKEditor to generate a usable <a href> link, but it then can not be edited. Additionally, a hand-coded <a href> link to a named anchor that CKEditor does not see in the current text also can not be edited.
The CKEditor "Link" pop-up dialog box should allow for the selection of a named achor from a drop-down *OR* manually specifying a named anchor via a text input box. The system should check for local links beginning with a "#" and insert the link into a text input box if it is not found in the current text and is not presented as an option in the named anchor pull-down menu.
On a separate note, I also noticed that version 3.3.1 of CKEditor is deleting highlighted text when adding a named anchor. Adding the named anchor to a single point, does not seem to be a problem, but adding the anchor to one or more words, appears to be deleting the highlighted words or text.
If you know that named anchor links will be added or dynamically generated on other parts of a Web page that you are editing a section of, you should be able to specify local links of the form <a href="#somename"></a>. Currently, the only option is to utilize a pull-down menu to select an existing named link, or to specify a full URL. The problem with specifying full URLs is that they can not be specified ahead of time for dynamically generated pages with varying URLs.
One workaround is to specify a "URL" link with protocol "<other>", which will allow CKEditor to generate a usable <a href> link, but it then can not be edited. Additionally, a hand-coded <a href> link to a named anchor that CKEditor does not see in the current text also can not be edited.
The CKEditor "Link" pop-up dialog box should allow for the selection of a named achor from a drop-down *OR* manually specifying a named anchor via a text input box. The system should check for local links beginning with a "#" and insert the link into a text input box if it is not found in the current text and is not presented as an option in the named anchor pull-down menu.
On a separate note, I also noticed that version 3.3.1 of CKEditor is deleting highlighted text when adding a named anchor. Adding the named anchor to a single point, does not seem to be a problem, but adding the anchor to one or more words, appears to be deleting the highlighted words or text.
Re: Anchor Link Limitations / Bugs
See here:
http://dev.ckeditor.com/ticket/5874
and subsequently here:
http://dev.ckeditor.com/ticket/3582
I suppose that is a bug. As for allowing non-existant anchor names...that's something you could probably mod pretty easily on your own by removing the current anchor field and replacing it with a text field. However, if you want to open a feature request about it, you could try.