Ben Langhinrichs

Photograph of Ben Langhinrichs

IBM Champion logo

E-mail address - Ben Langhinrichs






April, 2006
SMTWTFS
      01
02 03 04 05 06 07 08
09 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30

Search the weblog





























Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Tue 11 Apr 2006, 12:09 AM
As more customers use CoexEdit, we are starting to see an odd second wave of issues.  These are not issues where CoexEdit is unable to recognize some HTML or CSS construct, nor even where CoexEdit was unable to generate a recognizable and usable HTML or CSS construct, which were the hallmarks of the first wave of issues.  This second wave comes from issues where the web editors may display the HTML or CSS correctly, but cannot adjust appropriately to it.  An example if the issue of centering an image or text inside a table cell.  This can be coded a great number of ways, but the most efficient and clean seems to be:

<td width='345' align='center'>This is centered</td>

and since the engine behind CoexEdit was built to be efficient and sparse in its HTML, that is what we generate.  But FCKeditor, which is the open source editor of choice for CoexEdit, doesn't really understand that.  It displays the value centered, but if you click on the text and then use the left align icon, you get the following result:

<td width='345' align='center'><p align='left'>This is centered</p></td>

which continues to show as centered.  Once you save, CoexEdit uses its logic to change this to:

<td width='345' align='left'>This is centered</td>

which displays properly, so you get the weird effect of trying to left justify and having it not work, then saving and opening and having it work.  Sigh!

So, I tried using a property which can be set to force paragraph usage.  Then, the result from CoexEdit, which prefers <div> tags to <p> tags by default for spacing reasons, was

<td width='345'><div style="text-align: center">This is centered</div></td>

Again, FCKeditor renders this properly, but when you go to left justify it, it returns:

<td width='345'><div style="text-align: center" align='left'>This is centered</div></td>

which is not exactly very nice, even though it does look like it works.  It just varies by browser in how it displays, and it confuses CoexEdit, which assumes that styles override HTML constructs.  So, I have had to add a new setting to force alignment to show up using the HTML construct rather than CSS, contrary to normal standards.

Which works, but leaves me wondering which is the tail and which is the dog.

Copyright © 2006 Genii Software Ltd.

Tags: