I'm trying to create custom plugin for FCKeditor which should add HTML tag to code and I have two problems:
1. I'm using dialog pop-up window to ask user how to align tag. I can open dialog window but I can't close it. Default "Cancel" button using Cancel() function to close dialog. But when I try to execute Cancel() function I'm getting error: "ReferenceError: Cancel is not defined". Can somebody explain me how to close FCKeditor dialog window?
2. I'm using following code to create button:

...
var insertTagButton = new FCKToolbarButton('insertTag', 'Insert Tag 1', 'Insert Tag 2');
insertTagButton.IconPath = FCKPlugins.Items['insertTag'].Path + 'images/img.gif';
FCKToolbarItems.RegisterItem('insertTag', insertTagButton);
...

I can see button in toolbar and per my understanding I should have "Insert Tag 2" after my custom button but in some reason it doesn't work. How can I fix this issue?

Comments

furamag’s picture

I found the answer to my first question. To close dialog window I need to call
dialog.Cancel();
instead of
Cancel();.

koko saha’s picture

Status: Active » Fixed
koko saha’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.