Hello
How can i quickly add a new button to the toolbar, without extending the original (compressed) javascript files. It seems that currently we have to modify different files to add a command. A small sample is appreciated.
Thanks
Marco
How can i quickly add a new button to the toolbar, without extending the original (compressed) javascript files. It seems that currently we have to modify different files to add a command. A small sample is appreciated.
Thanks
Marco

RE: add a new button with own popup window
You could post an example of the code of js class with toString() method?
Thanks.
RE: add a new button with own popup window
http://sourceforge.net/tracker/index.php
RE: add a new button with own popup window
http://sourceforge.net/forum/message.php?msg_id=2754799
RE: add a new button with own popup window
I followed all the steps of this topic to create the function to insert flash, but I am having difficulties to create the dialogue box and .js file. I am not obtaining to insert <object>, <param>, <embed> tags and its parameters in the editor. Please help me!
Thanks.
RE: add a new button with own popup window
I've created a js class to make this run.. my class got object parameters and a toString() method that returns HTML code for the object tag... and insert it into the editor as html..
hernux
RE: add a new button with own popup window
RE: add a new button with own popup window
/**
* Add an additional Context Menu for the "Variable" plugin
* Overwrite the internal function that returns the Context Menu items
*/
FCKContextMenu.__GetGroup = FCKContextMenu._GetGroup;
FCKContextMenu._GetGroup = function( groupName )
{
var oGroup ;
switch ( groupName )
{
case 'Variable' :
oGroup = new FCKContextMenuGroup() ;
oGroup.Add( new FCKContextMenuItem( this, 'Variable', FCKLang.VariableProp, true ) );
/**
* Overwrite the internal function that tells the visibility of items
* in a Context Menu
*/
oGroup.__RefreshState = oGroup.RefreshState;
oGroup.RefreshState = function()
{
// Get the actual selected tag (if any).
var oTag = FCKSelection.GetSelectedElement() ;
var sTagName ;
if ( oTag )
sTagName = oTag.tagName ;
// Set items visibility.
this.SetVisible( sTagName == 'INPUT' && ( oTag.type == 'text' ) ) ;
/**
* Calls the original function
*/
this.__RefreshState();
}
break ;
default:
/**
* Calls the original function
*/
oGroup = this.__GetGroup(groupName);
}
return oGroup;
}