Thalia
f8fbbdf66d
Make Ace Editor adjustSize method chainable
...
Change-Id: I48307bd9184bb238a553d178c0d66084244e9ebf
2015-12-19 10:57:04 +00:00
Thalia
3d98b1d291
Add autocomplete options to AceEditorWidget config options
...
Bug: T119549
Change-Id: I57db44c876c5cb0487bda6a72e36fedaccb532b5
2015-11-24 19:44:41 -08:00
jenkins-bot
8fae033411
Merge "AceEditorWidget: Ensure loadingPromise is set when setupEditor runs"
2015-11-19 16:47:13 +00:00
Ed Sanders
dbdae59128
AceEditorWidget: Ensure loadingPromise is set when setupEditor runs
...
Change-Id: I11d37b863f28bacd4c09992d6fcc180621766577
2015-11-18 23:11:10 -08:00
jenkins-bot
9f1aedbefc
Merge "Make selectRange method of AceEditorWidget focus the input"
2015-11-19 03:28:44 +00:00
Thalia
18448bb42b
Make selectRange method of AceEditorWidget focus the input
...
The selectRange method does this in TextInputWidget, so it
should here too.
Change-Id: Ib3851e0c72876d3c25ae5992cf9732637238d117
2015-11-18 19:14:50 -08:00
jenkins-bot
718e06cf1b
Merge "Add method to toggle the AceEditorWidget print margin"
2015-11-18 21:46:44 +00:00
Thalia
21fd89ba3c
Add method to toggle the AceEditorWidget print margin
...
Change-Id: I758f90abb92a91491237150f607e7b0f93bf8f85
2015-11-18 13:38:41 -08:00
Thalia
88d466ba23
Make focus method of AceEditorWidget chainable
...
The focus method of InputWidget and other descendants
of InputWidget is already chainable
Change-Id: Ib75fb7b08769e86c652c63dac069e2573e61f89a
2015-11-18 12:21:44 -08:00
Ed Sanders
a5d700807a
AceEditorWidget: Implement getRange
...
Depends on I109a666679 in OOUI.
Change-Id: Ie40a30a3743237c1c1cd59dd2165d313363e04cb
2015-11-18 03:32:54 +00:00
Ed Sanders
5e96050b48
AceEditorWidget: Implement selectRange
...
This is not trivial because Ace selections are
[column,row] tuples, so we need to translate to
one dimensional offsets.
Change-Id: I901b025b3747d61c74f49038fe4a65ed75758211
2015-11-17 23:39:33 +00:00
jenkins-bot
3e9d040a79
Merge "AceEditorWidget: Allow users to force an Ace editor refresh"
2015-11-16 22:46:24 +00:00
Ed Sanders
35c44db988
AceEditorWidget: Allow users to force an Ace editor refresh
...
Ace is clever about not updating the rendering of elements
which aren't visible, so allow users to force an update, for
example if they changed the value while the whole widget
was hidden.
Change-Id: I7bbbffd17489bc80fe5fa80911f29d7223e125a3
2015-11-16 12:12:10 -08:00
Ed Sanders
470a4a551b
AceEditorWidget: Refactor to ensure setValue runs synchronously
...
Also ensure setEditorWidget is only called once when
loadingPromise resolves.
Change-Id: I1a95bda5e9ff17d7575326f29fa01d273193c4a5
2015-11-16 11:36:08 -08:00
Ed Sanders
b21b939a67
AceEditorWidget: Emit resize event at end of cycle
...
Ensures the widget has taken its new size before emitting the event.
Bug: T117926
Change-Id: If1dab2ecadb2a581100c0ae154b341ce8d173a7c
2015-11-13 18:48:35 -08:00
Ed Sanders
6dd7576941
AceEditorWidget: Add method to clear undo stack
...
After the widget is initialised the caller will probably
want to clear the undo stack, so that the first state
is the initial value provided.
Bonus: Add documentation for the widget.
Change-Id: Ia331acc4177e32784061cae55c450eb0f83fd744
2015-11-03 13:41:09 -08:00
jenkins-bot
adb0c427ef
Merge "[PULL THROUGH] Remove resize detection now that TextInputWidget implements it"
2015-11-03 01:47:41 +00:00
Ed Sanders
e582fae840
[PULL THROUGH] Remove resize detection now that TextInputWidget implements it
...
This depends on the OOUI release which contains Iaadaf1f9f.
Change-Id: I24d3756d627fc3514d8b476f9af87fdecbaa1e09
2015-11-03 01:13:26 +00:00
Ed Sanders
bd22be33db
AceEditorWidget: Preserve selection on setValue
...
Also avoid calling setValue when the value hasn't changed
so as not to pollute the undo stack.
Change-Id: I07fc5db0480a8583b361d472723f863ca90046f7
2015-10-30 16:14:09 +00:00
Ed Sanders
def886b845
AceEditorWidget: Make setters chainable and support invalid flag
...
Change-Id: I78f395459f526164c0c506beec62a0083817e64b
2015-10-27 19:02:17 +00:00
Ed Sanders
35b9c4119a
AceEditorWidget: Use mw.loader#getState instead of private moduleRegistry
...
Change-Id: I845651af837ccc042b6193876e17ba2b571dfe9c
2015-10-26 09:31:37 +00:00
Ed Sanders
21aec73795
AceEditorWidget: Use showLineNumbers instead of showGutter
...
The gutter is still useful even if line numbers are hidden.
Change-Id: Ia85ce7cd4987eb0b7022dc35cfd1029fbe78e3dc
2015-10-23 00:04:57 +01:00
Ed Sanders
60c1ee7d56
Introduce Ace editor widget
...
The widget attempts to load the ext.codeEditor.ace.modes module
and if it fails, will fall back to regular TextWidget behaviour.
Bug: T49742
Change-Id: Ie483f6eba25e3732a396c18decc0e1844b806b23
2015-10-21 20:59:08 +01:00