You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Rainer Schöpf <ra...@proteosys.com> on 2009/06/04 00:34:04 UTC

Re: TinyMCE (Lenya 2.0.2) - Image Attributes Problem

On Wed, 27 May 2009 at 22:54 +0200, Andreas Hartmann wrote:

 > Andreas Hartmann schrieb:
 > > Hi Rainer,
 > > 
 > > Rainer Schöpf schrieb:
 > > >  > Thanks Rainer, now it's working. I've applied the patch to
 > > > */tiny_config.js/*
 > > >  >  > Now it doesn't throw any exception when I add border, vspace,hspace
 > > >  > attributes. But these attributes are not getting reflected in the
 > > > image tag
 > > >  > (after saving).
 > > >  >  > Should they or not as these are deprecated?
 > > > 
 > > > These attributes deprecated in HTML 4.01, and not allowed in XHTML.
 > > > 
 > > > By default, lenya uses the XHTML basic schema (see
 > > > 
 > > >   http://www.w3.org/2007/09/dtd-comparison.html
 > > > 
 > > > for a comparison to other XHTML schemas.) The problem with the default
 > > > setup for TinyMCE is that is can produce XHTML tags and attributes that
 > > > are not allowed in XHTML basic. With the changes, TinyMCE removes all
 > > > these invalid elements and attributes.
 > > 
 > > I have to admit that I didn't test the patch yet, but will do so now.
 > 
 > Is there a bug report with some nice step-by-step instructions that can be
 > used as a test case? I can't produce any errors when inserting a table, even
 > without the patch. Actually I have no idea what exactly to test …

This one was hard to find: there are two different xhtml-basic.rng files, one in 

  src/modules/xhtml/resources/schemas/xhtml/xhtml-basic.rng

(which includes basic-table.rng) and one in

  src/pubs/default/lenya/modules/xhtml/resources/schemas/xhtml/xhtml-basic.rng

which includes table.rng. 

As I wrote in a previous message, you can test the TinyMCE integration by saving 
the document and opening it in BXE.

Another test is to insert an image and select an explicit alignment. This 
will give an error without the patch - although the the error message is not 
displayed and one ends up in the editor again, with all changes lost.

 Rainer