[Mediawiki-l] Re: Re: External editor support.

Jim Higson jh at 333.org
Sat Oct 15 13:20:28 UTC 2005


Rick DeNatale wrote:

> On 10/13/05, Jim Higson <jh at 333.org> wrote:
>> Jamie Bliss wrote:
>>
>> > Jim Higson wrote:
>> >> Can anyone give advice on the new external editor features, maybe
>> >> mediawiki could see my project as an external editor? I've found some
>> >> pages about this, but not any real documentation of the interface on
>> >> the http/soap/whatever level.
>> >
>> > [[m:Help:External editors/Tech]] talks about the data format.
>> >
>> > Basically, when a user clicks on an edit link (or a request with
>> > &externaledit=true is made), it will send this file (with the mentioned
>> > MIME type) as the body of the response. The idea is to associate this
>> > type with an app that can understand it.
>>
>> Thanks Jamie.
>>
>> Is that the whole story...? So, is it the role of the external editor to
>> do the uploading etc when the editing is finished? This seems unlikely
>> since very few editors will know how to do this. If so, how are
>> editTokens etc handled?
> 
> No, it's not the whole story. See
> 
> http://meta.wikimedia.org/wiki/Help:External_editors
> 
> It's not an arbitrary editor which needs to be associated with the
> mime-type, but a helper app which understands the control file which
> mediawiki serves up for external editing, and invokes the real
> external editor, and saves the resource when needed.  Different
> external editors can be invoked for different types of resources. For
> example a text editor for articles, inkscape for svg illustrations,
> the Gimp for images etc.
> 
> There's a reference implementation of the helper app writting in perl,
> which can be found in the referenced article.  A quick skim of the
> code looks like it forks the particular editor to edit a temp file,
> and puts up a separate save window which the user uses to initiate
> saving.  The helper app talks to the mediawiki server by emulating an
> http client (it tells the server that the agent is firefox 1.0).
> 
> It doesn't seem to monitor the editor process, so the user has to do a
> save in the editor, then push the 'save' or 'save and continue'
> buttons in the helper app's gui.  Seems a little clumsy, but I guess
> you could do differently should you decide to write your own helper
> app implementation.
> 
> Keep in mind that all of this requires a fair bit of configuration on
> the client.

Thanks for the description.

I'm going to have a go at extending my WYSIWYG editor to act as a web-based
'external' editor. I was having a few problems uploading via form-encoded
http POSTS, possibly this will be easier.

--
Jim




More information about the MediaWiki-l mailing list