I’ve heard that too (but nothing beyond speculation), and I’ve heard that Pages on iPad almost certainly uses a WebKit engine—that seems to be much more of a certainty, especially considering the state of UIKit’s limitations—and yes, nobody else is allowed to use that as an editable engine. Apps have been rejected for trying. Though I have to disagree on what WebKit is capable of. Line-spacing and indents would not be a problem for the CSS parsing aspect of it to handle. CSS can be set up to operate on a base font size, and then operating off of that, you can specify unit measurements relative to the font size. So a line spacing of 1.2 factor would be defined in CSS as “line-height: 1.2em”, which would proportionally increase according to the base font size. It is also capable of absolute sizing in pixel and point units bases. As for indenting, there is the text-indent CSS rule. By itself, it will indent the first line of a block (usually a paragraph) by absolute or ‘em’ unit. As a negative float, you can specify hanging indents; and with padding-left/right, it is possible to do full indents—blockquote style narrower margin sections (not intuitively, CSS margin rules are usually not the best solution here for various box model reasons). Meanwhile inter-paragraph spacing can be handled with block padding and/or margins as well. The whole RTF Spacing ruler would be trivial to implement in CSS.
CSS 2.1 is capable of nearly every typographic convention used in word processors, what it definitely is weak in is text flow. Columns, for instance, are very difficult to handle correctly. True columns are height restrained and flow from one to another; virtually impossible with raw HTML/CSS2 as there is no good way to say, “content from container W should flow into container X and when W+X overflows, build containers Y & Z”. However, with WebKit using CSS 3 (which I’m relative sure it is nearly fully capable of by now), there are better techniques than the old hacks for doing this.
Isn’t WebKit heavily based upon the Open Source Konqueror HTML rendering engine though? I always understood it that Apple was basically using the OSS engine nearly verbatim, and I suppose I reinforced that notion when WebKit and Konqueror both came out with CSS3 support nearly simultaneously. That was years ago though, it could be that by now Apple has forked it far enough that it is no longer recogniseable from its roots.
All of that aside, the ability to manipulate it as one would an RTF editor is definitely Apple. Whatever OSS rendering engine is going on in the base of it, they’ve done all of the wiring between Cocoa and it, making it possible to real-time edit. If they’d just let everyone else in on the game, that would be fantastic.
One further thing: I wouldn’t be shocked if Pages (for the desktop) uses a more robust XML than XHTML, but is something based on XHTML and CSS. Thus they needn’t re-invent the wheel, but can build off of a fairly solid text rendering environment.