Cant disable fckEditor on edit sections of specyfic content type...

Bazin - July 18, 2008 - 10:23
Project:FCKeditor - WYSIWYG HTML editor
Version:6.x-1.3-beta2
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

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

#1

Jorrit - July 18, 2008 - 11:33
Status:active» postponed (maintainer needs more info)

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

#2

Bazin - July 18, 2008 - 12:06

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

#3

Bazin - July 18, 2008 - 12:09

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

#4

Jorrit - July 18, 2008 - 15:03
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.

#5

Bazin - July 19, 2008 - 09:14

Yes. When can I expect this future release?

#6

wwalc - July 31, 2008 - 13:03
Status:postponed (maintainer needs more info)» duplicate

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

#7

MGN - August 5, 2008 - 12:42

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.

#8

grub - September 22, 2008 - 11:47

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.

#9

Summit - December 18, 2008 - 14:02

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

#10

wwalc - December 18, 2008 - 14:05

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

#11

Summit - December 18, 2008 - 14:40

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

greetings,
Martijn

#12

wwalc - December 18, 2008 - 14:46

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.

#13

Summit - December 18, 2008 - 15:31

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

#14

Karl L. - January 12, 2009 - 17:25

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.

#15

sjlacroix - January 19, 2009 - 22:06

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.

#16

vivianspencer - February 3, 2009 - 14:44

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

<?php
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

<?php
$form
[FIELD]['#wysiwyg'] = false;
?>

cheers

#17

jconnery - June 2, 2009 - 09:43

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.

#18

nachenko - August 26, 2009 - 11:55

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?

#19

rho_ - November 4, 2009 - 00:07

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

 
 

Drupal is a registered trademark of Dries Buytaert.