Hi... When I want to make a link to an anchor, it tell me that there is no anchor avalible. But I have one.... But I tried the demo on the official site and there is the same problem... Is it my browser or something like that? because all the other 2.0 function are working perfectly.
Anybody can help me please?
Anybody can help me please?
RE: Lin to an anchor??
[ 1253255 ] Linkt to an anchor problem
cheers,
Stephan
RE: Link to an anchor??
RE: Lin to an anchor??
i've found a function called: FCKAnchorsProcessor.ProcessDocument
int this function, after adding the anchor-image, the anchor-element gets deleted - no idea why: oLink.parentNode.removeChild( oLink ) ;
I found the function in the following files:
/editor/js/fckeditorcode_ie_1.js on line 24
/editor/js/fckeditorcode_gecko_1.js on line 24
I removed the this line and the existing anchors will be found. But I don't know if this a good solution, because I don't know for what purpose the anchor-tag was deleted.
RE: Lin to an anchor??
function LoadAnchorNamesAndIds()
{
//get the fake images for achnors
var images = oEditor.FCK.EditorDocument.getElementsByTagName( 'IMG' ) ;
for ( var i = 0 ; i < images.length ; i++ )
{
var sName = images[i].getAttribute('_fckanchorname');
// If it is anchor.
if ( sName)
{
if ( sName.length > 0 )
{
bHasAnchors = true;
oEditor.FCKTools.AddSelectOption( document, GetE('cmbAnchorName'), sName, sName ) ;
}
}
}
ShowE( 'divSelAnchor' , bHasAnchors ) ;
ShowE( 'divNoAnchor' , !bHasAnchors ) ;
}
above code is to replace the orginal code resides in fck_link.js. Then add the following line code
oImg.setAttribute( '_fckanchorname', realElement.name , 0 ) ;
after oImg.setAttribute( '_fckrealelement', FCKTempBin.AddElement( realElement ), 0 ) ;
in fck_1.js. It works with IE, should work with gecko browser as well.
RE: Lin to an anchor??
Am I suppose to see the anchors list now?
RE: Lin to an anchor??
You should probably do the same addition
oImg.setAttribute( '_fckanchorname', realElement.name , 0 ) ;
in the procedure:
FCKDocumentProcessors_CreateFakeImage=function(fakeClass,realElement)
as you did in fck_1.js in the files:
fckeditorcode_ie_1.js and fckeditorcode_gecko_1.js at same place right after oImg.setAttribute('_fckrealelement',FCKTempBin.AddElement(realElement),0);
This helped for me!
RE: Lin to an anchor??
Other stranger problem :

I tried the patch for links to anchors problem and it works perfectly but i have an other problem with anchor :
If i create a document with an anchor and if i register this document 3 or 4 times in a row
it will generate 3 or 4 times the same anchor code
Somebody also have this strange problem ?
Thanks in avance
Julien