|
[b]Site Section[/b] Recent updates to this section. [b]Site[/b] The Wushu Index now displays the latest Wushu? threads from RPGnet.
[b]Quick Links[/b] |
RichEdit /
DetailedSummaryThe Long VersionWhat it isThis recipe provides two things:
Together, these scripts allow users to choose between the original PmWiki editing interface and a new, word processor-style editing interface. GoalsMy goals were:
To get there, I built a more sophisticated and, hopefully, user-friendly document editor for PmWiki. I specifically was not attempting to provide a complete replacement for PmWiki's plain text editor, which remains the solution of choice for administrator tasks such as writing markup documentation or producing very sophisticated pages. Backwards-compatibility was the most challenging goal; if I had decided that wikis using this recipe must use a subset of HTML, the task and code would have been much simpler. AudiencesMy primary audience was the dozen or so people who contribute to my own wiki. These are people who are often adapting their own content from other sources, such as word processing documents. The secondary audience was people who read my wiki, but don't contribute because the markup is confusing or annoying. Both of these audiences are most concerned with easy document creation and editing. DesignThe design is fairly simple, and has two parts:
The Included Editor- TinyMCETinyMCE 2.0RC1 is included with this recipe. The following modifications have been made to the distribution found in the cookbook/richedit/tinymce directory:
BugsPasteThe paste feature, while very useful, has some bugs which I haven't been able to correct. Some of these are artifacts of the convoluted HTML that Word and OpenOffice.org tend to output. Others have to do with the relative naievete of my HTML->WikiStyle conversion. TinyMCE BugsSince we use the TinyMCE control, we're stuck with TinyMCE bugs. Fortunately, however, these aren't exceedingly numerous or annoying. LimitationsAlthough the rich text editor is very handy for editing articles, it has some limitations, particularly from the standpoint of Administrator tasks. Although this list looks scary-long, that's mainly because I'm trying to be very specific. Things It's Not Good ForThese are things you should probably use the plain text editor for.
Incompatible Text Formatting RulesI made great efforts to stay compatible with existing markup, but some Text Formatting Rules had to be bent.
Recipe IncompatibilitiesThe rich text editor is likely to mangle links from any recipe which changes PmWiki's link handling or formatting. Also, although I haven't tested this, it's likely to mangle Url Approvals. This recipe is incompatible with the SectionPage or BreakPage recipes, because of the ways they change the HandleEdit function. If the section-splitting and reassembly were made into functions in $EditFunctions, and the reassembly occurred after RichEdit_OnSave() is called, but before PostPage() is called, it would probably work. Design LimitationsThese are issues that are obvious problems with or limitations of the algorithms I picked.
Code QualityI had a relatively small quantity of time to do this in, and it involved two languages I haven't worked in extensively: PHP and Perl. My Perl skills, particularly, are very weak. As a result, I know there are some ugly hacks in there, and I'm sure I've been naïve or reinvented the wheel in a few places. There's also a lot of code prettification to be done; the code I was integrating came in a lot of different styles, so I mostly stuck to my own preferences. Contributions, criticisms, and cleanups would be very welcome. Contributors
|