jquery.textSelection: Implement 'encapsulateSelection' in terms of the other commands
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 5 Feb 2018 22:44:05 +0000 (23:44 +0100)
committerJforrester <jforrester@wikimedia.org>
Wed, 7 Feb 2018 18:54:15 +0000 (18:54 +0000)
commitce6be3292e7d44d06f0aba8b98fbbbab80c5630c
tree619d2fde49e1a392aa5d0e55ae02d6e2e38e42f4
parent5db74eb56e425ba803b2cc936fbe3e5cc219b482
jquery.textSelection: Implement 'encapsulateSelection' in terms of the other commands

Any users of jquery.textSelection that add an alternative API using
'register' no longer have to override 'encapsulateSelection' (which is
a big beast), as long as the other commands are implemented.

Bug: T185917
Change-Id: I39bbbce20336a1286a07bf8032acdfb8a7e0cdb6
resources/src/jquery/jquery.textSelection.js