Question

I'm looking for an internal representation format for text, which would support basic formatting (font face, size, weight, indentation, basic tables, also supporting the following features:

  • Bidirectional input (Hebrew, Arabic, etc.)
  • Multi-language input (i.e. UTF-8) in same text field
  • Anchored footnotes (i.e. a superscript number that's a link to that numbered footnote)

I guess TEI or DocBook are rich enough, but here's the snag -- I want these text buffers to be Web-editable, so I need either an edit control that eats TEI or DocBook, or reliable and two-way conversion between one of them and whatever the edit control can eat.

UPDATE: The edit control I'm thinking of is something like TinyMCE, but AFAICT, TinyMCE lacks footnotes, and I'm not sure about its scalability (how about editing 1 or 2 megabytes of text?)

Any pointers much appreciated!

Was it helpful?

Solution

FCKeditor has a great API, supports several programming languages (considering it is javascript this isn't hard to achieve), can be loaded through HTML or instantiated in code; but most of all, allows easy access to the underlying form field, so having a jQuery or prototype ajax buffer shouldn't be terribly difficult to achieve.

The load time is very quick compared to previous versions. I'd give it a whirl.

OTHER TIPS

In my experience a two-way conversion between HTML and XML formats like TEI or DocBook is very hard to make 100% reliable.

You could use Xopus (demo) to have your users directly edit TEI or DocBook XML. Xopus is a commercial browser based XML editor designed specifically for non-technical users. It supports bidi and UTF-8. The WYSIWYG view is rendered using XSLT, so that gives you sufficient control to render footnotes the way you describe.

As TEI and DocBook don't have means to store styling information, those formats will not allow your users to change font face, size and weight. But I think that is a good thing: users should insert headers and emphasis, designers should pick font face and size.

Xopus has a powerful table editor and indentation is handled by nesting sections or lists and XSLT reacting to that.

Unfortunately Xopus 3 will only scale to about 200KB of XML, but we're working on that.

I can't really decide on one of them. IMHO they are all not very good and complete. They all have their advantages and clear disadvantages. If TinyMCE is your favorite then afaik, it also does tables.

This list will probably come in handy: WysiwygEditorComparision.

I've also used FCKEditor and it performed well and was easy to integrate into my project. It's worth checking out.

Small correction to laurens' answer above: As of now (May 2012), Xopus supports UTF8, but not BiDi editing. Right-to-left text is displayed fine if it came from another source, cannot be edited correctly. Source: I was recently asked to evaluate this, so have been testing it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top