2024年11月7日 新增公式,打包后可使用,开放模式下无法访问public文件夹内容
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||
<path d="M0.672,33.603c-0.432,0-0.648,0-0.648-0.264c0-0.024,0-0.144,0.24-0.432l12.433-14.569L0,0.96c0-0.264,0-0.72,0.024-0.792 C0.096,0.024,0.12,0,0.672,0h28.371l2.904,6.745h-0.6C30.531,4.8,28.898,3.72,28.298,3.336c-1.896-1.2-3.984-1.608-5.28-1.8 c-0.216-0.048-2.4-0.384-5.617-0.384H4.248l11.185,15.289c0.168,0.24,0.168,0.312,0.168,0.36c0,0.12-0.048,0.192-0.216,0.384 L3.168,31.515h14.474c4.608,0,6.96-0.624,7.464-0.744c2.76-0.72,5.305-2.352,6.241-4.848h0.6l-2.904,7.681H0.672z" fill="black"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 571 B |
|
@ -0,0 +1,111 @@
|
|||
<!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! Beta版本仅支持IE9及以上版本的浏览器,正式版本将会支持低版本浏览器,谢谢您的关注!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="kityformula/js/jquery-3.6.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>
|
||||
//获取url地址栏传参
|
||||
function getQueryVariable(variable){
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i=0;i<vars.length;i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if(pair[0] == variable){return pair[1];}
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
//处理TinyMCE编辑器的事件
|
||||
window.addEventListener('message', function (event) {
|
||||
var data = event.data;
|
||||
kfe.execCommand('get.image.data', function(data){
|
||||
var latex = kfe.execCommand('get.source');
|
||||
window.parent.postMessage({
|
||||
mceAction: 'insertContent',
|
||||
content: "<img src=\""+data.img+"\" data-latex=\""+latex+"\">"
|
||||
}, '*');
|
||||
window.parent.postMessage({
|
||||
mceAction: 'close'
|
||||
}, '*');
|
||||
});
|
||||
});
|
||||
//实例化编辑器
|
||||
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();
|
||||
//处理地址栏的参数并加载到编辑器中
|
||||
var c=getQueryVariable("c")
|
||||
if(c){
|
||||
this.execCommand( "render",decodeURIComponent(c) );
|
||||
}else{
|
||||
this.execCommand( "render","\\placeholder" );
|
||||
};
|
||||
|
||||
this.execCommand( "focus" );
|
||||
window.kfe = this;
|
||||
} );
|
||||
} else {
|
||||
$( "#tips").css( "color", "black" );
|
||||
$( "#tips").css( "padding", "10px" );
|
||||
}
|
||||
} );
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 925 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 945 B |
After Width: | Height: | Size: 1003 B |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 996 B |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 938 B |
After Width: | Height: | Size: 982 B |
After Width: | Height: | Size: 994 B |
After Width: | Height: | Size: 941 B |
After Width: | Height: | Size: 983 B |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 519 B |
After Width: | Height: | Size: 317 B |
After Width: | Height: | Size: 874 B |
After Width: | Height: | Size: 371 B |
After Width: | Height: | Size: 305 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 552 B |
After Width: | Height: | Size: 239 B |
After Width: | Height: | Size: 492 B |
After Width: | Height: | Size: 364 B |
After Width: | Height: | Size: 516 B |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 571 B |
After Width: | Height: | Size: 573 B |
After Width: | Height: | Size: 546 B |
After Width: | Height: | Size: 702 B |
After Width: | Height: | Size: 524 B |
After Width: | Height: | Size: 337 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 347 B |
After Width: | Height: | Size: 338 B |
After Width: | Height: | Size: 255 B |
After Width: | Height: | Size: 268 B |
After Width: | Height: | Size: 190 B |
After Width: | Height: | Size: 191 B |
After Width: | Height: | Size: 252 B |
After Width: | Height: | Size: 259 B |
After Width: | Height: | Size: 186 B |
After Width: | Height: | Size: 187 B |
After Width: | Height: | Size: 269 B |
After Width: | Height: | Size: 309 B |
After Width: | Height: | Size: 294 B |
After Width: | Height: | Size: 268 B |
After Width: | Height: | Size: 346 B |
After Width: | Height: | Size: 269 B |
After Width: | Height: | Size: 297 B |
After Width: | Height: | Size: 285 B |
After Width: | Height: | Size: 332 B |
After Width: | Height: | Size: 339 B |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 319 B |
After Width: | Height: | Size: 276 B |
After Width: | Height: | Size: 286 B |
After Width: | Height: | Size: 324 B |
After Width: | Height: | Size: 250 B |
After Width: | Height: | Size: 194 B |
After Width: | Height: | Size: 185 B |
After Width: | Height: | Size: 278 B |
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 304 B |
After Width: | Height: | Size: 317 B |
After Width: | Height: | Size: 292 B |
After Width: | Height: | Size: 279 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 262 B |
After Width: | Height: | Size: 285 B |
After Width: | Height: | Size: 275 B |
After Width: | Height: | Size: 341 B |
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 305 B |
After Width: | Height: | Size: 281 B |
After Width: | Height: | Size: 330 B |
After Width: | Height: | Size: 288 B |
After Width: | Height: | Size: 252 B |
After Width: | Height: | Size: 350 B |
After Width: | Height: | Size: 400 B |
After Width: | Height: | Size: 349 B |
After Width: | Height: | Size: 292 B |
After Width: | Height: | Size: 314 B |
After Width: | Height: | Size: 255 B |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 338 B |
After Width: | Height: | Size: 251 B |
After Width: | Height: | Size: 302 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 281 B |
After Width: | Height: | Size: 748 B |
After Width: | Height: | Size: 634 B |
After Width: | Height: | Size: 813 B |
After Width: | Height: | Size: 635 B |
After Width: | Height: | Size: 6.6 KiB |