Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-11-18 08:43:07

Sak
Member
From: Seattle, WA
Registered: 2006-10-18
Posts: 30
Website

[textile] p style not being respected just after Raw HTML?

Hey all,

I ran into something interesting tonight, and I wondered what you all might think.

In Txp I wrote a few paragraphs, then I inserted some Raw HTML. For example:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula augue, suscipit nec, sagittis ac, elementum pharetra, nulla. Mauris a massa. Maecenas porttitor feugiat nibh. Etiam malesuada. Cras at urna. Aenean hendrerit neque nec orci. Fusce porta semper mi. Etiam quis tortor. Sed a tellus quis sapien fringilla laoreet. Pellentesque diam augue, porta eu, facilisis ut, lobortis eu, erat.

Morbi at nulla. Integer neque. Duis commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse fringilla erat. Aenean semper bibendum mauris. Vestibulum sit amet ipsum varius sem adipiscing dictum. Etiam blandit diam ac mauris. Sed pulvinar luctus est. Nullam ipsum nisi, lacinia vitae, hendrerit ut, molestie quis, elit.
“==<p align=“center”><img src=“http://somewebsite/images/42.jpg”></p>==”

NOTE: The quotation marks around the last line above are there to get the full Textile markup to show up here in the forum. I didn’t actually put quotes around the Textile markup. Without them here, the double-equal signs don’t appear.

With that little caveat out of the way… My style looks like this:

p { color: #555; }

What I discovered is that text following the Textile markup for the Raw HTML doesn’t get the style unless there’s an extra carriage return. So…

Morbi at nulla. Integer neque. Duis commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse fringilla erat. Aenean semper bibendum mauris. Vestibulum sit amet ipsum varius sem adipiscing dictum. Etiam blandit diam ac mauris. Sed pulvinar luctus est. Nullam ipsum nisi, lacinia vitae, hendrerit ut, molestie quis, elit.
“==<p align=“center”><img src=“http://somewebsite/images/42.jpg”></p>==”
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Will create a new paragraph, with a distinct distance away from the Raw HTML, but it won’t honor the CSS. If an additional carraige return is entered…

Morbi at nulla. Integer neque. Duis commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse fringilla erat. Aenean semper bibendum mauris. Vestibulum sit amet ipsum varius sem adipiscing dictum. Etiam blandit diam ac mauris. Sed pulvinar luctus est. Nullam ipsum nisi, lacinia vitae, hendrerit ut, molestie quis, elit.
“==<p align=“center”><img src=“http://somewebsite/images/42.jpg”></p>==”

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

…like so, then it does. It also shifts the paragraph following the Raw HTML markup up just slightly toward the image that’s being displayed.

It doesn’t seem to matter if there’s no carraige return, i.e. …

Morbi at nulla. Integer neque. Duis commodo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse fringilla erat. Aenean semper bibendum mauris. Vestibulum sit amet ipsum varius sem adipiscing dictum. Etiam blandit diam ac mauris. Sed pulvinar luctus est. Nullam ipsum nisi, lacinia vitae, hendrerit ut, molestie quis, elit.
“==<p align=“center”><img src=“http://somewebsite/images/42.jpg”></p>==“Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

…or a single carriage return after the Raw HTML Textile markup, it wants two in order to honor the CSS.

Oh, I did also try…

“=!http://somewebsite/images/42.jpg!”

… (again without the quotes) as was suggested for alignment in the Textile help, but just rendered an equal sign next to the image that wasn’t aligned center.


Thanks,
Sak.

Offline

#2 2006-11-18 08:53:55

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: [textile] p style not being respected just after Raw HTML?

You need to leave a blank line between blocks/text lines (enter twice). Your Textile modifiers are nested wrong – it should be !=/path/to/img.jpg! or p=. blah blah. The manual has a handy Textile index with examples and an input/output box, so you can try your code out there.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula augue, suscipit nec, sagittis ac, elementum pharetra, nulla. Mauris a massa. Maecenas porttitor feugiat nibh. Etiam malesuada. Cras at urna. Aenean hendrerit neque nec orci. Fusce porta semper mi. Etiam quis tortor. Sed a tellus quis sapien fringilla laoreet. Pellentesque diam augue, porta eu, facilisis ut, lobortis eu, erat.

p=. Note the period and space after the equals sign. This text will be centered.

To center the image:

!=http://example.com/ex.png!

As far as the HTML following the textile’d paragraph, leave a blank line then enter notextile. <p align="center"><img src="http://somewebsite/images/42.jpg"></p>.

Last edited by jm (2006-11-18 09:03:38)

Offline

#3 2006-11-18 18:48:58

Sak
Member
From: Seattle, WA
Registered: 2006-10-18
Posts: 30
Website

Re: [textile] p style not being respected just after Raw HTML?

Thanks jm.

I was able to find more information by digging through the wiki as well.

Perhaps what might be useful for new users is a more complete help such as what’s offered at Textism. By that, I mean that the links in the side column there provide more detailed descriptions of the markup than what is offered at Textile’s home. I mean no offense, but for a new user trying to get the hang of things it didn’t seem very intuitive. I think that having the additional explanations under the “More” link in Textpattern’s Write page, as well as the help links under the comments form, would be a big help.


Thanks,
Sak.

Offline

#4 2006-11-19 23:21:27

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [textile] p style not being respected just after Raw HTML?

Sak,

As the page says, commercial documentation and support is available.


Alex

Offline

Board footer

Powered by FluxBB