Hi,
I've tried to get my simple hello world plugin to work. I've read the source for the placeholder plugin (from the default instalation) and after some hassle (placeholder vs Placehodler), made it work. What I get is a toolbar item not found message.
1) The plugin, named law, is place in fckeditor/editor/plugins/law
2) I've created a fckplugin.js file in that directory (along with law.html, law.gif, lang subdirectory containing empty language files for english (en.js) and my default language (cs.js)), containing this code:
3) I have a custom configuration file that looks like
what happens is that first, the "..." alert from custom config file pops up, then two messages saying Law and law (I have both first letter small and capital there just in case) toolbar items were not found pop up, that's it... No "!" alert, that's why I guess it doesn't even get loaded, but I have no idea why.
I'd be sincerly grateful for any hints as I'm running out of ideas
PS: yes, the custom config file gets loaded, because I use the "Custom" toolbar and obviously, "..." gets displayed.
I've tried to get my simple hello world plugin to work. I've read the source for the placeholder plugin (from the default instalation) and after some hassle (placeholder vs Placehodler), made it work. What I get is a toolbar item not found message.
1) The plugin, named law, is place in fckeditor/editor/plugins/law
2) I've created a fckplugin.js file in that directory (along with law.html, law.gif, lang subdirectory containing empty language files for english (en.js) and my default language (cs.js)), containing this code:
alert("!"); FCKCommands.RegisterCommand( "law", new FCKDialogCommand( "law", "law", FCKPlugins.Items['law'].Path + 'law.html", 400, 200)); //<< law.html exists var Law = new FCKToolbarButton("law", "law"); Law.IconPath = FCKPlugins.Items["law"].Path = "law.gif"; //<< law.gif exists FCKToolbarItems.RegisterItem("law", Law);
3) I have a custom configuration file that looks like
FCKConfig.Plugins.Add("placeholder"); FCKConfig.Plugins.Add("law"); alert("..."); FCKConfig.ToolbarSets["Custom"] = [ ['Save', '-', 'Cut','Copy','Paste','PasteText','PasteWord', '-', 'FitWindow','ShowBlocks'], '/', ['FontFormat', '-', 'Bold','Italic','-','OrderedList','UnorderedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','Image','-', 'Placeholder', 'Law', 'law' ] ] ;
what happens is that first, the "..." alert from custom config file pops up, then two messages saying Law and law (I have both first letter small and capital there just in case) toolbar items were not found pop up, that's it... No "!" alert, that's why I guess it doesn't even get loaded, but I have no idea why.
I'd be sincerly grateful for any hints as I'm running out of ideas
PS: yes, the custom config file gets loaded, because I use the "Custom" toolbar and obviously, "..." gets displayed.
Re: can't get a hello world plugin to work
Re: can't get a hello world plugin to work