⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clientside-spellcheck.js

📁 Hippo CMS是一个以信息为中心的开源内容管理系统。Hippo CMS目标是供中,大型企业来管理其发布在互连网
💻 JS
字号:
// IE Spell Implementation for XINHA
//Client-side spell check plugin
//This implements the API for ieSpell, which is owned by Red Egg Software 
//For more info about ieSpell, go to http://www.iespell.com/index.htm
// Distributed under the same terms as HTMLArea itself.
// This notice MUST stay intact for use (see license.txt).


function ClientsideSpellcheck(editor) {
  this.editor = editor;

  var cfg = editor.config;
  var bl = ClientsideSpellcheck.btnList;
  var self = this;

  // see if we can find the mode switch button, insert this before that
  var id = "clientsidespellcheck";
  
  
  cfg.registerButton(id, this._lc("Spell Check using ieSpell"), editor.imgURL("clientside-spellcheck.gif", "ClientsideSpellcheck"), false,
             function(editor, id) {
               // dispatch button press event
               self.buttonPress(editor, id);
             });

  if(HTMLArea.is_ie) {
    cfg.addToolbarElement("clientsidespellcheck", "print", 1);
}

}

ClientsideSpellcheck._pluginInfo = {
  name          : "ClientsideSpellcheck",
  version       : "1.0",
  developer     : "Michael Harris",
  developer_url : "http://www.jonesinternational.edu",
  c_owner       : "Red Egg Software",
  sponsor       : "Jones International University",
  sponsor_url   : "http://www.jonesinternational.edu",
  license       : "htmlArea"
};


ClientsideSpellcheck.prototype._lc = function(string) {
  return HTMLArea._lc(string, 'ClientsideSpellcheck');
};

ClientsideSpellcheck.prototype.buttonPress = function(editor) {

	try {
		var tmpis = new ActiveXObject("ieSpell.ieSpellExtension");
		tmpis.CheckAllLinkedDocuments(document);
	}
	catch(exception) {
 		if(exception.number==-2146827859) {
			if (confirm(this.lc("ieSpell not detected.  Click Ok to go to download page.")))
				window.open("http://www.iespell.com/download.php","DownLoad");
		} else {
			alert(this.lc("ieSpell can only be used in Internet Explorer"));
		}
	}
};

⌨️ 快捷键说明

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