Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
Re: Multiple blank ( ) 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 ( ) 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
Offline
#7 2009-05-14 20:33:55
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Multiple blank ( ) 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
Re: Multiple blank ( ) in the body of an article
masa
- press down left
alt
- press one-by-one 0 1 6 0 on the right digital keypad
- 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 ( ) in the body of an article
That is painful ;-)
Offline
Re: Multiple blank ( ) 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