自分の質問に答える!うまくいけば、将来誰かがこれを見つけたら助けになるだろう。
私はここからの基本的なファイル使用:私が見つけ-と-置き換え自分の名前の「netnoi」、およびアイコン(16×16)を作るために、アイコンの行をコメント解除 http://www.iondev.lu/fckeditor/netnoi.txt
を。
そしてここからそれをインストールする方法の手順: http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Customization/Plug-ins
は、プラグインディレクトリが正しいことを確認してください - drupalの中でプラグインフォルダは、FCKは、デフォルトのインストールとは異なります。
編集:明らかにnetnoi.txtが欠落しています。ここに私が使ったものがあります:
/***
* Create blank command
*/
var FCKPixelCaps_command = function()
{
}
/***
* Add Execute prototype
*/
FCKPixelCaps_command.prototype.Execute = function()
{
// get whatever is selected in the FCKeditor window
var selection = FCK.EditorDocument.getSelection();
// if there is a selection, add tags around it
if(selection.length > 0)
{
FCK.InsertHtml('<span class="caps">' + selection + '</span>');
} else {
// for debugging reasons, I added this alert so I see if nothing is selected
alert('nothing selected');
}
}
/***
* Add GetState prototype
* - This is one of the lines I can't explain
*/
FCKPixelCaps_command.prototype.GetState = function()
{
return;
}
// register the command so it can be use by a button later
FCKCommands.RegisterCommand('PixelCaps_command' , new FCKPixelCaps_command()) ;
/***
* Create the toolbar button.
*/
// create a button with the label "Netnoi" that calls the netnoi_command
var oPixelCaps = new FCKToolbarButton('PixelCaps_command', 'Pixels & Pulp Caps') ;
oPixelCaps.IconPath = FCKConfig.PluginsPath + 'PixelCaps/caps.gif' ;
// register the item so it can added to a toolbar
FCKToolbarItems.RegisterItem('PixelCaps', oPixelCaps) ;
あなた自身で解決してうれしい! – Ascalonian