On 02/05/11 18:15, Roan Kattouw wrote:
> While I'm sure this particular bug has been fixed, it sounds like the
> underlying problem remains. FCKeditor seems to be converting wikitext
> to HTML, let users edit the HTML, then convert the HTML back to
> wikitext. The bugs would then result from the fact that the
> wikitext->HTML->wikitext round-trip (or wikitext->whatever internal
> representation is used->wikitext) isn't clean.
> 
> Trevor and I talked about this issue about a year and a half ago, and
> figured the best way around round-trip bugs was to not do round-trips
> at all. Instead, wikitext or something close to it should be used as
> an internal representation, and/or only the parts of the page the user
> touches should actually change.

What about using a kind of document tree representation of wikitext?
You could have an intermediate representation which precisely
represents all of the source wikitext, but was easy to convert to
displayable HTML. Kind of like HTML, but annotated to show which of
the multiple options for HTML to wikitext transformation should be
chosen on the return trip in order to preserve unchanged wikitext
precisely.

That's what Wikia's editor does. It uses a subclass of the core
MediaWiki parser to generate HTML-like output which is richly
annotated with comments and custom attributes, allowing precise
round-trip transformation of unchanged text.

The client side is not a generic HTML editor, rather it responds to UI
events by editing the intermediate DOM representation, using code
which is aware of the special structure of that document tree.

Maybe there are remaining round-trip bugs, but there's no obvious
reason why they couldn't be fixed using this general approach.

> So that's what I know about the issues when introducing FCKeditor to
> an existing wikitext 'codebase'. I hear it's fairly decent when used
> from the start, but I'm not familiar enough with it to comment on
> that.

That's not what I hear. I hear that there were some teething problems,
especially related to round-trip conversion, but that those were
sorted out long ago.

By the way, it's not FCKEditor. The server side seems to have been
rewritten from scratch by Wikia, and the client side has been extended
and patched. RTE is probably a good name for it, since that's what
they call it.

If you want to know more, this appears to be the relevant code:

https://svn.wikia-code.com/wikia/trunk/extensions/wikia/RTE/

-- Tim Starling


_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to