Commit graph

14 commits

Author SHA1 Message Date
Ed Sanders 16211cdc09 Abstract API calls to 'parsefragment'
Change-Id: Id0be3207219a6d93cebff2b6b5061cd24898d5cb
2018-04-06 13:49:16 +01:00
James D. Forrester 0a7a845a42 doc: Bump copyright year
Change-Id: I0b299c840ede1a1b8552cecfc70c5760ab036181
2018-01-03 17:45:07 +00:00
Ed Sanders 88e8a9f7a7 Convert empty doc to empty string in convertToSource
Change-Id: I8753169ff206b5ce23cfd4c0dc7f97ac6fd1fff0
2017-11-04 21:16:35 +00:00
Ed Sanders 1b8f8d8908 Replace wg(Relevant)PageName with target#pageName
The default value of target#pageName is wgRelevantPageName
but other targets my override this, or change it dynamically
(e.g. ContentTranslation).

Also remove duplicate setter of pageName in mw.ArticleTarget,
already set in mw.Target.

Change-Id: Iebd1def1d4142978a673afec584a0b663644d176
2017-09-26 13:22:00 +01:00
James D. Forrester 6fd475e8ec MWWikitextSurfaceFragment#convertFromSource: Don't make an invalid doc
Though neat, this hack to get the internal list doesn't seem to be used
and creates an invalid document (just an internal list with no content,
so the internal list is at the start and the default selection position
is inside it). Instead, use the ve.dm.Document.static.newBlankDocument()
utility function that was made for this use case.

Bug: T153509
Change-Id: Iba5931cb5e3f939a803c1d59fa0d8f30a0513f84
2017-03-02 05:43:03 +00:00
James D. Forrester 122f49b2dd build: Bump file copyright notices for 2017
Change-Id: I3c20809e71cc0da58123e1b5f29c4f3aac945496
2017-01-03 08:58:33 -08:00
Ed Sanders 854256bb8e Use deep clone for empty convertFromSource
Bug: T153254
Change-Id: I0dc6be0d20020e3fb385c9d065f9395dbda5a6b6
2016-12-14 22:09:25 +00:00
Ed Sanders f01d617c53 Bypass API call when wikitext is empty string
Change-Id: Ie0cedfaae286f73e73bcde7bfca3cb2ae6197924
2016-12-03 17:44:04 +00:00
Ed Sanders c97e0b58d4 NWE: Disable progress bar when pre-parsing for WindowAction's
The progress bar dialogs interfere with the life cycle
of the window you are trying to open. Just disable these
progress bars for now to avoid catastrophic behaviour.

Change-Id: I77c8ae67a2d502bbd189836deb320cd55c3cb11a
2016-12-03 17:20:24 +00:00
Ed Sanders 9ceb13ce60 Update VE core submodule to master (5be61ce)
New changes:
860954b [BREAKING CHANGE] Parse selection before applying source tools

Local changes:
Implement convertFromSource/convertToSource in WikitextSurfaceFragment

Depends-On: Iaa41c49e2f8e28af28a8a64cb6915f705fa35e8c
Change-Id: I746619d442fb565cd582cb09de3126526c73c333
2016-12-03 03:43:59 +00:00
Ed Sanders 3d39b80991 Fix detection of headings in NWE format menu
Use regex to include match any character after '='.

Bug: T147585
Change-Id: I22228bedf497613506a676eca465d3bc7bc5fe67
2016-10-08 20:53:58 +00:00
Ed Sanders a9233045c7 Detect format in wikitext
Logically depends on I575d92c4fa.

Should really use a registry, and also doesn't update when
format is changed by deleting text, but is an improvement
for now.

Bug: T147218
Change-Id: I0cb87dbad2ab4269c4f89bdff8a4ccd9b35c8635
2016-10-04 11:04:54 -07:00
Alex Monk 166588c726 Fix insertion of templates, media, and various other things into wikitext surface
Pretty much fix everything on the insert menu... RB doesn't like it when you
try to specify both title and revision ID, but don't provide an ETag.

Change-Id: Ib25d023309d984ed8848f67b349b23231f27a957
2016-08-17 21:12:00 -07:00
Ed Sanders c452e134cc Wikitext surface alpha feature
Edit wikitext with the VE interace.

Bug: T104479
Bug: T142138
Change-Id: Ic95b47e0dd378578555c4a2342ca9c87064ed1d5
2016-08-12 18:37:29 +00:00