Currently one cannot tell the general difference between forms text areas that are intended to be drupal content, and forms text areas that are meant to be text separated lists. This causes problems for general javascript widgets to apply to forms.

I recomend adding a standardized attribute called something like '#datatype' that has the default list of standardized values that module developers. The '#datatype' attribute would be used by modules to theme differently, validate differently, etc., as well as implementing possible data type validations.

Use of the forms API modification would look something like:

$form['format'] = array('#type='textarea' , '#name'=> 'my_css_field', '#datatype' => 'css', '#type' => 'text_area');
$form['message'] = array('#type => 'textarea' , '#name' => 'my_body_data', '#datatype' => 'html');
$form['body'] = array('#type => 'textarea' , '#name' => 'my_body_data', '#datatype' => 'filteredcontent');
$form['component'] = array('#name' => 'issue_component' , '#datatype' => 'textlist' ); 

Note that this is not about whether drupal needs an html editor, but would support development of modules that hook into forms validation to know when to display one. For example integrating CSS editors into the theme editor for inline CSS, xhtml or html data validators that we don't want to validate all the of the data.

This should go into core so that module developers standardize on a form data dictionary language. It's not important what values are used, but it is important that we all use the same values.

In the future these might be supplemented with data forms validation procedures for these datatypes, but that's not important now.

We would go through core code and make sure these attributes are set consistently.

Comments

pwolanin’s picture

Should we mark http://drupal.org/node/81297 as duplicate and direct follow-ups here?

chx’s picture

Status: Active » Postponed

See Adrian Roussow's FAPI3 presentation at http://drupal.org/node/86535

metzlerd’s picture

That makes sense. I didn't really expect it to happen in 5.0. I read the presentation, and am very interested in how this gets done. The way I read it it "could" work depending on how forms api is being developed. Is there another issue that I should monitor to hear more of this discussion?

chx’s picture

Not yet. For more information, at this time, you likely would need to eavesdrop on benton (Adrian's laptop :) ).

lilou’s picture

Version: x.y.z » 7.x-dev

This feature is still actual ?

Anonymous’s picture

Status: Postponed » Closed (won't fix)

Since there hasn't been much support for this in 4 years, going to close.