wxxsd/UEditor/_src/plugins/list.js
(开头部分) 26KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
///import core
///commands 有序列表,无序列表
///commandsName InsertOrderedList,InsertUnorderedList
///commandsTitle 有序列表,无序列表
/**
* 有序列表
* @function
* @name baidu.editor.execCommand
* @param {String} cmdName insertorderlist插入有序列表
* @param {String} style 值为:decimal,lower-alpha,lower-roman,upper-alpha,upper-roman
* @author zhanyi
*/
/**
* 无序链接
* @function
* @name baidu.editor.execCommand
* @param {String} cmdName insertunorderlist插入无序列表
* * @param {String} style 值为:circle,disc,square
* @author zhanyi
*/
UE.plugins['list'] = function(){
var me = this,
notExchange = {
'TD':1,
'PRE':1,
'BLOCKQUOTE':1
};
me.setOpt({
'insertorderedlist':[
['1,2,3...','decimal'],
['a,b,c...','lower-alpha'],
['i,ii,iii...','lower-roman'],
['A,B,C','upper-alpha'],
['I,II,III...','upper-roman']
],
'insertunorderedlist':[
['○ 小圆圈','circle'],
['● 小圆点','disc'],
['■ 小方块','square']
]
});
function adjustList(list,tag,style){
var nextList = list.nextSibling;
if(nextList && nextList.nodeType == 1 && nextList.tagName.toLowerCase() == tag && (domUtils.getStyle(nextList,'list-style-type')||(tag == 'ol'?'decimal' : 'disc')) == style){
domUtils.moveChild(nextList,list);
if(nextList.childNodes.length == 0){
domUtils.remove(nextList);
}
}
var preList = list.previousSibling;
if(preList && preList.nodeType == 1 && preList.tagName.toLowerCase() == tag && (domUtils.getStyle(preList,'list-style-type')||(tag == 'ol'?'decimal' : 'disc')) == style){
domUtils.moveChild(list,preList)
}
if(list.childNodes.length == 0){
domUtils.remove(list);
}
}
后面还有 511 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
