textile-tables looks wrong in the preview

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

textile-tables looks wrong in the preview

Post by stm999999999 »

I use textile-plugin for formating purpose. it works very well, but there is one little annoyance:

tables have a great font size in the preview, in the published article all is normal font size.

example:

Code: Select all

|So.	05.04. |für das Heilige Land|
|Fr.	10.04. |für Pfarrcaritas|
published:

http://www.sankt-joseph-siemensstadt.de ... -April-Mai all is ok

but in the preview:

Image
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: textile-tables looks wrong in the preview

Post by garvinhicking »

Hi!

The preview uses your frontend CSS, so you might have used a specific TABLE font sizing that gets applied in the preview, because maybe you adapted your index.tpl layout but did not change the preview_iframe.tpl layout to match your DIV/TABLE nesting structure.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: textile-tables looks wrong in the preview

Post by stm999999999 »

hm, I don't think so.

I test it on a test-installation, using bulletproof, modern world, RoundedCorner and with every template the same problem.

Can anybody who uses textile, can reproduce my problem?
Ciao, Stephan
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: textile-tables looks wrong in the preview

Post by stm999999999 »

Does anyone has similar exsperience?

Anyone here, who uses textile tables? :cry: :cry: :cry:

@Garvin: May it help to give you a test-account on my test-blog?
Ciao, Stephan
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: textile-tables looks wrong in the preview

Post by Don Chambers »

Stephan - I would be willing to take a look, especially since it might involve BP. I have never used textile... Contact me via PM for s9y admin credentials if you would like me to proceed.
=Don=
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: textile-tables looks wrong in the preview

Post by Don Chambers »

Thanks for access Stephan - I configured my own sandbox to use the same template settings and plugins you were using. The difference in appearance was because preview_iframe.tpl did not specify a doctype, while the front end view using index.tpl does specify a doctype, which in turn, affects the appearance of <table>s.

I modified preview_iframe by adding the following at the top of the file:

Code: Select all

    {if $is_xhtml}
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    {else}
        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    {/if}
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang}" lang="{$lang}">
and this to the very end:

Code: Select all

    </html>
The preview and front end are now identical in appearance. This change has already been committed if you fetch the file from svn.

BP does not specifically style <table> through its stylesheets, but you could alter the font size through user.css if you wanted to.
=Don=
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Re: textile-tables looks wrong in the preview

Post by stm999999999 »

it works very, very fine! :D :D :D

one annotation: this problem is not only for Bulletproof, so the preview_iframe.tpl of the standard template and if we come to think of it, of every spartacus-template with an own preview_iframe.tpl (I think there are not much?) have to be patched, or?
Ciao, Stephan
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: textile-tables looks wrong in the preview

Post by Don Chambers »

OK - added to default template too.

@ Garvin - revert if you feel this was not necessary or desired for some reason.
=Don=
Post Reply