fckplugin.js

来自「JFCMS采用微软公司先进ASP.NET技术开发完成。专业版采用MS ACCES」· JavaScript 代码 · 共 24 行

JS
24
字号
var JFPageCommond = function() {this.Name = 'JFPage';}
JFPageCommond.prototype.Execute = function () {InsertHTML();}
JFPageCommond.prototype.GetState = function() {return FCK_TRISTATE_OFF;}
// Register the related command.
FCKCommands.RegisterCommand( 'JFPage',new JFPageCommond()) ;

// Create the "Plaholder" toolbar button.
var oJFPageItem = new FCKToolbarButton( 'JFPage', "插入分页标签[JF:Page]" ) ;
oJFPageItem.IconPath = FCKPlugins.Items['JFPage'].Path + 'JFPage.gif' ;
FCKToolbarItems.RegisterItem( 'JFPage', oJFPageItem ) ;


function InsertHTML()
{
	var oEditor = FCKeditorAPI.GetInstance('Content') ;

	if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG )
	{
		oEditor.InsertHtml( '[JF:Page]' ) ;
	}
	else
		alert( 'You must be on WYSIWYG mode!' ) ;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?