Combine in a form one textarea without htmlarea and one with htmlarea

Combine in a form one textarea without htmlarea and one with htmlarea

by Manfred Burkardt -
Number of replies: 2
Is it posible to combine in the same custom form textarea's with htmlarea and textareas without htmlarea?

I have a form with 3 textareas fields and I want the wysiwyg editor to be activated only in 2 of them but it always show up in all three.

I tried:
    <textarea cols="20" rows="10" name="rangos_cp"><?php echo rangos_sql2text($rangos_cp); ?></textarea>

and I tried:
    print_textarea(false, 20, 50, 600, 200, "rangos_cp", rangos_sql2text($form->rangos_cp),1); ?>

but in both cases htmlarea is activated.

Thanks in advance for your help.
Manfred
Average of ratings: -
In reply to Manfred Burkardt

Re: Combine in a form one textarea without htmlarea and one with htmlarea

by Janne Mikkonen -
Yes you can have textarea's in same page with htmlarea. The key is that you have to add a textarea id attribute name to use_html_editor (for that textarea where you want to load the editor) function. This will load the editor only onto textarea which id value you put as a parameter, like:

if ($usehtmleditor) {
    use_html_editor('id_of_textfield');
}

If you leave out the name parameter then the editor is loaded in every textarea in that page.

- Janne -
In reply to Janne Mikkonen

Re: Combine in a form one textarea without htmlarea and one with htmlarea

by Manfred Burkardt -
Thanks Janne, this works perfect.
Manfred