SalesSystemOnline/ckeditor_3.6/ckeditor/_source/plugins/panelbutton/plugin.js

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.plugins.add( 'panelbutton',
{
	requires : [ 'button' ],
	beforeInit : function( editor )
	{
		editor.ui.addHandler( CKEDITOR.UI_PANELBUTTON, CKEDITOR.ui.panelButton.handler );
	}
});

/**
 * Button UI element.
 * @constant
 * @example
 */
CKEDITOR.UI_PANELBUTTON = 'panelbutton';

(function()
{
	var clickFn = function( editor )
	{
		var _ = this._;

		if ( _.state == CKEDITOR.TRISTATE_DISABLED )
			return;

		this.createPanel( editor );

		if ( _.on )
		{
			_.panel.hide();
			return;
		}

		_.panel.showBlock( this._.id, this.document.getById( this._.id ), 4 );
	};


	CKEDITOR.ui.panelButton = CKEDITOR.tools.createClass(
	{
		base : CKEDITOR.ui.button,

		$ : function( definition )
		{
			// We don't want the panel definition in this object.
			var panelDefinition = definition.panel;
			delete definition.panel;

			this.base( definition );

			this.document = ( panelDefinition
								&& panelDefinition.parent
								&& panelDefinition.parent.getDocument() )
							|| CKEDITOR.document;

			panelDefinition.block =
后面还有 86 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。