6

Okay, I have set all content editing for admins on full html in drupal 7. I have also enabled wysiwyg and ckeditor. All is good, except I just want plain text and no ckeditor for the comments sections but want to allow automatic converting of links on it. How do I fix this? thanks guys.

3 Answers 3

2

Two settings control which text format is used for posting content: permissions and the order of the text formats. The first format a user has permissions for is used. Since administrators have permission to use the Full HTML format, if it is listed first under admin/config/content/formats it will be used by default - and if it's configured with a WYSIWYG profile, that too wil be used.

Better Formats (already partly in D7 core) will give the possibility to configure which text format is used per content type / comments (so you can assign a text format without WYSIWYG profile). Unfortunately, it is not yet ready for Drupal 7. So at the moment you cannot (AFAIK) configure whether or not to use the WYSIWYG without (manually) chosing different input formats (or custom coding). Some workarounds:

  • You could list Filtered HTML first and not assign it a WYSIWYG profile. You'll have to select Full HTML for each post where you do want to use it.

  • Or you could configure comments to use plain text. This leaves you without link parsing however (for Article: Structure > Content types > Article > Comment fields: text processing (plain text or filtered text).

  • Or you can set the WYSIWYG editor to disabled by default, and toggle it active when you do want to use it. Then start using Better Formats when it's ready.

On a side note, it's better not to use Full HTML by default - even with trusted users, just to avoid mistakes. It would be better to create an extra text format and configure the HTML Filter with an extended set of HTML tags.

Edit: I wanted to use something like this myself. You can (temporarily) use a custom module like this to automatically set the text format for node or comment bodies. So, adapt this example code for comment_body and set to filtered_html (or another format not configured for WYSIWYG) and you'll also have link parsing.

2
  • Great. I guess this works for me in this situation for now. It's just easier to set comments to plain text. Thanks!
    – wolverene
    Commented Jan 4, 2012 at 7:03
  • @wolverene also see my edit above
    – arjan
    Commented Jan 11, 2012 at 0:34
2

I've always got on well with the Better Formats module, which allows complete control of input formats per type (comment/block/node), role and content type.

Others have answered this too, have a look at these:

1

In Drupal 7

  1. Go to your content type and click on the "Comment fields" button.
  2. Edit the comment_body field
  3. Select the "Plain text"

The url to get to comments for your content type will be (if you have comments enabled for that type)

admin/structure/types/manage/[YOUR CONTENT TYPE]/comment/fields

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.