disable adding of <p></p> tags in fckeditor

孤人 提交于 2019-12-07 11:55:22

问题


how to disable automatic adding of <p></p> tags in Fckeditor.

When i try to get any post data from fckeditor, it gives me the data wrapped in

how do i remove/disable those <p></p>

Thanks in advance for any suggestions and reply


回答1:


Too late, but will help others reaching this page via search engines, like I found it.

<?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();
?>

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




回答2:


Adding to the previous answer, If you're using ColdFusion rich text area (which used fckeditor), you can disable the <p> tags by setting EnterMode to br in fckconfig.js



来源:https://stackoverflow.com/questions/3339319/disable-adding-of-p-p-tags-in-fckeditor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!