mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-09-22 17:03:30 +00:00
22 lines
674 B
JavaScript
22 lines
674 B
JavaScript
|
define("editor", ["simditor"], function(Simditor){
|
||
|
function editor(selector){
|
||
|
return new Simditor({
|
||
|
textarea: $(selector),
|
||
|
toolbar: [
|
||
|
"bold", "color", "ol", "ul", "code", "link", "image"
|
||
|
],
|
||
|
toolbarFloat: false,
|
||
|
defaultImage: null,
|
||
|
upload: {
|
||
|
url: "",
|
||
|
params: null,
|
||
|
fileKey: "image",
|
||
|
connectionCount: 3,
|
||
|
leaveConfirm: "正在上传文件,如果离开上传会自动取消"
|
||
|
},
|
||
|
pasteImage: true,
|
||
|
imageButton: ["upload"]
|
||
|
});
|
||
|
}
|
||
|
return editor;
|
||
|
});
|