Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[分享] 刚刚网上看到的DISCUZ后台调用编辑器的方法

[复制链接]
流泪的星星 发表于 2015-8-30 14:11:41 | 显示全部楼层 |阅读模式
刚刚网上看到的DISCUZ后台调用编辑器的方法这个问题困扰好久了,终于解决了


第一步加载js
  1. echo ' <script type="text/javascript" src="static/image/editor/editor_function.js"></script>  
  2. <script type="text/JavaScript">  
  3. function validate(obj) {  
  4.        edit_save();  
  5.     window.onbeforeunload = null;  
  6.     obj.form.submit();  
  7.     return false;  
  8. }  
  9. </script> ';  
复制代码
第二步自己折腾去吧
  1. showtablerow('', array('class="td27"', 'class="td28"'), array('内容:<textarea class="userData" name="content" id="uchome-ttHtmlEditor" style="height: 100%; width: 100%; display: none; border: 0px">'.$info['content'].'</textarea>'));  
  2.             showtablerow('', array('class="td25"', 'class="td28"'), array(" <iframe src='home.php?mod=editor&charset={CHARSET}&allowhtml=1&isportal=0' name='uchome-ifrHtmlEditor' id='uchome-ifrHtmlEditor'  scrolling='no' style='width:700px;height:400px;border:1px solid #C5C5C5;position:relative;' border=0 frameborder=0 ></iframe>",));  
  3.             showtablerow('', array('class="td25"', 'class="td28"'), array("<input id='submit_editsubmit' class='btn' type='submit' value='提交'  name='editsubmit' onClick='validate(this);'>"));  
复制代码


ccyours 发表于 2015-8-31 09:47:30 | 显示全部楼层
没看明白啊 大哥
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-5 07:13 , Processed in 0.089074 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表