代碼如下
<?php echo dr_field_form([
'name' => '內(nèi)容',
'ismain' => 1,
'fieldtype' => 'Ueditor',
'fieldname' => 'content',
'setting' => array('option' => array( 'mode' => 3, 'height' => 220, 'width' => '100%', 'tool' => IS_PC ? '\'undo\', \'bold\', \'forecolor\'' : '\'undo\', \'bold\''), 'validate' => array('xss' => 1))
]);
?>
但是到了移動(dòng)端后發(fā)現(xiàn) 前端控制臺(tái)報(bào)錯(cuò)了 "Uncaught ReferenceError: baidu is not defined"
代碼是一樣的
<?php echo dr_field_form([
'name' => '內(nèi)容',
'ismain' => 1,
'fieldtype' => 'Ueditor',
'fieldname' => 'content',
'setting' => array('option' => array( 'mode' => 3, 'height' => 220, 'width' => '100%', 'tool' => IS_PC ? '\'undo\', \'bold\', \'forecolor\'' : '\'undo\', \'bold\''), 'validate' => array('xss' => 1))
]);
?>這個(gè)問題的出現(xiàn)是的時(shí)期是,我將移動(dòng)端和pc端分別給了不同的域名,就出現(xiàn)了這樣的結(jié)果
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@小黃人 18html

是這個(gè)嗎
回復(fù)@迅睿官方技術(shù)專家 我再移動(dòng)端其他頁面使用這個(gè)富文本編輯器是可以使用的但是只有這個(gè)頁面無法使用
pja.html模版
{if $member && dr_in_array(2, $member['groupid'])} <form action="" method="post" id="myform_comment" class="comment-form" style="box-sizing: border-box;"> {dr_form_hidden()} <input type="hidden" name="is_ajax" value="1"> <input type="hidden" name="catid" value="{$catid}"> <div id="respond-textarea"> <?php echo dr_field_form([ 'name' => '內(nèi)容', 'ismain' => 1, 'fieldtype' => 'Ueditor', 'fieldname' => 'content', 'setting' => array('option' => array( 'mode' => 3, 'height' => 150, 'width' => '100%', 'tool' => IS_PC ? '\'undo\', \'bold\', \'forecolor\'' : '\'undo\', \'bold\''), 'validate' => array('xss' => 1)) ]); ?> </div> </div> <button class="flex-col justify-start items-center button_6" id="comment_submit" onclick="dr_bbs_comment()" type="button" style="outline: none;border: none;color: #fff;font-size: 1.25rem; line-height: 1.22rem;width: 100%; margin-top: 15px;">發(fā)表</button> </form> {/if}開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@迅睿官方技術(shù)專家
問題我的pc端是可以通過ajax加載是可以的呀
pc端
pja.html
{if $member && dr_in_array(2, $member['groupid'])} <form action="" method="post" id="myform_comment" class="comment-form" style="padding: 0 15px; box-sizing: border-box;"> {dr_form_hidden()} <input type="hidden" name="is_ajax" value="1"> <input type="hidden" name="catid" value="{$catid}"> <div id="respond-textarea"> <?php echo dr_field_form([ 'name' => '內(nèi)容', 'ismain' => 1, 'fieldtype' => 'Ueditor', 'fieldname' => 'content', 'setting' => array('option' => array( 'mode' => 3, 'height' => 220, 'width' => '100%', 'tool' => IS_PC ? '\'undo\', \'bold\', \'forecolor\'' : '\'undo\', \'bold\''), 'validate' => array('xss' => 1)) ]); ?> </div> <p class="form-submit" style="margin-top: 20px; text-align: right; margin-bottom: 20px;"> <button class="color button dark_button medium button_4" id="comment_submit" onclick="dr_bbs_comment()" type="button" style="outline: none;border: none;color: #fff;font-size: 1.25rem; line-height: 1.22rem;">回復(fù)</button> </p> </form> {/if}那你就找個(gè)會(huì)前端人幫你看看是什么原因了
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!