Yeap, building on WikiEditor stuff is always a good idea!

Though, in my experience with the InlineEditor extension, it's quite hard if 
you want to build a totally different interface. It would be awesome to 
refactor EditPage sometime to make this easier, and to provide a nice 
preference with a drop-down to select an editing interface. The relevant bug is 
26918 [1] (which has actually been created because of a comment by yourself, 
Brion :))

The way I solved this was to create a subclass of EditPage with just enough 
code copy/pasted to suit my needs ;) [2]. For the API some hacking in EditPage 
has been done, and the class description also talks about a possible 
refactoring of EditPage [3].

Anyway, just a thought for the backend part of an alternate/remote editor API, 
for extensions that want to do more than replacing the textbox. :)

Cheers, Jan Paul

[1] https://bugzilla.wikimedia.org/show_bug.cgi?id=26918
[2] 
http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/InlineEditor/ExtendedEditPage.class.php?revision=83338&view=co
[3] 
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiEditPage.php?view=co

On 6-May-2011, at 20:22, Brion Vibber wrote:

> On Fri, May 6, 2011 at 11:20 AM, Trevor Parscal <[email protected]>wrote:
> 
>> The way the WikiEditor works right now, the textbox can be replaced with
>> anything that can support a few methods, such as getSelection,
>> encapsulateSelection, etc. There are some modules that depend on specific
>> edit box implementations, such as the current and only alternative to the
>> textarea we called "iframe" since it's a contentEditable iframe.
>> 
>> If you take a look at jquery.wikiEditor.iframe.js, you will see what I
>> mean.
>> It should be pretty straightforward to drop anything in there, and be able
>> to take advantage of the toolbar. There are some things, like find and
>> replace that may need to be reworked or just turned off, but even things
>> like the link dialog should work just fine but just supporting a few
>> methods.
>> 
>> The API could be better documented, and re-factored a bit to be even more
>> generic, but the basic structure is there, and can be reused without much
>> hacking.
>> 
> 
> Spiffy... I'll play with it for CodeEditor, see if I can make the
> special-char inserts for instance work on it (which would actually be useful
> for some JS!).
> 
> -- brion
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to