Credit @simon-jouet for his work from #77.
Implements #77 correctly - changing insertAction to alias wrapSelection instead giving more power to the implementer.