I am replacing the inner html in a textarea in a form, and find that neither

ajax_command_html($selector, $content) nor
ajax_command_html($selector, array($content))

work because both wrap the $content in 'div' tags.

However, ajax_command_invoke($selector, 'html', array($content)), which I would think would be doing the same thing, DOES work.

I have read comments about extra 'div' tags being inserted, so I also cleansed my content with str_replace, but that didn't help fix the problem.

Comments

wdseelig created an issue. See original summary.

wdseelig’s picture

Issue summary: View changes
wdseelig’s picture

Issue summary: View changes

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.