discuz开发文档_html编辑器

(1) 2024-08-21 08:23

Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说
discuz开发文档_html编辑器,希望能够帮助你!!!。

纠结了两个晚上,一个白天,无数次的Google,无数次的baidu,依旧没搜到合理的方案,奇怪难道没人有这个需求吗??好在功夫不负有心人,终于解决了!!discuz开发文档_html编辑器_https://bianchenghao6.com/blog__第1张

但是有个缺憾是无法使用图片上传功能。。但是也算不错了!有谁能解决得了这个图片上传的功能,还请分享~~~discuz开发文档_html编辑器_https://bianchenghao6.com/blog__第2张

下面分享一下解决方法!discuz开发文档_html编辑器_https://bianchenghao6.com/blog__第3张

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>'));
			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>",));
			showtablerow('', array('class="td25"', 'class="td28"'), array("<input id='submit_editsubmit' class='btn' type='submit' value='提交'  name='editsubmit' onClick='validate(this);'>"));

提交时候的那个js触发是关键,不然编辑器里的值是没办法传递的!

需要提前加载js调用

echo <<<EOT <script type="text/javascript" src="static/image/editor/editor_function.js"></script> <script type="text/JavaScript"> function validate(obj) { edit_save(); window.onbeforeunload = null; obj.form.submit(); return false; } </script> EOT;

本帖永久访问地址:discuz 二次开发后台调用编辑器的方法!

综上!over!如果我的方法解决了你的问题,希望回个贴哦!!

如需转帖请注明出处哦!!谢谢!discuz开发文档_html编辑器_https://bianchenghao6.com/blog__第4张

今天的分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。

上一篇

已是最后文章

下一篇

已是最新文章

发表回复