[pmwiki-users] user-customisation of edit form

Patrick R. Michaud pmichaud at pobox.com
Wed Jul 20 09:49:36 CDT 2005


On Wed, Jul 20, 2005 at 07:36:58AM -0700, Julian Kamil wrote:
> --- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> > This may actually be a more generic question -- how
> > can PmWiki
> > detect when the edit page is malformed and/or
> > provide an option to
> > bypass it...?
> 
> I can think of two ways to do this.  The first is
> (probably not desirable) to walk the user through a
> series of steps and generate the appropriate code in
> the end.  The second is to let the user define a
> freeform text and use either simplexml_load_string()
> or something similar to that to check well-formedness
> of the string.  

Actually, I'm not worried about the well-formedness of
the HTML, as that's generated by PmWiki and we don't give
that level of access to the author anyway.  I'm simply 
concerned that the resulting edit form might end up missing some 
essential elements, such as the <textarea>, a "Save" button, and
even the form itself.

> As a precaution, we could add a link
> called "Try Me First" or something similar that would
> launch the edit page in a separate target window, and
> let the user discover if it wouldn't work--sort of
> like the preview function, but on a separate window. 
> You think that will work?

Previews are good, but someone will undoubtedly save
before previewing.  The problem is that once you've
saved an invalid EditForm, there's not an easy way
to recover (because you've messed up the edit form
that you need in order to recover :-).

Pm




More information about the pmwiki-users mailing list