1 Star 0 Fork 96

風哥/ectouch

forked from ectouch/ectouch 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
editor.php 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
carson 提交于 2018-03-05 16:12 +08:00 . publish v2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Editor</title>
<script type="text/javascript" src="ueditor.config.js"></script>
<script type="text/javascript" src="ueditor.all.min.js"></script>
<script type="text/javascript" src="lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="../../data/assets/js/jquery.min.js"></script>
<style type="text/css">
body {margin:0px; padding:0px;}
#container {width:640px; height:400px;}
</style>
</head>
<body>
<script type="text/plain" name="content" id="container"></script>
<script type="text/javascript">
<?php $item = htmlspecialchars($_GET['item']);?>
var cBox = $('#<?php echo $item;?>', parent.document);
var editor = UE.getEditor('container');
editor.addListener('ready', function() {
$('#detail-table', parent.document).hide();//先显示再隐藏编辑器,兼容部分浏览在display:none时无法创建的问题
var content = cBox.val();
editor.setContent(content);
});
//editor.addListener("contentChange", function(){setSync()});//触发同步
$(function(){
window.setInterval("setSync()",1000);//自动同步
})
function setSync(){
var content = editor.getContent();
cBox.val(content);
}
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/junchen/ectouch.git
git@gitee.com:junchen/ectouch.git
junchen
ectouch
ectouch
master

搜索帮助