I have been using FCKeditor 2.5.x in an ASP.NET application for a year or so with a few plugins which I wrote to insert specially formatted internal links. The idea is that such a plugin allows the user to select from a list of options (which is dynamically populated from a database) and then closes the window. All this has worked fine.
The fckplugin.js code in each case is similar to the following:
FCKCommands.RegisterCommand( 'ArtistLink', new FCKDialogCommand( 'ArtistLink', FCKLang.ArtistLinkDlgTitle, FCKPlugins.Items['ArtistLink'].Path + 'fck_ArtistLink.aspx', 340, 270 ) ) ;
var oArtistLinkItem = new FCKToolbarButton( 'ArtistLink', FCKLang.ArtistLinkBtn ) ;
oArtistLinkItem.IconPath = FCKPlugins.Items['ArtistLink'].Path + 'ArtistLink.gif' ;
FCKToolbarItems.RegisterItem( 'ArtistLink', oArtistLinkItem ) ;
var FCKArtistLink = new Object() ;
FCKArtistLink.Add = function( artistid, caption )
{
FCK.InsertHtml("<a href='[ARTISTLINK]"+artistid+"'>"+caption+"</a>") ;
}
And the ASP.NET code injects client-side Javascript which ends as follows:
FCKArtistLink.Add( selectedID, cap ) ;
window.close();
return true ;
I have just upgraded to version 2.6.3. The plugins largely still work OK and among other things an annoying 'clipping' of characters in the textarea appears to have been resolved. However, the plugins no longer close after inserting a link. This seems odd as the code is quite explicit.
Any suggestions?
Jon
The fckplugin.js code in each case is similar to the following:
FCKCommands.RegisterCommand( 'ArtistLink', new FCKDialogCommand( 'ArtistLink', FCKLang.ArtistLinkDlgTitle, FCKPlugins.Items['ArtistLink'].Path + 'fck_ArtistLink.aspx', 340, 270 ) ) ;
var oArtistLinkItem = new FCKToolbarButton( 'ArtistLink', FCKLang.ArtistLinkBtn ) ;
oArtistLinkItem.IconPath = FCKPlugins.Items['ArtistLink'].Path + 'ArtistLink.gif' ;
FCKToolbarItems.RegisterItem( 'ArtistLink', oArtistLinkItem ) ;
var FCKArtistLink = new Object() ;
FCKArtistLink.Add = function( artistid, caption )
{
FCK.InsertHtml("<a href='[ARTISTLINK]"+artistid+"'>"+caption+"</a>") ;
}
And the ASP.NET code injects client-side Javascript which ends as follows:
FCKArtistLink.Add( selectedID, cap ) ;
window.close();
return true ;
I have just upgraded to version 2.6.3. The plugins largely still work OK and among other things an annoying 'clipping' of characters in the textarea appears to have been resolved. However, the plugins no longer close after inserting a link. This seems odd as the code is quite explicit.
Any suggestions?
Jon
Re: closing a plugin window
Jon
Re: closing a plugin window
Thank you.