[drupal-devel] Textarea editor hooks
Gabor Hojtsy
gabor at hojtsy.hu
Mon Jan 17 17:46:27 UTC 2005
>>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...
>
> I use
> $output = form_something() etc.
>
> Off course I can use a bloated javascript to place it somewhere else. Hell, i
> can probaly even include a HUGE javascript to move my whole DOM around. But
> who needs the info /before/ the title? No-one, i guess. So why not move
> it /after/ ?
Huge javascript:
ta = document.getElementById('edit-body');
ta.setAttribute('...', '...');
toolbar = document.createElement('div');
ta.insertBefore(toolbar);
What is the purpose? You are about to add quicktags editors above all
textareas, right? Are you about to add the HTML tags for those toolbars
above all textareas literally into the HTML code, to avoid 'bloated HUGE
javascript'? If you add it once, and are not doing to bloat the HTML
code, you still need to move and/or copy around as needed with
JavaScript, which still need the same procedure as above. If you add one
instance, then the createElement will be replaced with getElementById,
right.
Goba
More information about the drupal-devel
mailing list