Hi,

The problem is that I have lets say Geshi Filter and I want to ad code in form it is written. I then disable page of lets say code/* for fckEditor but when I want to EDIT this field (which is what i have to do becouse the fckEditor adds some extra characters to code like "&gt" etc) I would heve to add separate rule for every node (WHICH is nightmare) or can block every EDIT for all content types.

How to disable the fckEditor just for a one content type EDIT textarea?

Thanks for support in advance

Comments

Jorrit’s picture

Status: Active » Postponed (maintainer needs more info)

You're saying that you want to disable FCKeditor just for specific node types?

Bazin’s picture

No, not the node types the EIDIT text area of specific node type...

Bazin’s picture

The node type can be disabed by instaling the custom url module and removing the specific url for a content type from the FCKeditor. The problem is with the edit text area of such content type. Becouse the url module dont call the edit part a separate url format and therefore not able to distinguish form textareas of othe content types

Jorrit’s picture

Priority: Critical » Normal

I think I get what you mean. You want to disable FCKeditor on node/xxxx/edit but only for a one node type? This is being considered for a future release.

Bazin’s picture

Yes. When can I expect this future release?

wwalc’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Sounds like a duplicate of #268070: Assign editor-profiles to content types. We'll try to add this feature in 6.2.

MGN’s picture

You can do this by disabling FCKeditor by html id to exclude a specific (custom) field type (field exclusion rather than path exclusion). I created a custom content type for a wiki page (uses the Pear Wiki filter) that is an exact duplicate of a page, removed the body field, and added a custom text field to replace it (with a field name of field_wiki_body). To turn FCKeditor off for this content type, I added edit-field-wiki-body-0-value to the 'fields to the exclude' section of the editor's visibility settings. This is working fine for me. FCKeditor is disabled for users who want to create wiki pages and those who want to use the editor it can do so by creating (standard) pages. My only problem is that I have to ask my users to select the right input format for the content type. It would be better if I could set a default input format for specific node types, but that's another story.

Anyway, I hope this helps.

grub’s picture

It looks like this feature has been added to the CVS version of 6--2: http://drupal.org/node/268070#comment-980275

You can set default input formats for specific node types using the filterbynodetype module. If you are looking for a 6.x version try http://danielepighin.net/cms/software or this patch http://drupal.org/node/221424.

UPDATE: It doesn't look like filterbynodetypes supports CCK fields in 6.x, a patch is available for 5.x via http://drupal.org/node/152592.

Summit’s picture

Subscribing, needing a per contenttype disbale setting for Fckeditor, greetings, Martijn

wwalc’s picture

@Summit - this feature is available in 6--2 / 6.x-2.x.

Summit’s picture

Hi,
Sorry Wiktor , How then please?
Thanks a lot in advance for explaining how.

greetings,
Martijn

wwalc’s picture

Edit FCKeditor profile, in "Fields to exclude/include:" it is possible to use the following format:
content_type@path.element_id
for example
blog@*.edit-body - matches all fields of type "blog" called edit-body, on any page.

Summit’s picture

Thanks Wiktor! And good holidays to you!
Greetings,
Martijn

Karl L.’s picture

Hi, I tried to use that syntax

blog@*.edit-body

to de-activate fckeditor for a certain content type's main edit field.

As a test I tried

page@*.edit-body

I added it into "Fields to exclude/include:" in the Advanced Profile (settings/fckeditor/edit/Advanced).

I received an Error: "Ungültige Feldangabe: page@*.edit-body" (Translation: "Invalid Field Information: page@*.edit-body")

So it doesn't work for me on D6.6 and fckeditor.module 6.x-1.3-rc6.

What am I missing?

Best regards! Thanks,

Karl

UPDATE: OK - I missed that this syntax already was ment to work with version 6.x-2.x.

sjlacroix’s picture

FYI For anyone that can implement hook_form_alter().

If you want to disable it on a specific field for a specified nodetype, like for example on the body field of the geshinode type, use this:

if ($form['type']['#value'] == 'geshinode') {
     $form['body']['#wysiwyg'] = false;
}

This is tested in version : fckeditor.info,v 1.1.2.1.2.1

Line 819 of fckeditor.module.

vivianspencer’s picture

I had to use the following to get it to work:

if ($form['type']['#value'] == faq) {
     $form['body_filter']['body']['#wysiwyg'] = false;
}

I found that this works with any field you attach it to in the $form array, for example

$form[FIELD]['#wysiwyg'] = false;

cheers

jconnery’s picture

Has this feature made any progress? I'm also running into this issue and would like to know an official way to address it.

Thanks to anyone who knows.

nachenko’s picture

I'm looking for a programmatic way to deactivate FCKeditor in some fields. I tried vivianspencer (#16) suggestion but no luck using FCK module 1.4. I implemented my own hook_form_alter, and used dprint_r to be sure i'm inserting the data in the form, but no luck so far.

I of course could hack the module but I'd prefer not to, and updating the module sounds risky for a production site.

Any suggestions?

rho_’s picture

It worked for me using vivianspencer (#16) suggestion with some slight modifications. Again this is in a hook_form_alter()

<?php
  if($form['type']['#value'] == 'my_content_type') {
    $form['body_field']['body']['#wysiwyg'] = false;
  }
?>

Using FCK module 1.3 and D 6.14