crx349 發表於 2019-6-8 17:31:21

Discuz! 发帖换行兼容方案(换行丢失问题解决)

Discuz!在发帖时,经常出现回车换行失效<br /><br />故障解决<br />找到static/js/bbcode.js<br />搜索<br /><ol><li>if((allowhtml &amp;&amp; fetchCheckbox('htmlon')) || trim(str) == '') {<br /><li>&nbsp; &nbsp; for(i in EXTRAFUNC['html2bbcode']) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;EXTRASTR = str;<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;try {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;eval('str = ' + EXTRAFUNC['html2bbcode'] + '()');<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;} catch(e) {}<br /><li>&nbsp; &nbsp; }<br /><li>&nbsp; &nbsp; str = str.replace(/&lt;img[^&gt;]+smilieid=([&quot;']?)(\d+)(\1)[^&gt;]*&gt;/ig, function($1, $2, $3) {return smileycode($3);});<br /><li>&nbsp; &nbsp; str = str.replace(/&lt;img([^&gt;]*aid=[^&gt;]*)&gt;/ig, function($1, $2) {return imgtag($2);});<br /><li>&nbsp; &nbsp; return str;<br /><li>}</ol><br /><br />添加<br />换行<em>, </em>Discuz<em>, </em>发帖<em>, </em>解决<em>, </em>经常

allthebest 發表於 2019-6-8 18:04:55

先勾选 纯文本 才写帖<br /><br />没有换行问题

chen-johnso 發表於 2019-6-8 21:35:52

发帖换行兼容方案

开发者 發表於 2019-6-8 22:49:07

这个问题确实需要解决。

刘先生 發表於 2019-6-8 22:59:30

希望能够在Git上提交

wk2012 發表於 2019-6-9 20:59:17

看看 发帖换行兼容方案

87669585 發表於 2019-6-9 21:19:02

发现这个问题了

87669585 發表於 2019-6-9 21:20:09

添加在代码后面吗?

rongshu8 發表於 2019-6-9 22:28:28

故障解决<br />找到static/js/bbcode.js
頁: [1]
查看完整版本: Discuz! 发帖换行兼容方案(换行丢失问题解决)