加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – 停止CKEditor删除div

发布时间:2020-12-13 18:06:00 所属栏目:PHP教程 来源:网络整理
导读:我在我网站的后端安装了CKEditor. 从代码视图切换到wysiwyg视图时,我遇到了以下问题. 我插入的代码如下: div class="span4" pSome text here/p/div 当我切换回查看模式时,CKEditor会自动删除段落周围的div. 任何人都可以帮我解决这个问题吗?我不介意留在代
我在我网站的后端安装了CKEditor.
从代码视图切换到wysiwyg视图时,我遇到了以下问题.
我插入的代码如下:
<div class="span4">
    <p>Some text here</p>
</div>

当我切换回查看模式时,CKEditor会自动删除段落周围的div.

任何人都可以帮我解决这个问题吗?我不介意留在代码视图中,但我喜欢在视图模式下工作来编写更长的文本.

提前致谢.

而不是禁用ACF功能,请使用 config.extraAllowedContent:
editor.config.extraAllowedContent = 'div(span4)';

要么

editor.config.extraAllowedContent = 'div(*)';

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读