Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_14980201
ueditor
提交
59554ecb
U
ueditor
项目概览
qq_14980201
/
ueditor
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
ueditor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
59554ecb
编写于
12月 13, 2012
作者:
C
campaign
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改了me的问题
上级
2e589106
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
55 addition
and
107 deletion
+55
-107
_src/plugins/autotypeset.js
_src/plugins/autotypeset.js
+2
-3
_src/plugins/background.js
_src/plugins/background.js
+25
-32
_src/plugins/basestyle.js
_src/plugins/basestyle.js
+23
-64
_src/plugins/blockquote.js
_src/plugins/blockquote.js
+0
-3
_src/plugins/catchremoteimage.js
_src/plugins/catchremoteimage.js
+5
-5
未找到文件。
_src/plugins/autotypeset.js
浏览文件 @
59554ecb
...
...
@@ -73,8 +73,7 @@ UE.plugins['autotypeset'] = function(){
}
}
function
autotype
(
type
,
html
){
var
cont
;
var
me
=
this
,
cont
;
if
(
html
){
if
(
!
opt
.
pasteFilter
){
return
;
...
...
@@ -243,7 +242,7 @@ UE.plugins['autotypeset'] = function(){
if
(
opt
.
pasteFilter
){
me
.
addListener
(
'
beforepaste
'
,
autotype
);
}
autotype
();
autotype
.
call
(
me
)
}
};
...
...
_src/plugins/background.js
浏览文件 @
59554ecb
(
function
()
{
UE
.
plugins
[
'
background
'
]
=
function
(){
var
me
=
this
;
UE
.
commands
[
'
background
'
]
=
{
queryCommandState
:
function
(){
return
this
.
highlight
?
-
1
:
0
;
}
UE
.
plugins
[
'
background
'
]
=
function
(){
var
me
=
this
;
me
.
addListener
(
"
getAllHtml
"
,
function
(
type
,
headHtml
){
var
body
=
this
.
body
,
su
=
domUtils
.
getComputedStyle
(
body
,
"
background-image
"
),
url
=
""
;
if
(
su
.
indexOf
(
me
.
options
.
imagePath
)
>
0
){
url
=
su
.
substring
(
su
.
indexOf
(
me
.
options
.
imagePath
),
su
.
length
-
1
).
replace
(
/"|
\(
|
\)
/ig
,
""
);
}
else
{
url
=
su
!=
"
none
"
?
su
.
replace
(
/url
\(
"
?
|"
?\)
/ig
,
""
):
""
;
}
headHtml
.
html
+=
'
<style type="text/css">body{
'
;
var
bgObj
=
{
"
background-color
"
:
domUtils
.
getComputedStyle
(
body
,
"
background-color
"
)
||
"
#ffffff
"
,
'
background-image
'
:
url
?
'
url(
'
+
url
+
'
)
'
:
''
,
'
background-repeat
'
:
domUtils
.
getComputedStyle
(
body
,
"
background-repeat
"
)
||
""
,
'
background-position
'
:
browser
.
ie
?(
domUtils
.
getComputedStyle
(
body
,
"
background-position-x
"
)
+
"
"
+
domUtils
.
getComputedStyle
(
body
,
"
background-position-y
"
)):
domUtils
.
getComputedStyle
(
body
,
"
background-position
"
),
'
height
'
:
domUtils
.
getComputedStyle
(
body
,
"
height
"
)
};
me
.
addListener
(
"
getAllHtml
"
,
function
(
type
,
headHtml
){
var
body
=
this
.
body
,
su
=
domUtils
.
getComputedStyle
(
body
,
"
background-image
"
),
url
=
""
;
if
(
su
.
indexOf
(
me
.
options
.
imagePath
)
>
0
){
url
=
su
.
substring
(
su
.
indexOf
(
me
.
options
.
imagePath
),
su
.
length
-
1
).
replace
(
/"|
\(
|
\)
/ig
,
""
);
}
else
{
url
=
su
!=
"
none
"
?
su
.
replace
(
/url
\(
"
?
|"
?\)
/ig
,
""
):
""
;
}
headHtml
.
html
+=
'
<style type="text/css">body{
'
;
var
bgObj
=
{
"
background-color
"
:
domUtils
.
getComputedStyle
(
body
,
"
background-color
"
)
||
"
#ffffff
"
,
'
background-image
'
:
url
?
'
url(
'
+
url
+
'
)
'
:
''
,
'
background-repeat
'
:
domUtils
.
getComputedStyle
(
body
,
"
background-repeat
"
)
||
""
,
'
background-position
'
:
browser
.
ie
?(
domUtils
.
getComputedStyle
(
body
,
"
background-position-x
"
)
+
"
"
+
domUtils
.
getComputedStyle
(
body
,
"
background-position-y
"
)):
domUtils
.
getComputedStyle
(
body
,
"
background-position
"
),
'
height
'
:
domUtils
.
getComputedStyle
(
body
,
"
height
"
)
};
for
(
var
name
in
bgObj
)
{
if
(
bgObj
.
hasOwnProperty
(
name
)
)
{
headHtml
.
html
+=
name
+
"
:
"
+
bgObj
[
name
]
+
"
;
"
;
}
for
(
var
name
in
bgObj
)
{
if
(
bgObj
.
hasOwnProperty
(
name
)
)
{
headHtml
.
html
+=
name
+
"
:
"
+
bgObj
[
name
]
+
"
;
"
;
}
headHtml
.
html
+=
'
}</style>
'
;
});
}
})();
\ No newline at end of file
}
headHtml
.
html
+=
'
}</style>
'
;
});
}
\ No newline at end of file
_src/plugins/basestyle.js
浏览文件 @
59554ecb
...
...
@@ -23,81 +23,40 @@ UE.plugins['basestyle'] = function(){
(
function
(
cmd
,
tagNames
)
{
me
.
commands
[
cmd
]
=
{
execCommand
:
function
(
cmdName
)
{
var
range
=
new
dom
.
Range
(
me
.
document
),
obj
=
''
;
//table的处理
if
(
me
.
currentSelectedArr
&&
me
.
currentSelectedArr
.
length
>
0
){
for
(
var
i
=
0
,
ci
;
ci
=
me
.
currentSelectedArr
[
i
++
];){
if
(
ci
.
style
.
display
!=
'
none
'
){
range
.
selectNodeContents
(
ci
).
select
();
//trace:943
!
obj
&&
(
obj
=
getObj
(
this
,
tagNames
));
if
(
cmdName
==
'
superscript
'
||
cmdName
==
'
subscript
'
){
if
(
!
obj
||
obj
.
tagName
.
toLowerCase
()
!=
cmdName
){
range
.
removeInlineStyle
([
'
sub
'
,
'
sup
'
]);
}
}
obj
?
range
.
removeInlineStyle
(
tagNames
)
:
range
.
applyInlineStyle
(
tagNames
[
0
]
);
}
}
range
.
selectNodeContents
(
me
.
currentSelectedArr
[
0
]).
select
();
}
else
{
range
=
me
.
selection
.
getRange
();
obj
=
getObj
(
this
,
tagNames
);
if
(
range
.
collapsed
)
{
if
(
obj
)
{
var
tmpText
=
me
.
document
.
createTextNode
(
''
);
range
.
insertNode
(
tmpText
).
removeInlineStyle
(
tagNames
);
range
.
setStartBefore
(
tmpText
);
domUtils
.
remove
(
tmpText
);
}
else
{
var
tmpNode
=
range
.
document
.
createElement
(
tagNames
[
0
]
);
if
(
cmdName
==
'
superscript
'
||
cmdName
==
'
subscript
'
){
tmpText
=
me
.
document
.
createTextNode
(
''
);
range
.
insertNode
(
tmpText
)
.
removeInlineStyle
([
'
sub
'
,
'
sup
'
])
.
setStartBefore
(
tmpText
)
.
collapse
(
true
);
}
range
.
insertNode
(
tmpNode
).
setStart
(
tmpNode
,
0
);
}
range
.
collapse
(
true
);
var
range
=
me
.
selection
.
getRange
(),
obj
=
getObj
(
this
,
tagNames
);
if
(
range
.
collapsed
)
{
if
(
obj
)
{
var
tmpText
=
me
.
document
.
createTextNode
(
''
);
range
.
insertNode
(
tmpText
).
removeInlineStyle
(
tagNames
);
range
.
setStartBefore
(
tmpText
);
domUtils
.
remove
(
tmpText
);
}
else
{
var
tmpNode
=
range
.
document
.
createElement
(
tagNames
[
0
]
);
if
(
cmdName
==
'
superscript
'
||
cmdName
==
'
subscript
'
){
if
(
!
obj
||
obj
.
tagName
.
toLowerCase
()
!=
cmdName
){
range
.
removeInlineStyle
([
'
sub
'
,
'
sup
'
]);
}
tmpText
=
me
.
document
.
createTextNode
(
''
);
range
.
insertNode
(
tmpText
)
.
removeInlineStyle
([
'
sub
'
,
'
sup
'
])
.
setStartBefore
(
tmpText
)
.
collapse
(
true
);
}
obj
?
range
.
removeInlineStyle
(
tagNames
)
:
range
.
applyInlineStyle
(
tagNames
[
0
]
);
range
.
insertNode
(
tmpNode
).
setStart
(
tmpNode
,
0
);
}
range
.
select
();
range
.
collapse
(
true
);
}
else
{
if
(
cmdName
==
'
superscript
'
||
cmdName
==
'
subscript
'
){
if
(
!
obj
||
obj
.
tagName
.
toLowerCase
()
!=
cmdName
){
range
.
removeInlineStyle
([
'
sub
'
,
'
sup
'
]);
}
}
obj
?
range
.
removeInlineStyle
(
tagNames
)
:
range
.
applyInlineStyle
(
tagNames
[
0
]
);
}
return
true
;
range
.
select
();
},
queryCommandState
:
function
()
{
if
(
this
.
highlight
){
return
-
1
;
}
return
getObj
(
this
,
tagNames
)
?
1
:
0
;
}
};
})(
style
,
basestyles
[
style
]
);
}
};
_src/plugins/blockquote.js
浏览文件 @
59554ecb
...
...
@@ -148,9 +148,6 @@ UE.plugins['blockquote'] = function(){
range
.
moveToBookmark
(
bookmark
).
select
();
},
queryCommandState
:
function
()
{
if
(
this
.
highlight
){
return
-
1
;
}
return
getObj
(
this
)
?
1
:
0
;
}
};
...
...
_src/plugins/catchremoteimage.js
浏览文件 @
59554ecb
...
...
@@ -10,11 +10,11 @@ UE.plugins['catchremoteimage'] = function () {
}
var
me
=
this
;
this
.
setOpt
({
localDomain
:[
"
127.0.0.1
"
,
"
localhost
"
,
"
img.baidu.com
"
],
separater
:
'
ue_separate_ue
'
,
catchFieldName
:
"
upfile
"
,
catchRemoteImageEnable
:
true
});
localDomain
:[
"
127.0.0.1
"
,
"
localhost
"
,
"
img.baidu.com
"
],
separater
:
'
ue_separate_ue
'
,
catchFieldName
:
"
upfile
"
,
catchRemoteImageEnable
:
true
});
var
ajax
=
UE
.
ajax
,
localDomain
=
me
.
options
.
localDomain
,
catcherUrl
=
me
.
options
.
catcherUrl
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录