Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I know it's been labeled an improvement that you don't need to turn CKeditor on/off via text area ID, but I would really like to disable it for comments, even for authenticated users. I would like to allow users to create nodes using CKeditor but only be able to comment (or, by default be able to comment) in filtered HTML. Is this possible?
Comments
Comment #1
mkesicki CreditAttribution: mkesicki commentedHi,
I think that your issue is related to #1063986: Allow user to choose which textarea is enable by default. So I close it (as duplicate). If you need something more (not described in mentioned ticket) please reopen this issue.
Comment #2
flexer CreditAttribution: flexer commentedI have the same issue: it seems not possible (or not easy) to disable CK from the comment textarea.
Comment #3
xl883c CreditAttribution: xl883c commentedI think the answer you are looking for is right here:
http://drupal.org/node/1157740
Comment #4
mattbk CreditAttribution: mattbk commentedI'd rather enable filtered HTML than only allow Plain Text, but this is not possible.
Comment #5
vlajkop CreditAttribution: vlajkop commentedmattbk,
It is possible to disable CKeditor for comments fields, just it is a few steps process. Trick here is in setting new text format in Configuration > Content authoring > Text formats.
For my drupal 7 installation I created here new html filtered text format and name it "Filtered HTML for Comments". Important here is to put this new text format in first place in grey box that lists all text formats in bottom part of Configuration > Content authoring > Text formats. Since it is just created your installed CKEditor doesn't have profile for it. Also first place means that is going to be first selection for posting into input fields.
Now all you have to do is to set permissions for text formats. My setting is next:
Filtered HTML is changed from default so it can be used only by administrator.
Downside of this is that "Filtered HTML for Comments" is going to be used as default input format for all other fields unless you remove administrator permission from this text format.
Unfortunately setting input field default under Home » Administration » Structure » Content types » Article » Comment fields just don't work in drupal 7.8.
Playing with permissions and order in Home » Administration » Configuration » Content authoring » Text formats worked for me to enable filtered html format for comments and disable CKEditor for authenticated and anonymous users.
Please note that this solution will be applied everywhere in drupal even when you creating content as administrator. You will need to switch to Full HTML to get CKEditor for text input fields unless you remove administrator from permissions from "Filtered HTML for Comments" text format.
Hope this is helpful and what you were looking for. If you find better solution please let me know.
Comment #6
k8 CreditAttribution: k8 commentedvlajkop,
The following is true also in drupal 7.9 but probably because of the setting under "Text Processing" earlier in the Comment field for the content type to be "Filtered text (user selects text format)". Yes, one would expect to be able to set the default Input filter here - separate issue - where should this be entered as an issue?
Edit the comment_body field under Comment field tab. Under "Text Processing", set it to be "Plain text" and CKEditor goes away.
From #5 comment:
Unfortunately setting input field default under Home » Administration » Structure » Content types » Article » Comment fields just don't work in drupal 7.8.
Comment #7
biblos CreditAttribution: biblos commentedI find a way to disable CKEditor for defined one field without hacking module, using hook_form_alter in your module.
Comment #8
stevieegee CreditAttribution: stevieegee commentedI find the $form_id to use hook_form_FORM_ID_alter(). Then you can target each content type if needed. The $form['#after_build'] removes all the information about text formats.