Depends on I30bd709d8 in mediawiki-core.
The '#wpTextbox1' gets read by textSelection( 'getContents' ).
The trigger is not necessary anymore.
Change-Id: Iae54a2422ff1814f8858723d51fcb10d04645c51
There isn't much in it yet, but it's a start.
Also needs a patch in WikiEditor, which is forcing some elements to be
visible for no apparent reason.
Change-Id: I6b57e5c11066a104a89bef3b7c8efd2129a80a8f
Split context.evt up into 2 objects
- context.fn, where WikiEditor API functions are defined
- textSelectionFn, where all textSelection API function are defined.
- scrollToTop() is moved to the WikiEditor API block
- getElementAtCursor() is removed. It is no longer in use by the
WikiEditor API or the textSelection API.
This depends on MediaWiki core change I14492572
Bug: 29328
Change-Id: I57bc7791dc61b7edcf258e6c16445d5a4a8783cf
Follows-up 86622b6.
While these functions looked like placeholders in a configuration
object to allow calling them unconditionally, they actually had
meaning. They were event overrides to prevent WikiEditor from
running its own event handlers.
They were implicitly returning false by having no return statement
(implying a 'return undefined', which casts to false).
The separate functions were already quite obfuscated as returning
false, using $.noop made it even harder to understand what's
going on.
Use an explicit return value instead.
Change-Id: I0852fbc9225d069f50085787d2d0105fd7b1743c
This makes it so that if you do not have WikiEditor enabled, you also
will not have CodeEditor enabled. In the feedback we have seen so far,
this seems to be desirable for those users (bug 55936).
Also people were not able with the cookie pref for the editor, because
it can easily expire. This introduces a hidden pref, controlled by the
enable/disable CodeEditor button, to preserve this value instead (bug
46779).
It also gives a more reliable way to detect if the editor is enabled or
disabled. mw.user.options.get( 'usebetatoolbar' ) and
mw.user.options.get( 'usecodeeditor' ) combined should be able to convey
this information to something like WikEd (bug 62250).
Bug: 46779
Bug: 62250
Bug: 55936
Change-Id: I4639f68c00a2b9183a6f89b5e00983c07a8592a2
IE8 uses innerText, which is a bit more sloppy with line ending
preservation than other browsers are. Instead of copying the value into
the DOM and have the Editor pick it up during init, just set it directly
on the EditSession. Should even be faster.
Bug: 64559
Change-Id: Iafbb07afb6d06ed94057f8ddf8b080fd136d7fb3
Updates ACE to commit: 4949e18f00e4dbf34fc8a213909ef6ae3e1a1015
This includes fixes for IE7/8 support, which was broken in the last ACE
release. Specifically
051128c16f (diff-502b909e9de186749df3051f8d4bfa42L137)
Bug: 64559
Change-Id: I0765c5f95de81a5ce9632f6eb5422b98c02941ff