Web/WorkFlow/Design/rte/rte.js
(开头部分) 17KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Internal (private) properties.
// RichEditor is the global RichEditor object (function) of which there is only
// 1 instance.
RichEditor.txtView = true; // WYSIWYG mode. false == View Source
// initEditor(): Initialise the editor (called on window load, see below)
function initEditor()
{
// Apply style data if supplied
if (!public_description.styleData) {
public_description.put_styleData(null);
}
// Apply default editor options
var strDefaults = 'dragdrop=no;source=yes';
strDefaults += ';history=' + (document.queryCommandSupported('Undo') ? 'yes' : 'no');
applyOptions(strDefaults);
// Prepare the editable region
loading.style.display = 'none';
doc.contentEditable = "true";
editor.style.visibility = 'visible';
if(parent.document.all("IMG_ATTACHMENT_ID"))
document.all("IMG_ATTACHMENT_ID").value=parent.document.all("IMG_ATTACHMENT_ID").value;
if(parent.document.all("IMG_ATTACHMENT_NAME"))
document.all("IMG_ATTACHMENT_NAME").value=parent.document.all("IMG_ATTACHMENT_NAME").value;
// OZ - 12-06-2002
// Put focus into the document (required when no HTML is supplied via docHtml property)
doc.focus();
}
// checkRange(): make sure our pretend document (the content editable
// DIV with id of "doc") has focus and that a text range exists (which
// is what execCommand() operates on).
function checkRange()
{
RichEditor.selectedImage = null;
if (!RichEditor.txtView) return; // Disabled in View Source mode
doc.focus();
if (document.selection.type == "None") {
document.selection.createRange();
}
var r = document.selection.createRange();
DBG(1, 'RANGE Bounding('
+ 'top='+r.boundingHeight
+ ', left='+r.boundingHeight
+ ', width='+r.boundingWidth
+ ', height='+r.boundingHeight + ')'
+ ', Offset('
+ 'top='+r.offsetTop
+ ', left='+r.offsetLeft + ')'
+ ', Text=(' + r.text + ')'
+ ', HTML=(' + r.htmlText + ')'
);
}
// post(): Called in response to clicking the post button in the
// toolbar. It fires an event in the container named post, passing the
// HTML of our newly edited document as the data argument.
后面还有 476 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
