HI all,
I have a textarea that must have some code pasted into it. I want the textarea to be a normal html textarea element and not a rich text editor element. If the user has a rich text editor installed this just takes over your form elements. I have tried overwriting the hijacked textarea in the form_alter hook but this doesn't work.
function mymodule_form_alter($form_id,&$form){
if ($form_id!="mymopdule_add_edit") return;
$form['area1']=array(
'#type'=>'textarea',
'#title'=>$form["area1"]["#title"],
'#default_value' =>$form["area1"]["#default_value"],
'#rows' =>17,
'#required' => TRUE);
}
But the rich text editor takes over anyway :( How can I prevent this from happening?
Regards
Mark
Comments
How to disable rich text editor
add this element to the array:
$form['area1']=array(
...
'#attributes' => array('class' => 'mceNoEditor'),
..
)
Then tinymce will be disable for this textarea.. but
I dont know how to delete the message "disable rich-text"..
that already appears...
Anyone have an idea ?
Hide "disable rich-text" message
To hide the message "disable rich-text" or "enable" I simply put:
... #wysiwyg4name-of-your-field {
display: none;
}
in the style.css.