【问题标题】:disable adding of <p></p> tags in fckeditor禁止在 fckeditor 中添加 <p></p> 标签
【发布时间】:2011-03-21 08:08:55
【问题描述】:

如何在 Fckeditor 中禁用 &lt;p&gt;&lt;/p&gt; 标签的自动添加。

当我尝试从 fckeditor 获取任何帖子数据时,它会给我包装在

中的数据

我如何删除/禁用那些&lt;p&gt;&lt;/p&gt;

提前感谢您的任何建议和回复

【问题讨论】:

标签: fckeditor


【解决方案1】:

为时已晚,但会帮助其他人通过搜索引擎访问此页面,就像我找到的一样。

<?php
include_once('fckeditor/fckeditor.php');
$oFCKeditor = new FCKeditor('description');
$oFCKeditor->BasePath = '/fckeditor/';
$oFCKeditor->Value = 'some text';
$oFCKeditor->Config['EnterMode'] = 'br'; // turn off auto <p> tags wrapping content
$oFCKeditor->Create();
?>

参考http://www.tequilafish.com/2008/09/12/fckeditor-remove-p-tags-from-wrapping-your-content/

【讨论】:

    【解决方案2】:

    添加上一个答案,如果您使用 ColdFusion 富文本区域(使用 fckeditor),您可以通过在 fckconfig.js 中将 EnterMode 设置为 br 来禁用 &lt;p&gt; 标签

    【讨论】:

      猜你喜欢
      • 2012-06-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-30
      • 2014-05-07
      相关资源
      最近更新 更多