[drupal-devel] Textarea editor hooks

Gabor Hojtsy gabor at hojtsy.hu
Mon Jan 17 16:11:30 UTC 2005


>>>1. Textarea, pre really needs to be between the title and textarea of
>>>the form_item. textarea extensions are very likely to add a toolbar
>>>and this really ought to be hard against the top of the textarea
>>>rather than floating above the title.
> 
> This gets a +1 from me. IT makes no sense to have it called befire the title. 
> Quicktags needs it after the title too.

Why? It is javascript, isn't it? Do you still use document.write()? It 
should not be used in XHTML, it is actually not possible to 
document.write() anything into a real XHTML document! If the answer is 
no, and you use DOM, then it does not matter, where is that hook...

>>>2. I need a way of adding extra $attributes as part of the module code
>>>and can't see an easy way of doing this without making $attributes
>>>global. Suggestions?
> 
> I think a small patch that takes $arguments from hook_texarea()-returns and 
> merges these into the (optional) existing $arguments will make sense. 

All form elements in Drupal already have ID attributes, which makes then 
extremely easy to get from JavaScript (and add attributes).

Goba



More information about the drupal-devel mailing list