@ -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"> </var><input class="text" type="text" id="width"/>px </span> |
||||
<span><var id="lang_input_height"> </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> |
@ -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?" ":"<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> |
Before Width: | Height: | Size: 925 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 1003 B |
Before Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 996 B |
Before Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 938 B |
Before Width: | Height: | Size: 982 B |
Before Width: | Height: | Size: 994 B |
Before Width: | Height: | Size: 941 B |
Before Width: | Height: | Size: 983 B |
Before Width: | Height: | Size: 988 B |
Before Width: | Height: | Size: 559 B |
Before Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 467 B |
Before Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 492 B |
Before Width: | Height: | Size: 364 B |
Before Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 542 B |
Before Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 702 B |
Before Width: | Height: | Size: 524 B |
Before Width: | Height: | Size: 337 B |
Before Width: | Height: | Size: 351 B |
Before Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 190 B |
Before Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 269 B |
Before Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 346 B |
Before Width: | Height: | Size: 269 B |
Before Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 250 B |
Before Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 185 B |
Before Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 277 B |
Before Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 341 B |
Before Width: | Height: | Size: 277 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 350 B |
Before Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 338 B |