富文本替换成ueditorPlus,填空题开发完成

master
yujialong 4 months ago
parent 8203f8578a
commit 279faf12a0
  1. 14
      public/index.html
  2. 1
      public/static/ueditor/dialogs/image/image.css
  3. 121
      public/static/ueditor/dialogs/image/image.html
  4. 1
      public/static/ueditor/dialogs/image/image.js
  5. 1
      public/static/ueditor/dialogs/internal.js
  6. 40
      public/static/ueditor/dialogs/preview/preview.html
  7. 1
      public/static/ueditor/dialogs/table/edittable.css
  8. 1
      public/static/ueditor/dialogs/table/edittable.js
  9. 1
      public/static/ueditor/kityformula-plugin/addKityFormulaDialog.js
  10. 1
      public/static/ueditor/kityformula-plugin/defaultFilterFix.js
  11. 1
      public/static/ueditor/kityformula-plugin/getKfContent.js
  12. 107
      public/static/ueditor/kityformula-plugin/kityFormulaDialog.html
  13. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/custom/bar-bg.png
  14. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/custom/bar.png
  15. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/custom/bg.png
  16. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/custom/bottom.png
  17. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/custom/btn.png
  18. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/custom/down.png
  19. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/custom/top.png
  20. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/custom/up.png
  21. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/edit/bar-bg.png
  22. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/edit/bar-left.png
  23. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/edit/bar-right.png
  24. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/edit/thumb-bg.png
  25. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/edit/thumb-left.png
  26. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/scrollbar/edit/thumb-right.png
  27. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/aleph.png
  28. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/bbbk.png
  29. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/beth.png
  30. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/circleds.png
  31. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/complement.png
  32. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/daleth.png
  33. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/ell.png
  34. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/eth.png
  35. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/finv.png
  36. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/game.png
  37. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/gimel.png
  38. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/hbar.png
  39. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/hslash.png
  40. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/im.png
  41. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/mho.png
  42. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/partial.png
  43. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/re.png
  44. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/alphabetic/wp.png
  45. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/circlearrowleft.png
  46. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/circlearrowright.png
  47. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/curvearrowleft.png
  48. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/curvearrowright.png
  49. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/downarrow.png
  50. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/downdownarrows.png
  51. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/downharpoonleft.png
  52. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/downharpoonright.png
  53. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/gets.png
  54. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/leftarrowtail.png
  55. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/leftharpoondown.png
  56. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/leftharpoonup.png
  57. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/leftleftarrows.png
  58. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/leftrightarrow.png
  59. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/leftrightarrows.png
  60. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/leftrightharpoons.png
  61. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/leftrightsquigarrow.png
  62. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/longleftarrow.png
  63. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/longleftrightarrow.png
  64. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/longrightarrow.png
  65. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/looparrowleft.png
  66. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/looparrowright.png
  67. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/multimap.png
  68. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/nearrow.png
  69. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/nleftarrow.png
  70. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/nrightarrow.png
  71. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/nwarrow.png
  72. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/rightarrowtail.png
  73. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/rightharpoondown.png
  74. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/rightharpoonup.png
  75. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/rightleftarrows.png
  76. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/rightleftharpoons.png
  77. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/rightrightarrows.png
  78. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/rightsquigarrow.png
  79. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/searrow.png
  80. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/swarrow.png
  81. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/to.png
  82. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/twoheadleftarrow.png
  83. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/twoheadrightarrow.png
  84. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-downarrow.png
  85. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-leftarrow.png
  86. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-leftrightarrow.png
  87. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-lftarrow.png
  88. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-lleftarrow.png
  89. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-longleftarrow.png
  90. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-longleftrightarrow.png
  91. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-longrightarrow.png
  92. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-lsh.png
  93. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-nleftarrow.png
  94. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-nleftrightarrow.png
  95. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-nrightarrow.png
  96. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-rightarrow.png
  97. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-rrightarrow.png
  98. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-rsh.png
  99. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-uparrow.png
  100. BIN
      public/static/ueditor/kityformula-plugin/kityformula/assets/images/toolbar/arrow/u-updownarrow.png
  101. Some files were not shown because too many files have changed in this diff Show More

@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta name="referrer" content="no-referrer" />
<link rel="stylesheet" href="./static/ueditorPlus/plugins/gapfilling/gapfilling.css">
<title>理论考试平台</title>
</head>
<body>
@ -13,16 +14,9 @@
</noscript>
<div id="app"></div>
<script src='./static/ueditor/ueditor.config.js?v=3'></script>
<script src='./static/ueditor/ueditor.all.js?v=3'></script>
<script src='./static/ueditor/lang/zh-cn/zh-cn.js'></script>
<!-- <script src='./static/ueditorPlus/ueditor.config.js?v=3'></script>
<script src='./static/ueditorPlus/ueditor.config.js?v=3'></script>
<script src='./static/ueditorPlus/ueditor.all.js?v=3'></script>
<script src='./static/ueditorPlus/lang/zh-cn/zh-cn.js'></script> -->
<script src='./static/ueditor/kityformula-plugin/addKityFormulaDialog.js'></script>
<script src='./static/ueditor/kityformula-plugin/getKfContent.js'></script>
<script src='./static/ueditor/kityformula-plugin/defaultFilterFix.js'></script>
<script src='./static/ueditorPlus/lang/zh-cn/zh-cn.js'></script>
<script src='./static/ueditorPlus/plugins/gapfilling/gapfilling.js'></script>
</body>
</html>

File diff suppressed because one or more lines are too long

@ -1,121 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>ueditor图片对话框</title>
<script type="text/javascript" src="../internal.js"></script>
<!-- jquery -->
<script type="text/javascript" src="../../third-party/jquery-1.10.2.min.js"></script>
<!-- webuploader -->
<script src="../../third-party/webuploader/webuploader.min.js"></script>
<link rel="stylesheet" type="text/css" href="../../third-party/webuploader/webuploader.css">
<!-- image dialog -->
<link rel="stylesheet" href="image.css" type="text/css" />
</head>
<body>
<div class="wrapper">
<div id="tabhead" class="tabhead">
<!--xlz去掉线上上传图片的功能-->
<!-- <span class="tab" data-content-id="remote"><var id="lang_tab_remote"></var></span>-->
<span class="tab focus" data-content-id="upload"><var id="lang_tab_upload"></var></span>
<!--<span class="tab" data-content-id="online"><var id="lang_tab_online"></var></span>
<span class="tab" data-content-id="search"><var id="lang_tab_search"></var></span>-->
</div>
<div class="alignBar">
<label class="algnLabel"><var id="lang_input_align"></var></label>
<span id="alignIcon">
<span id="noneAlign" class="none-align focus" data-align="none"></span>
<span id="leftAlign" class="left-align" data-align="left"></span>
<span id="rightAlign" class="right-align" data-align="right"></span>
<span id="centerAlign" class="center-align" data-align="center"></span>
</span>
<input id="align" name="align" type="hidden" value="none"/>
</div>
<div id="tabbody" class="tabbody">
<!-- 远程图片 -->
<div id="remote" class="panel">
<div class="top">
<div class="row">
<label for="url"><var id="lang_input_url"></var></label>
<span><input class="text" id="url" type="text"/></span>
</div>
</div>
<div class="left">
<div class="row">
<label><var id="lang_input_size"></var></label>
<span><var id="lang_input_width">&nbsp;&nbsp;</var><input class="text" type="text" id="width"/>px </span>
<span><var id="lang_input_height">&nbsp;&nbsp;</var><input class="text" type="text" id="height"/>px </span>
<span><input id="lock" type="checkbox" disabled="disabled"><span id="lockicon"></span></span>
</div>
<div class="row">
<label><var id="lang_input_border"></var></label>
<span><input class="text" type="text" id="border"/>px </span>
</div>
<div class="row">
<label><var id="lang_input_vhspace"></var></label>
<span><input class="text" type="text" id="vhSpace"/>px </span>
</div>
<div class="row">
<label><var id="lang_input_title"></var></label>
<span><input class="text" type="text" id="title"/></span>
</div>
</div>
<div class="right"><div id="preview"></div></div>
</div>
<!-- 上传图片 -->
<div id="upload" class="panel focus">
<div id="queueList" class="queueList">
<div class="statusBar element-invisible">
<div class="progress">
<span class="text">0%</span>
<span class="percentage"></span>
</div><div class="info"></div>
<div class="btns">
<div id="filePickerBtn"></div>
<div class="uploadBtn"><var id="lang_start_upload"></var></div>
</div>
</div>
<div id="dndArea" class="placeholder">
<div class="filePickerContainer">
<div id="filePickerReady"></div>
</div>
</div>
<ul class="filelist element-invisible">
<li id="filePickerBlock" class="filePickerBlock"></li>
</ul>
</div>
</div>
<!-- 在线图片 -->
<div id="online" class="panel">
<div id="imageList"><var id="lang_imgLoading"></var></div>
</div>
<!-- 搜索图片 -->
<div id="search" class="panel">
<div class="searchBar">
<input id="searchTxt" class="searchTxt text" type="text" />
<select id="searchType" class="searchType">
<option value="&s=4&z=0"></option>
<option value="&s=1&z=19"></option>
<option value="&s=2&z=0"></option>
<option value="&s=3&z=0"></option>
</select>
<input id="searchReset" type="button" />
<input id="searchBtn" type="button" />
</div>
<div id="searchList" class="searchList"><ul id="searchListUl"></ul></div>
</div>
</div>
</div>
<script type="text/javascript" src="image.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
!function(){var e=window.parent;dialog=e.$EDITORUI[window.frameElement.id.replace(/_iframe$/,"")],editor=dialog.editor,UE=e.UE,domUtils=UE.dom.domUtils,utils=UE.utils,browser=UE.browser,ajax=UE.ajax,$G=function(e){return document.getElementById(e)},$focus=function(t){setTimeout(function(){if(browser.ie){var e=t.createTextRange();e.collapse(!1),e.select()}else t.focus()},0)},utils.loadFile(document,{href:"../themes/default/dialogbase.css?cache="+Math.random(),tag:"link",type:"text/css"}),lang=editor.getLang(dialog.className.split("-")[2]),lang&&domUtils.on(window,"load",function(){var e=editor.options.langPath+editor.options.lang+"/images/";for(var t in lang.static){var a=$G(t);if(a){var o=a.tagName,i=lang.static[t];switch(i.src&&((i=utils.extend({},i,!1)).src=e+i.src),i.style&&((i=utils.extend({},i,!1)).style=i.style.replace(/url\s*\(/g,"url("+e)),o.toLowerCase()){case"var":a.parentNode.replaceChild(document.createTextNode(i),a);break;case"select":for(var s,r=a.options,l=0;s=r[l];)s.innerHTML=i.options[l++];for(var n in i)"options"!=n&&a.setAttribute(n,i[n]);break;default:domUtils.setAttributes(a,i)}}}})}();

@ -1,40 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style>
html,body{
height:100%;
width:100%;
padding:0;
margin:0;
}
#preview{
width:100%;
height:100%;
padding:0;
margin:0;
}
#preview *{font-family:sans-serif;font-size:16px;}
</style>
<script type="text/javascript" src="../internal.js"></script>
<script src="../../ueditor.parse.min.js"></script>
<title></title>
</head>
<body class="view">
<div id="preview" style="margin:8px">
</div>
</body>
<script>
document.getElementById('preview').innerHTML = editor.getContent();
uParse('#preview',{
rootPath : '../../',
chartContainerHeight:500
})
dialog.oncancel = function(){
document.getElementById('preview').innerHTML = '';
}
</script>
</html>

@ -1 +0,0 @@
body{overflow:hidden;width:540px}.wrapper{margin:10px auto 0;font-size:12px;overflow:hidden;width:520px;height:315px}.clear{clear:both}.wrapper .left{float:left;margin-left:10px}.wrapper .right{float:right;border-left:2px dotted #ededed;padding-left:15px}.section{margin-bottom:15px;width:240px;overflow:hidden}.section h3{font-weight:bold;padding:5px 0;margin-bottom:10px;border-bottom:1px solid #ededed;font-size:12px}.section ul{list-style:none;overflow:hidden;clear:both}.section li{float:left;width:120px}.section .tone{width:80px}.section .preview{width:220px}.section .preview table{text-align:center;vertical-align:middle;color:#666}.section .preview caption{font-weight:bold}.section .preview td{border-width:1px;border-style:solid;height:22px}.section .preview th{border-style:solid;border-color:#DDD;border-width:2px 1px 1px 1px;height:22px;background-color:#f7f7f7}

@ -1 +0,0 @@
!function(){function e(){(r=this).init()}var r,l=$G("J_title"),d=$G("J_titleCol"),i=$G("J_caption"),a=$G("J_sorttable"),c=$G("J_autoSizeContent"),m=$G("J_autoSizePage"),s=$G("J_tone"),u=$G("J_preview");e.prototype={init:function(){var e=new UE.ui.ColorPicker({editor:editor}),t=new UE.ui.Popup({editor:editor,content:e});l.checked=-1==editor.queryCommandState("inserttitle"),d.checked=-1==editor.queryCommandState("inserttitlecol"),i.checked=-1==editor.queryCommandState("insertcaption"),a.checked=1==editor.queryCommandState("enablesort");var o=editor.queryCommandState("enablesort"),n=editor.queryCommandState("disablesort");a.checked=!!(o<0&&0<=n),a.disabled=!!(o<0&&n<0),a.title=o<0&&n<0?lang.errorMsg:"",r.createTable(l.checked,d.checked,i.checked),r.setAutoSize(),r.setColor(r.getColor()),domUtils.on(l,"click",r.titleHanler),domUtils.on(d,"click",r.titleColHanler),domUtils.on(i,"click",r.captionHanler),domUtils.on(a,"click",r.sorttableHanler),domUtils.on(c,"click",r.autoSizeContentHanler),domUtils.on(m,"click",r.autoSizePageHanler),domUtils.on(s,"click",function(){t.showAnchor(s)}),domUtils.on(document,"mousedown",function(){t.hide()}),e.addListener("pickcolor",function(){r.setColor(arguments[1]),t.hide()}),e.addListener("picknocolor",function(){r.setColor(""),t.hide()})},createTable:function(e,t,o){var n=[];if(n.push("<table id='J_example'>"),o&&n.push("<caption>"+lang.captionName+"</caption>"),e){n.push("<tr>"),t&&n.push("<th>"+lang.titleName+"</th>");for(var i=0;i<5;i++)n.push("<th>"+lang.titleName+"</th>");n.push("</tr>")}for(var a=0;a<6;a++){n.push("<tr>"),t&&n.push("<th>"+lang.titleName+"</th>");for(var r=0;r<5;r++)n.push("<td>"+lang.cellsName+"</td>");n.push("</tr>")}n.push("</table>"),u.innerHTML=n.join(""),this.updateSortSpan()},titleHanler:function(){var e=$G("J_example"),t=document.createDocumentFragment(),o=domUtils.getComputedStyle(domUtils.getElementsByTagName(e,"td")[0],"border-color"),n=e.rows[0].children.length;if(l.checked){e.insertRow(0);for(var i,a=0;a<n;a++)(i=document.createElement("th")).innerHTML=lang.titleName,t.appendChild(i);e.rows[0].appendChild(t)}else domUtils.remove(e.rows[0]);r.setColor(o),r.updateSortSpan()},titleColHanler:function(){var e=$G("J_example"),t=domUtils.getComputedStyle(domUtils.getElementsByTagName(e,"td")[0],"border-color"),o=e.rows,n=o.length;if(d.checked)for(var i,a=0;a<n;a++)(i=document.createElement("th")).innerHTML=lang.titleName,o[a].insertBefore(i,o[a].children[0]);else for(a=0;a<n;a++)domUtils.remove(o[a].children[0]);r.setColor(t),r.updateSortSpan()},captionHanler:function(){var e=$G("J_example");if(i.checked){var t=document.createElement("caption");t.innerHTML=lang.captionName,e.insertBefore(t,e.firstChild)}else domUtils.remove(domUtils.getElementsByTagName(e,"caption")[0])},sorttableHanler:function(){r.updateSortSpan()},autoSizeContentHanler:function(){$G("J_example").removeAttribute("width")},autoSizePageHanler:function(){var e=$G("J_example"),t=e.getElementsByTagName(e,"td");utils.each(t,function(e){e.removeAttribute("width")}),e.setAttribute("width","100%")},updateSortSpan:function(){var e=$G("J_example"),t=e.rows[0],o=domUtils.getElementsByTagName(e,"span");utils.each(o,function(e){e.parentNode.removeChild(e)}),a.checked&&utils.each(t.cells,function(e,t){var o=document.createElement("span");o.innerHTML="^",e.appendChild(o)})},getColor:function(){var e=editor.selection.getStart(),t=domUtils.findParentByTagName(e,["td","th","caption"],!0);return t&&domUtils.getComputedStyle(t,"border-color")||"#DDDDDD"},setColor:function(t){var e=$G("J_example"),o=domUtils.getElementsByTagName(e,"td").concat(domUtils.getElementsByTagName(e,"th"),domUtils.getElementsByTagName(e,"caption"));s.value=t,utils.each(o,function(e){e.style.borderColor=t})},setAutoSize:function(){m.checked=!0,this.autoSizePageHanler()}},new e,dialog.onok=function(){editor.__hasEnterExecCommand=!0;var e={title:"inserttitle deletetitle",titleCol:"inserttitlecol deletetitlecol",caption:"insertcaption deletecaption",sorttable:"enablesort disablesort"};for(var t in editor.fireEvent("saveScene"),e){var o=e[t].split(" ");$G("J_"+t).checked?-1!=editor.queryCommandState(o[0])&&editor.execCommand(o[0]):-1!=editor.queryCommandState(o[1])&&editor.execCommand(o[1])}editor.execCommand("edittable",s.value),c.checked&&editor.execCommand("adaptbytext"),m.checked&&editor.execCommand("adaptbywindow"),editor.fireEvent("saveScene"),editor.__hasEnterExecCommand=!1}}();

@ -1 +0,0 @@
UE.registerUI("kityformula",function(t,n){var e=new UE.ui.Dialog({iframeUrl:t.options.UEDITOR_HOME_URL+"kityformula-plugin/kityFormulaDialog.html",editor:t,name:n,title:"插入公式 ",cssRules:"width:783px; height: 386px;",buttons:[{className:"edui-okbutton",label:"确定",onclick:function(){e.close(!0)}},{className:"edui-cancelbutton",label:"取消",onclick:function(){e.close(!1)}}]});t.ready(function(){UE.utils.cssRule("kfformula","img.kfformula{vertical-align: middle;}",t.document)});var i=t.options.UEDITOR_HOME_URL+"kityformula-plugin/kf-icon.png",l=document.createElement("a");l.href=i,l.href=l.href,i=l.href;var o=new UE.ui.Button({name:"插入"+n,title:"插入公式",cssRules:'background: url("'+i+'") !important',onclick:function(){e.render(),e.open()}});return t.addListener("selectionchange",function(){var e=t.queryCommandState(n);-1==e?(o.setDisabled(!0),o.setChecked(!1)):(o.setDisabled(!1),o.setChecked(e))}),o});

@ -1 +0,0 @@
UE.plugins.defaultfilter=function(){var n=this;n.setOpt({allowDivTransToP:!0,disabledTableInTable:!0,rgb2Hex:!0}),n.addInputRule(function(e){var s,d=this.options.allowDivTransToP;e.traversal(function(i){if("element"==i.type){if(!UE.dom.dtd.$cdata[i.tagName]&&n.options.autoClearEmptyNode&&UE.dom.dtd.$inline[i.tagName]&&!UE.dom.dtd.$empty[i.tagName]&&(!i.attrs||UE.utils.isEmptyObject(i.attrs)))return void(i.firstChild()?"span"!=i.tagName||i.attrs&&!UE.utils.isEmptyObject(i.attrs)||i.parentNode.removeChild(i,!0):i.parentNode.removeChild(i));switch(i.tagName){case"style":case"script":i.setAttr({cdata_tag:i.tagName,cdata_data:i.innerHTML()||"",_ue_custom_node_:"true"}),i.tagName="div",i.innerHTML("");break;case"a":(s=i.getAttr("href"))&&i.setAttr("_href",s);break;case"img":i.setAttr("_src",i.getAttr("src"));break;case"span":UE.browser.webkit&&(s=i.getStyle("white-space"))&&/nowrap|normal/.test(s)&&(i.setStyle("white-space",""),n.options.autoClearEmptyNode&&UE.utils.isEmptyObject(i.attrs)&&i.parentNode.removeChild(i,!0)),(s=i.getAttr("id"))&&/^_baidu_bookmark_/i.test(s)&&i.parentNode.removeChild(i);break;case"p":(s=i.getAttr("align"))&&(i.setAttr("align"),i.setStyle("text-align",s)),UE.utils.each(i.children,function(e){if("element"==e.type&&"p"==e.tagName){var t=e.nextSibling();i.parentNode.insertAfter(e,i);for(var a=e;t;){var r=t.nextSibling();i.parentNode.insertAfter(t,a),a=t,t=r}return!1}}),i.firstChild()||i.innerHTML(UE.browser.ie?"&nbsp;":"<br/>");break;case"div":if(i.getAttr("cdata_tag"))break;if((s=i.getAttr("class"))&&/^line number\d+/.test(s))break;if(!d)break;for(var e,t=UE.uNode.createElement("p");e=i.firstChild();)"text"!=e.type&&UE.dom.UE.dom.dtd.$block[e.tagName]?t.firstChild()?(i.parentNode.insertBefore(t,i),t=UE.uNode.createElement("p")):i.parentNode.insertBefore(e,i):t.appendChild(e);t.firstChild()&&i.parentNode.insertBefore(t,i),i.parentNode.removeChild(i);break;case"dl":i.tagName="ul";break;case"dt":case"dd":i.tagName="li";break;case"li":var a=i.getAttr("class");a&&/list\-/.test(a)||i.setAttr();var r=i.getNodesByTagName("ol ul");UE.utils.each(r,function(e){i.parentNode.insertAfter(e,i)});break;case"td":case"th":case"caption":i.children&&i.children.length||i.appendChild(UE.browser.ie11below?UE.uNode.createText(" "):UE.uNode.createElement("br"));break;case"table":n.options.disabledTableInTable&&function(e){for(;e&&"element"==e.type;){if("td"==e.tagName)return 1;e=e.parentNode}}(i)&&(i.parentNode.insertBefore(UE.uNode.createText(i.innerText()),i),i.parentNode.removeChild(i))}}})}),n.addOutputRule(function(e){var a;e.traversal(function(e){if("element"==e.type){if(n.options.autoClearEmptyNode&&UE.dom.dtd.$inline[e.tagName]&&!UE.dom.dtd.$empty[e.tagName]&&(!e.attrs||UE.utils.isEmptyObject(e.attrs)))return void(e.firstChild()?"span"!=e.tagName||e.attrs&&!UE.utils.isEmptyObject(e.attrs)||e.parentNode.removeChild(e,!0):e.parentNode.removeChild(e));switch(e.tagName){case"div":(a=e.getAttr("cdata_tag"))&&(e.tagName=a,e.appendChild(UE.uNode.createText(e.getAttr("cdata_data"))),e.setAttr({cdata_tag:"",cdata_data:"",_ue_custom_node_:""}));break;case"a":(a=e.getAttr("_href"))&&e.setAttr({href:UE.utils.html(a),_href:""});break;case"span":if((a=e.getAttr("id"))&&/^_baidu_bookmark_/i.test(a)&&e.parentNode.removeChild(e),n.getOpt("rgb2Hex")){var t=e.getAttr("style");t&&e.setAttr("style",t.replace(/rgba?\(([\d,\s]+)\)/g,function(e,t){var a=t.split(",");if(3<a.length)return"";t="#";for(var r,i=0;r=a[i++];)t+=1==(r=parseInt(r.replace(/[^\d]/gi,""),10).toString(16)).length?"0"+r:r;return t.toUpperCase()}))}break;case"img":(a=e.getAttr("_src"))&&e.setAttr({src:e.getAttr("_src"),_src:""})}}})})};

@ -1 +0,0 @@
UE.Editor.prototype.getKfContent=function(t){var s=this,e=s.getActionUrl(s.getOpt("scrawlActionName")),r=UE.utils.serializeParam(s.queryCommandValue("serverparam"))||"",a=UE.utils.formatUrl(e+(-1==e.indexOf("?")?"?":"&")+r),i=0,n=s.body.getElementsByTagName("img"),o=[];function c(){i>=o.length&&(s.sync(),t(s.getContent()))}UE.utils.each(n,function(t){"data:image/png"===t.getAttribute("src").match(/^[^;]+/)[0]&&o.push(t)}),0==o.length?c():UE.utils.each(o,function(n){var t={};t[s.getOpt("scrawlFieldName")]=n.getAttribute("src").replace(/^[^,]+,/,""),t.onsuccess=function(t){var e=UE.utils.str2json(t.responseText),r=s.options.scrawlUrlPrefix+e.url;n.setAttribute("src",r),n.setAttribute("_src",r),i++,c()},t.onerror=function(t){console.error(t),i++,c()},UE.ajax.request(a,t)})};

@ -1,107 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="kityformula/assets/styles/base.css">
<link rel="stylesheet" href="kityformula/assets/styles/ui.css">
<link rel="stylesheet" href="kityformula/assets/styles/scrollbar.css">
<style>
html, body {
padding: 0;
margin: 0;
}
.kf-editor {
width: 780px;
height: 380px;
}
#loading {
height: 32px;
width: 340px;
line-height: 32px;
position: absolute;
top: 42%;
left: 50%;
margin-left: -170px;
font-family: arial, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
}
#loading img {
position: absolute;
}
#loading p {
display: block;
position: absolute;
left: 40px;
top: 0px;
margin: 0;
}
</style>
<title></title>
</head>
<body>
<div id="kfEditorContainer" class="kf-editor">
<div id="tips" class="tips">
sorry! 仅支持IE9及以上版本的浏览器!
</div>
</div>
<!--页面中一定要引入internal.js为了能直接使用当前打开dialog的实例变量-->
<!--internal.js默认是放到dialogs目录下的-->
<script type="text/javascript" src="../dialogs/internal.js"></script>
<script src="kityformula/js/jquery-1.11.0.min.js"></script>
<script src="kityformula/js/kitygraph.all.js"></script>
<script src="kityformula/js/kity-formula-render.all.js"></script>
<script src="kityformula/js/kity-formula-parser.all.min.js"></script>
<script src="kityformula/js/kityformula-editor.all.min.js"></script>
<script>
jQuery( function ($) {
if ( document.body.addEventListener ) {
$( "#tips").html('<div id="loading"><img src="kityformula/loading.gif" alt="loading" /><p>正在加载,请耐心等待...</p></div>' );
var factory = kf.EditorFactory.create( $( "#kfEditorContainer" )[ 0 ], {
render: {
fontsize: 24
},
resource: {
path: "./kityformula/resource/"
}
} );
factory.ready( function ( KFEditor ) {
$( "#tips").remove();
// this指向KFEditor
var rng = editor.selection.getRange(),
img = rng.getClosedNode(),
imgLatex = img && $(img).attr('data-latex');
this.execCommand( "render", imgLatex || "\\placeholder" );
this.execCommand( "focus" );
window.kfe = this;
} );
dialog.onok = function(){
kfe.execCommand('get.image.data', function(data){
var latex = kfe.execCommand('get.source');
editor.execCommand('inserthtml', '<img class="kfformula" src="'+ data.img +'" data-latex="' + latex + '" />');
dialog.close();
});
return false;
}
} else {
$( "#tips").css( "color", "black" );
$( "#tips").css( "padding", "10px" );
}
} );
</script>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save