Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-13 20:53:46

alonsocreative
New Member
From: San Diego, CA
Registered: 2009-05-13
Posts: 2
Website

Multiple blank ( ) in the body of an article

Hi, I’m creating a site for a writer and she wants to be able to add multiple consecutive blank spaces on a line to indent lines of text differently for her poems, if we do this in the write tab is not respected once the article renders.

Any tips on how to achieve this?

Thanks!!!!!!

Offline

#2 2009-05-13 21:15:25

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Multiple blank ( ) in the body of an article

Disable Textile for the entire article or for the HTML element containing the poem (see Raw HTML section of the Textile guide.)


Code is topiary

Offline

#3 2009-05-13 21:18:34

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Multiple blank ( ) in the body of an article

One way is to add spans and style a couple of classes in the CSS, the text can be entered like this:

%(indent-1)first line%
%(indent-2)second line%
...etcetera

which will output

<span class="indent-1">first line</span>
<span class="indent-2">second line</span>

but if the user wants more flexibility, using pre. would probably be simpler; you’d only have to style the pre to look like regular text. This input:

pre. no spaces
 one space
    four spaces
          ten spaces

will output:

no spaces
 one space
    four spaces
          ten spaces

Last edited by els (2009-05-13 21:19:16)

Offline

#4 2009-05-13 22:33:40

alonsocreative
New Member
From: San Diego, CA
Registered: 2009-05-13
Posts: 2
Website

Re: Multiple blank (&nbsp;) in the body of an article

Awesome! I think pre is exactly what was needed.

Thanks Els!

Offline

#5 2009-05-13 23:57:40

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Multiple blank (&nbsp;) in the body of an article

You should be able to simply use non-breaking spaces to indent text in the input field.
On a Mac a non-breaking space is created by pressing alt+space; there’ll be a similar key combo on a PC.

Offline

#6 2009-05-14 01:48:28

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Multiple blank (&nbsp;) in the body of an article

masa wrote:

there’ll be a similar key combo on a PC

Which on MS Windows is ALT+0160. Mac is a personal computer too…

Offline

#7 2009-05-14 20:33:55

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Multiple blank (&nbsp;) in the body of an article

Gocom wrote:

Which on MS Windows is ALT+0160. Mac is a personal computer too…

Sorry, I’m just stuck in those well-established stereotypes.

However, how do you actually enter something like ALT+0160 ? Is that four separate key strokes?

Perhaps “PC” stands for “Painful Computer” ? ;-)

Offline

#8 2009-05-14 20:47:42

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Multiple blank (&nbsp;) in the body of an article

masa

  1. press down left alt
  2. press one-by-one 0 1 6 0 on the right digital keypad
  3. release alt key

Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#9 2009-05-14 20:51:03

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: Multiple blank (&nbsp;) in the body of an article

That is painful ;-)

Offline

#10 2009-05-15 06:57:59

Timid&friendly
Member
From: The Netherlands
Registered: 2006-05-28
Posts: 252
Website

Re: Multiple blank (&nbsp;) in the body of an article

you might have to style the pre tag as the standard font will almost certainly be a monospaced font, different to the rest of the body


I think, therefore I AM, … … er … I think :-?

Offline

Board footer

Powered by FluxBB