diff --git a/wysiwyg.module b/wysiwyg.module index c788d72..1e3f951 100644 --- a/wysiwyg.module +++ b/wysiwyg.module @@ -131,6 +131,16 @@ function wysiwyg_process_form(&$form) { // The element before this element is the target form field. $field = &$form[$children[$index - 1]]; + // Allow modules to programmatically enforce no client-side editor by + // setting the #wysiwyg property to FALSE. + if (isset($field['#wysiwyg']) && !$field['#wysiwyg']) { + // A 'format' element should not have any child elements that may + // need processing, so it should be safe to skip the recursion that + // happens at the end of this function, and move on to the next + // element on the same level. + continue; + } + // If this textarea is #resizable and we will load at least one // editor, then only load the behavior and let the 'none' editor // attach/detach it to avoid hi-jacking the UI. Due to our CSS class