[Pmwiki-users] WikiEditor

Jonathan Scott Duff duff at pobox.com
Fri Oct 25 11:33:51 CDT 2002


On Fri, Oct 25, 2002 at 10:47:11AM -0500, Davis, James C. wrote:
> I agree that wiki can't be compared to a word processor, but incorporating
> some features of a word processor would make it more familiar and possibly
> would encourage its use. I'll admit that even I wished it had a spell
> checker sometimes, and I have even cut and pasted text into Word to run
> spell check. A spell checker would probably have to be a server side add-on
> because sending an entire dictionary file to the client is probably not
> something you would want to do.

When I edit PmWiki pages, I usually do it with vi so that I have
access to fmt, ispell, perl, etc. (plus a more familiar editing
environment). The major drawback is that I don't get to see the
rendering of my edits immediately upon saving. But 2 windows (one
browser, one vi) works for me.

> Here is where I have another idea. What about a dynamic editor that can
> adapt to changes in the underlying markup language? If the editor is
> integrated into the system as it is with wiki, it can be written so that it
> will know about any changes to the markup language. WikiEditor does some of
> this already because many of the regular expression patterns are not defined
> statically in the JavaScript code, but are inserted dynamically using php
> variables defined in PmWiki. Maybe PmWiki could work off of some sort of
> grammar file that defines all markup and its HTML equivalent. Then editors
> could also use this file in the same way. Any local add-ons (such as "Q:"
> and "A:") could be put in another file and included (similar to local.php).

It's too bad Perl6 isn't here yet.  You can do some nifty things with
it's enhanced "regular expressions":

grammar PmWiki {
   rule PmWiki { <line>* }
   rule line  {  
      ^^ <deflist> | <heading> | <hr> |
         <orderedlist> | <unorderedlist> | <text> $$
   }
   rule deflist		{ <':'>+ <text> <':'> <text> }
   rule heading		{ <'!'>+ <text> }
   rule hr		{ <'----'> .* }
   rule orderedlist	{ <'#'>+ <text> }
   rule unorderedlist	{ <'*'>+ <text> }
   rule text		{ ... }
}

As you can see, perl's REs have grown up and out and are no longer REs.
When Perl 6 is implemented, I see it easily replacing lex and yacc (or
their equivalents) as the de facto tool for describing (and
prototyping) programming languages.

> I still, however, think that real-time previewing would be useful if
> it can be dynamic and actually be a true preview.

Is there some way to reliably hook into the rendering engine of
<insert browser here>?

> Even for veteran wikiers, I think being able to see the page in its
> rendered form, exactly as it will appear in your browser, would be
> nice. This is more useful, I guess, for people or organizations who
> are using wiki for actual web sites rather than just for
> collaboration.

That's an interesting statement. If the users want to see what it looks
like, they can save the document and look at it in their browser. Is the
edit-save-browse cycle that daunting?

> I will continue to work on this project and attempt to make it as
> cross-browser and platform independent as possible.

Cool.  Let me know when you get it to work on Netscape under linux.

-Scott
-- 
Jonathan Scott Duff
duff at cbi.tamucc.edu




More information about the pmwiki-users mailing list