flymis/WebRoot/dojojs/src/widget/Editor2.js
(开头部分) 20KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
/* TODO:
* - font selector
* - test, bug fix, more features :)
*/
dojo.provide("dojo.widget.Editor2");
dojo.require("dojo.io.*");
dojo.require("dojo.html.*");
dojo.require("dojo.html.layout");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.RichText");
dojo.require("dojo.widget.Editor2Toolbar");
// Object: Manager of current focused Editor2 Instance and available editor2 commands
dojo.widget.Editor2Manager = {
_currentInstance: null,
_loadedCommands: {},
// Object: state a command may be in
commandState: {Disabled: 0, Latched: 1, Enabled: 2},
getCurrentInstance: function(){
// summary: Return the current focused Editor2 instance
return this._currentInstance;
},
setCurrentInstance: function(/*Widget*/inst){
// summary: Set current focused Editor2 instance
this._currentInstance = inst;
},
registerCommand: function(/*String*/name, /*Object*/cmd){
// summary: Register an Editor2 command
// name: name of the command (case insensitive)
// cmd: an object which implements interface dojo.widget.Editor2Command
name = name.toLowerCase();
if(this._loadedCommands[name]){
delete this._loadedCommands[name];
}
this._loadedCommands[name] = cmd;
},
getCommand: function(/*String*/name){
// summary: Return Editor2 command with the given name
// name: name of the command (case insensitive)
name = name.toLowerCase();
var oCommand = this._loadedCommands[name];
if(oCommand){
return oCommand;
}
switch(name){
case 'htmltoggle':
后面还有 606 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。