Closed (fixed)
Project:
FCKeditor - WYSIWYG HTML editor
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Mar 2011 at 00:00 UTC
Updated:
4 Aug 2011 at 07:12 UTC
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
Comment #1
furamag commentedI found the answer to my first question. To close dialog window I need to call
dialog.Cancel();instead of
Cancel();.Comment #2
koko saha commentedComment #3
koko saha commentedYou can refer http://docs.cksource.com/CKEditor_3.x/Tutorials/Abbr_Plugin_Part_1 for further assistance.