Parag
Parag

Reputation: 4812

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

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

Upvotes: 3

Views: 4795

Answers (2)

Vaishak Suresh
Vaishak Suresh

Reputation: 5855

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

Upvotes: 0

Tainder Singh
Tainder Singh

Reputation: 76

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/

Upvotes: 6

Related Questions