Hello Jürgen

On Sat, 15 Nov 2008 at 10:47 +0100, Jürgen Ragaller wrote:

 > Hello Rainer
 > 
 > Am 29.10.2008 um 16:49 schrieb Rainer Schöpf:
 > 
 > > Hello,
 > > 
 > > a small problem I found when I tried to create tables with TinyMCE:
 > > 
 > > The editor creates HTML like
 > > 
 > > <table border="0">
 > >  <tbody> ...
 > >  </tbody>
 > > </table>
 > > 
 > > Both the border attribute and the tbody tag cause an error. Now, in the
 > > TinyMCE
 > > forum I found how to tune the list of allowed elements (edit
 > > tiny_valid_elements.js).
 > 
 > You can put your modified version of tiny_valid_elements.js in
 > <pub>/lenya/modules/tinymce/resources/javascript

Yes, I did that. But I need to make a lot of changes to match what is in the 
relaxng schema.

 > > But: when the error occurs, the page in question remains checked out and 
 > > can
 > > only be edited again by forcing a checkin. Shouldn't the checkout be 
 > > undone when
 > > an error occurs during edit?
 > 
 > I don't think, the checkout should be undone in case of errors.
 > 
 > But the behaviour should indeed be different.
 > When the user finds a way to insert invalid markup in tinymce and clicks
 > save, the validation from lenya (against relax ng) puts the user in a
 > uncomfortable situation:
 > 
 > The document has to be checked out again and the content of the previous edit
 > is lost.

Actually, it is often possible (but not always) to click on the back button and 
return to the editor without loosing the changes. 

Besides, the error message is misleading: the RelaxNG validation often gives 
error messages like "invalid ... - ignored". This suggests that the invalid 
tags 
are simply skipped.

 > Currently the only way to prevent this from happening often is to finetune
 > the xhtml set of tinymce and possibly use it's cleanup capabilities and
 > instruct users to save often.

 > The behaviour I think would be more userfriendly: There is only one schema
 > (not relax ng on the lenya site AND tinymce valid elements on the editor
 > side) and the editor uses that schema for its internal markup validation. In
 > tinymce (and other editors) this is not the case. When a markup validation
 > error occurs the user should still be in the editor be able to correct the
 > problem while the checkout remains active.

This is certainly the best solution. However, it would already help a lot if 
the 
content of tiny_valid_elements.js reflects what is in the relaxng schema.

Can the error handling be changed to return to the editor?

 > > (Can a checkout be undone at all?)
 > 
 > In lenya 2.x (I guess you use one of the 2.x's) yes: there is a «force
 > checkin» menu entry.

Yes, but doesn't this create a new version, even if the file hasn't changed?

 Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to