The forum operates in read-only mode. Please head to StackOverflow for support.
var FCKPageSplit = function(name) { this.Name = name; } FCKCommands.RegisterCommand( 'PageSplit', new FCKPageSplit('PageSplit')) ;FCKPageSplit.prototype.Execute = function() { FCK.InsertHtml('<div class="pagesplit"> </div>');};FCKPageSplit.prototype.GetState = function() { if( FCKSelection.HasAncestorNode( 'TABLE' ) ) { return FCK_TRISTATE_DISABLED; } return FCK_TRISTATE_OFF;};var oPageSplitItem = new FCKToolbarButton( 'PageSplit', "Seitenteilung einfügen", null, null, null, false, true ) ; oPageSplitItem.IconPath = FCKPlugins.Items['pagesplit'].Path + 'split.gif' ; FCKToolbarItems.RegisterItem( 'PageSplit', oPageSplitItem ) ;
RE: Disable button, if cursor is inside table
something like
FCKPageSplit.prototype.GetState = function() {
if( FCKSelection.HasAncestorNode( 'TABLE' )){
return FCK_TRISTATE_DISABLED;
}
return FCK_TRISTATE_OFF;
}
might do the simple trick.
Hope that helps,
Andreas.
RE: Disable button, if cursor is inside table
great, thank you
Sven
Re: Disable button, if cursor is inside table
I updated to version 2.5.1. The plugin works, but FCKSelection.HasAncestorNode didn't.
Where can I fix this problem?