On 27 August 2015 at 06:54, florian.schmidt.welzow(a)t-online.de <
florian.schmidt.welzow(a)t-online.de> wrote:
A VE save could be recognized with the postEdit
hook[1] in JavaScript:
mw.hook( 'postEdit' ).add(
// your function
);
Remember, that this hook is also fired after a "normal" save (via the
Wikitext editor)[2].
[1]
https://github.com/wikimedia/mediawiki-extensions-VisualEditor/blob/44ad757…
[2]
https://github.com/wikimedia/mediawiki/blob/b79196778ed7c4f49ae09bee9ba16f8…
Yeah, but that's even later than the server-side mid-save PHP hook. :-)
-----Original-Nachricht-----
Betreff: Re: [Wikitech-l] Tutorials / HowTos for VisualEditor
Datum: Thu, 27 Aug 2015 15:30:27 +0200
Von: Daren Welsh <darenwelsh(a)gmail.com>
An: Wikimedia developers <wikitech-l(a)lists.wikimedia.org>
I'm also interested in this kind of information. Right now I'm specifically
interested in what I can use as an equivalent to a hook for when a user
saves a page revision using VE. I'm working on an extension that logs user
actions (and does more with that information). I have figured out how to
play off of hooks to determine a page view or a "traditional" page save,
but I'm lost when it comes to VE.
Probably simplest just do it server-side hooked onto the page save, with a
special rule if the revision is tagged 'visualeditor'?
Yours,
--
James D. Forrester
Lead Product Manager, Editing
Wikimedia Foundation, Inc.
jforrester(a)wikimedia.org | @jdforrester