Anchor Properties
var oEditor = window.parent.InnerDialogLoaded() ;
var FCK = oEditor.FCK ;
// Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ;
var oFakeImage = FCK.Selection.GetSelectedElement() ;
var oAnchor ;
if ( oFakeImage )
{
if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckanchor') )
oAnchor = FCK.GetRealElement( oFakeImage ) ;
else
oFakeImage = null ;
}
window.onload = function()
{
// First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document) ;
if ( oAnchor )
GetE('txtName').value = oAnchor.name ;
else
oAnchor = null ;
window.parent.SetOkButton( true ) ;
}
function Ok()
{
if ( GetE('txtName').value.length == 0 )
{
alert( oEditor.FCKLang.DlgAnchorErrorName ) ;
return false ;
}
oEditor.FCKUndo.SaveUndoStep() ;
oAnchor = FCK.EditorDocument.createElement( 'DIV' ) ;
oAnchor.innerHTML = '' ;
oAnchor = oAnchor.firstChild ;
oFakeImage = oEditor.FCKDocumentProcessors_CreateFakeImage( 'FCK__Anchor', oAnchor ) ;
oFakeImage.setAttribute( '_fckanchor', 'true', 0 ) ;
oFakeImage = FCK.InsertElementAndGetIt( oFakeImage ) ;
// oEditor.FCK.InsertHtml( '' ) ;
return true ;
}
Anchor Name
Wyszukiwarka
Podobne podstrony:
fck anchorfck anchorfck pastefck templatefck radiobuttonTabela kolorow ANCHORwięcej podobnych podstron