#4939: Use different events to trigger expansion.
Merge pull request #5129 from openscholar/4939-refactor

Use different events to trigger wysiwyg expansion.