[drupal-devel] [feature] 2 additional hooks to form_textarea
to support module writers who are extending it.
Gordon Heydon
gordon at heydon.com.au
Sun Mar 6 11:30:59 UTC 2005
Hello,
Please put this back on the drupal.org, and just so you know, if you
have 4 parameters in the textarea, then it multiplies by 4 for each
implementation of the hook.
2 modules, 8 function calls, 3 modules, 12 function call and so on.
Gordon.
On Sun, 2005-03-06 at 10:45 +0000, Julian Bond wrote:
> gordon <drupal-devel at drupal.org> Sun, 6 Mar 2005 10:17:35
> >I do not think that these 2 additional hooks are needed. This will
> >really add alot of additional overhead as it is going to call every
> >textarea hook 4 times for every textarea on a page. Besides these
> >modifiaction can be handled better and cleaner in the javascript. If
> >you take a look at Xinha/HTMLArea or FckEditor they both manipulate the
> >dom once the page has loaded, and not during. This is a much better and
> >cleaner method as it means that you can attach to any textarea with
> >only a few commands.
> >This is what javascript excels at. So I don't think this is needed.
>
> I'd agree with you, perhaps, about the attributes tag. I don't think I
> agree about "post-title". I think it's highly likely that a module would
> use "pre" or "post-title" but not both.
>
> And since these are all in memory hooks I hardly see that calling 4
> module hooks instead of 2 is going to make any performance difference at
> all, at all.
>
> Following your logic there's no need for "pre" either, because you can
> implement that in javascript from "post".
>
> Better and cleaner? I find php a hell of a lot easier to code and debug
> in than Javascript. But then that's just me.
>
--
Gordon Heydon <gordon at heydon.com.au>
More information about the drupal-devel
mailing list