kindeditor/examples/demo-18.html
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>KindEditor</title>
<style>
textarea {
display: block;
}
.ke-icon-remote_image {
background-image: url(./../skins/default/default.gif);
background-position: 0px -496px;
width: 16px;
height: 16px;
}
</style>
<script charset="utf-8" src="../kindeditor.js"></script>
<script>
KE.lang['remote_image'] = "插入远程图片";
KE.plugin['remote_image'] = {
click : function(id) {
KE.util.selection(id);
var dialog = new KE.dialog({
id : id,
cmd : 'remote_image',
file : '../examples/remote_image.html',
width : 310,
height : 90,
title : KE.lang['image'],
yesButton : KE.lang['yes'],
noButton : KE.lang['no']
});
dialog.show();
},
check : function(id) {
var dialogDoc = KE.util.getIframeDoc(KE.g[id].dialog);
var url = KE.$('url', dialogDoc).value;
var title = KE.$('imgTitle', dialogDoc).value;
var width = KE.$('imgWidth', dialogDoc).value;
var height = KE.$('imgHeight', dialogDoc).value;
var border = KE.$('imgBorder', dialogDoc).value;
if (url.match(/\.(jpg|jpeg|gif|bmp|png)$/i) == null) {
alert(KE.lang['invalidImg']);
window.focus();
KE.g[id].yesButton.focus();
return false;
}
if (width.match(/^\d+$/) == null) {
alert(KE.lang['invalidWidth']);
window.focus();
KE.g[id].yesButton.focus();
return false;
}
if (height.match(/^\d+$/) == null) {
alert(KE.lang['invalidHeight']);
window.focus();
KE.g[id].yesButton.focus();
return false;
}
if (border.match(/^\d+$/) == null) {
后面还有 43 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。