[全量] 初始化项目代码、配置、文档及Agent协同harness
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" src="../internal.js?04dbe7f0"></script>
|
||||
<style type="text/css">
|
||||
.wrapper {
|
||||
box-sizing: border-box;
|
||||
width: 800px;
|
||||
height: 390px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
border-bottom: 1px solid #d7d7d7
|
||||
}
|
||||
|
||||
.editor-wrap {
|
||||
display: flex;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.editor-wrap #editor {
|
||||
width: 0;
|
||||
flex-grow: 1;
|
||||
border: 1px solid #CCC;
|
||||
border-radius: 3px;
|
||||
padding: 5px;
|
||||
height: 100px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.input-tip {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.input-tip a {
|
||||
color: #0f0d0d;
|
||||
}
|
||||
|
||||
.editor-preview {
|
||||
background: #FFF;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #EEE;
|
||||
display: none;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.editor-preview .title {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.editor-preview .body {
|
||||
padding: 5px 5px 15px 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.editor-preview .body .image {
|
||||
max-width: 100%;
|
||||
max-height: 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
|
||||
<div id="modeLive" style="display:none;">
|
||||
<iframe id="liveEditor"
|
||||
frameborder="0"
|
||||
style="width:800px;height:390px;border: 0;outline: none;"
|
||||
></iframe>
|
||||
</div>
|
||||
|
||||
<div id="modePlain" style="display:none;">
|
||||
<div class="editor-wrap">
|
||||
<textarea id="editor"></textarea>
|
||||
</div>
|
||||
<div class="input-tip">
|
||||
基于 latex 语法,<a href="javascript:;" id="inputDemo">点击输入示例</a>。
|
||||
</div>
|
||||
<div class="editor-preview" id="preview">
|
||||
<div class="title">预览</div>
|
||||
<div class="body">
|
||||
<img class="image" id="previewImage"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="../../third-party/jquery-1.10.2.js?25f4b625"></script>
|
||||
<script type="text/javascript" src="../../third-party/clipboard/clipboard.js?bae63983"></script>
|
||||
<script type="text/javascript" src="formula.js?3e957a67"></script>
|
||||
<script type="text/javascript">
|
||||
utils.domReady(function () {
|
||||
Formula.init();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! UEditorPlus v2.0.0*/
|
||||
function preg_quote(a,b){return(a+"").replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\"+(b||"")+"-]","g"),"\\$&")}function loadScript(a,b){var c;c=document.createElement("script"),c.src=a,c.onload=function(){b&&b({isNew:!0})},document.getElementsByTagName("head")[0].appendChild(c)}var Formula={mode:"plain",latexeasy:null,init:function(){Formula.initMode(),Formula.initEvent(),Formula.initSubmit()},renderPlain:function(){var a=$("#preview"),b=$("#editor").val();if(!b)return void a.hide();b=encodeURIComponent(b);var c=editor.getOpt("formulaConfig"),d=c.imageUrlTemplate.replace(/\{\}/,b);$("#previewImage").attr("src",d),a.show()},setValuePlain:function(a){$("#editor").val(a),Formula.renderPlain()},setValueLive:function(a){return Formula.latexeasy?void Formula.latexeasy.call("set.latex",{latex:a}):void setTimeout(function(){Formula.setValueLive(a)},100)},initMode:function(){var a=editor.getOpt("formulaConfig");"live"===a.editorMode?($("#liveEditor").attr("src",a.editorLiveServer+"/editor"),$("#modeLive").show(),Formula.mode="live"):($("#modePlain").show(),Formula.mode="plain");var b=editor.selection.getRange().getClosedNode();if(b&&null!==b.getAttribute("data-formula-image")){var c=b.getAttribute("data-formula-image");c&&Formula.setValue(decodeURIComponent(c))}},setValue:function(a){switch(Formula.mode){case"plain":Formula.setValuePlain(a);break;case"live":Formula.setValueLive(a)}},getValue:function(a){switch(Formula.mode){case"plain":a($.trim($("#editor").val()));break;case"live":Formula.latexeasy.call("get.latex",{},function(b){a(b.latex)})}},initEvent:function(){var a,b=null;switch(Formula.mode){case"plain":$("#editor").on("change keypress",function(){b&&clearTimeout(b),b=setTimeout(function(){Formula.renderPlain()},1e3)}),$("#inputDemo").on("click",function(){$("#editor").val("f(a) = \\frac{1}{2\\pi i} \\oint\\frac{f(z)}{z-a}dz"),Formula.renderPlain()});break;case"live":var c=editor.getOpt("formulaConfig");loadScript(c.editorLiveServer+"/vendor/LatexEasyEditor/editor/sdk.js",function(){a=new window.LatexEasy(document.getElementById("liveEditor")),a.on("ready",function(){Formula.latexeasy=a}),a.init()})}},initSubmit:function(){dialog.onclose=function(a,b){return!b||(Formula.getValue(function(a){editor.execCommand("formula",a),editor.fireEvent("saveScene"),dialog.close(!1)}),!1)}}};
|
||||
Reference in New Issue
Block a user