注册 登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

天上人间*bobo之家

有阳光的时段,就有他(她)的博客文章。也许天气并非晴空万里,博主的“博物钟”却是

 
 
 

日志

 
 

网页编辑器  

2009-09-01 12:50:14|  分类: PHP |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

/editor.php


<script type="text/javascript">
function goto(){
window.opener.document.getElementById('<?php echo $_GET['element'] ?>').value =document.getElementById("content").value;
window.opener.document.getElementById('theForm').action='<?php echo $_GET['action'] ?>';
window.opener.document.getElementById('theForm').target='_self';
window.close();
 }
</script>


<!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>
<title>编辑内容</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<script language="javascript" type="text/javascript" src="/public/js/jquery.js"></script>


<body>
    <form action="" method="post" name="theForm" id="theForm" onSubmit="KindSubmit();goto();">
   <table width="90%" id="general-table">
    
    
     <tr>
    <td width="12%" class="narrow-label">&nbsp;</td>
    <td width="88%" colspan="2">
     <textarea style="display:none" name="content" id="content"><?php if(isset($_POST[$_GET['element']])) echo $_POST[$_GET['element']] ?></textarea>
     <script language="javascript" type="text/javascript" src="/public/editor/KindEditor.js" charset='gb2312'></script>
     <script language="javascript" type="text/javascript">
     var editor = new KindEditor("editor");
     editor.hiddenName = "content";
     editor.skinPath = "/public/editor/skins/default/";
     editor.iconPath = "/public/editor/icons/";
     editor.imageAttachPath = "attached/";
     editor.imageUploadCgi = "/public/editor/upload_cgi/upload.php";
     editor.cssPath = "/public/editor/common.css";
     //editor.editorType = "simple";
     editor.editorWidth = "600px";
     editor.editorHeight = "400px";
     editor.show();
     function KindSubmit() {
      editor.data();
     }
     </script>         </td>
     </tr>
     <tr>
       <td class="narrow-label">&nbsp;</td>
       <td colspan="2"><span class="narrow-label">
         <input name="flag" type="hidden" id="flag" value="post" />
      <input name="action" type="hidden" id="action" value="<?php echo $_GET['action'] ?>" />
         <input name="submit" type="submit" class="button" value=" 确定 "  />
                  <input name="reset" type="reset" class="button" value=" 重置 " />
       </span></td>
        </tr>
     </table>

  </form>

</body>
</html>

editor.html

function openWebEditor(object){
 window.open("",'editor','scrollbars=1,resizable=0');
 currentAction = $("#theForm").attr('action');
 $("#theForm").attr('action',"/public/editor.php?action="+currentAction+"&element="+object);
 $("#theForm").attr('target',"editor");
 $("#theForm").submit();
}

<td 
        <input type="button" name="openEditor_activity" id="openEditor_activity" class="button" value="编辑" onClick="openWebEditor('activity')" />
        <textarea name="activity" id="activity" style="display:none;">{$vo.activity}</textarea>
 </td>

 /editor/文件夹在网络硬盘里。。。


 

  评论这张
 
阅读(131)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018