At the moment form_alter implementation in htmlarea expects #parent to be set for #tree => TRUE widgets. This has failings for two reasons. First, the Form API element for parents is actually #parents. Second, #parents is generated in the form_build() stage of form generation, which happens to be _after_ form_alter hooks are called. As a result #parents is never set.

I've patched the form_alter implementation to take a third optional argument: an array of parents. This will allow #tree widgets to have WYSIWYG textareas.

Comments

sammys’s picture

StatusFileSize
new1.39 KB

Ok... the patch I submitted before broke the non-tree textareas. Here is an updated version which works for both.

gordon’s picture

Status: Needs review » Fixed

Thanks

Anonymous’s picture

Status: Fixed » Closed (fixed)