///import core ///import uicore ///import ui/stateful.js (function (){ var utils = baidu.editor.utils, UIBase = baidu.editor.ui.UIBase, Stateful = baidu.editor.ui.Stateful, Button = baidu.editor.ui.Button = function (options){ if(options.name){ var btnName = options.name; var cssRules = options.cssRules; if(!options.className){ options.className = 'edui-for-' + btnName; } options.cssRules = '.edui-' + (options.theme || 'default') + ' .edui-toolbar .edui-button.edui-for-'+ btnName +' .edui-icon {'+ cssRules +'}' } this.initOptions(options); this.initButton(); }; Button.prototype = { uiName: 'button', label: '', title: '', showIcon: true, showText: true, cssRules:'', initButton: function (){ this.initUIBase(); this.Stateful_init(); if(this.cssRules){ utils.cssRule('edui-customize-'+this.name+'-style',this.cssRules); } }, getHtmlTpl: function (){ return '