Page MenuHomePhabricator

Experimental live preview incompatible with wikEd
Closed, ResolvedPublic

Description

The experimental live preview interferes with the wikEd editor tool:

Under wikEd, pushing the preview or submit button triggers an event handler that converts and copies the rich text editing iframe in designmode into the standard textarea, which then gets submitted to the server.

The experimental live preview seems to have a handler that reads the textarea before it gets updated by the wikEd handler. Therefore, users have to push the preview button twice in order to see the current live preview. For a peaceful coexistence, the wikEd event must run *before* the live preview event.

Is there already some kind of mechanism, hook, or API to accomplish this? If not, please could you guys come up with a solution to handle such interferences with existing gadgets and userscripts?

Thanks in advance - Cacycle


Version: unspecified
Severity: normal

Details

Reference
bz24860

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:01 PM
bzimport set Reference to bz24860.

Users of wikEd are still complaining about this. Please could we find a way to fix this? Thanks, Cacycle

The trunk http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/common/preview.js?revision=72349&view=markup

has a 'LivePreviewPrepare' event that gets triggered before livePreview. Does that satisfy the needs of wikEd ? If so then it was fixed in r66721.

Use it like:
$j( mw ).bind( 'LivePreviewPrepare' , function( event, param1, param2 ){

// stuff to do at eventName time

});

That would be exactly what I need. However, I have just tested the hook on en and the test wiki and I could not get it to work. Is the fix already online somewhere?

(In reply to comment #3)

That would be exactly what I need. However, I have just tested the hook on en
and the test wiki and I could not get it to work. Is the fix already online
somewhere?

No, the code is not yet deployed.