# Is there a simple way to not strip leading spaces and other formatting in a poem?

**URL:** https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991
**Category:** Support
**Tags:** composer
**Created:** [20 juli 2026 om 00:06 UTC](https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991 "2026-07-20T00:06:01Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![pinetree1111](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinetree1111/32/571161_2.png) [@pinetree1111](https://meta.discourse.org/u/pinetree1111)
#### Post date: [20 juli 2026 om 00:06 UTC](https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991/1 "2026-07-20T00:06:01Z")

</div>

I am hosting in a discourse group, testing for the gene keys community and a participant asked about allowing formatting in poetry. The FAQ on formatting describes HTML and other coding options, but these are not simple for users.

Let me know if there is an easy solution.

Thanks, David

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [20 juli 2026 om 00:35 UTC](https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991/2 "2026-07-20T00:35:31Z")

</div>

hi @pinetree1111 👋 welcome

not sure if you consider this “easy” but i find it easy because i use them in my posts occasionally lol.

you can use `&nbsp;` (non-breaking space) for blank space:  
like this

hello world  
&nbsp;this is a line with a leading space  
&nbsp;&nbsp;this is a line with 2 leading spaces  
&nbsp;&nbsp;&nbsp;this is a line with 3 leading spaces

code:

```html
hello world
&nbsp;this is a line with a leading space
&nbsp;&nbsp;this is a line with 2 leading spaces
&nbsp;&nbsp;&nbsp;this is a line with 3 leading spaces

```

you can also put spaces between them

hello world  
&nbsp; this is a line with 2 leading spaces  
&nbsp; &nbsp; this is a line with 4 leading spaces  
&nbsp; &nbsp; &nbsp; this is a line with 6 leading spaces

```plaintext
hello world
&nbsp; this is a line with 2 leading spaces
&nbsp; &nbsp; this is a line with 4 leading spaces
&nbsp; &nbsp; &nbsp; this is a line with 6 leading spaces

```

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [20 juli 2026 om 00:57 UTC](https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991/3 "2026-07-20T00:57:21Z")

</div>

Would be nice to have that in the toolbar - especially for those not using markdown, eh?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [20 juli 2026 om 01:05 UTC](https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991/4 "2026-07-20T01:05:33Z")

</div>

not sure but i think this component can add customized buttons? at any rate it isn’t super hard for anyone with some programming skills to make a theme component. i have no use for it myself but i supposed i could help someone with it if they want. not sure about the wysiwyg composer, i never use it.

> [@Composer Button Bonanza](https://meta.discourse.org/t/composer-button-bonanza/352525):
>
> warning The richtext (single-pane, WYSIWYG) editor is incomplete and does not yet properly support this theme component. information_sourceSummary Composer Button Bonanza allows a site admin to define and add new markup buttons to the Composer toolbar, and provides a bonanza of new buttons in its default configuration.hammer_and_wrenchRepository [centertap/DiscourseComposerButtonBonanza - Codeberg.org](https://codeberg.org/centertap/DiscourseComposerButtonBonanza.git)eyesReadme [README.md](https://codeberg.org/centertap/DiscourseComposerButtonBonanza/src/branch/main/README.md)spiral_notepadRelease Notes [RELEASE-NOTE…](https://codeberg.org/centertap/DiscourseComposerButtonBonanza/src/branch/main/RELEASE-NOTES.md)

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [20 juli 2026 om 06:15 UTC](https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991/5 "2026-07-20T06:15:55Z")

</div>

It’s also possible to use backticks (``` + txt), which will keep the formatting, but you might not like the styling

 ![CleanShot 2026-07-20 at 08.24.46@2x](https://global.discourse-cdn.com/meta/original/4X/0/6/6/066b626cfbcd6bef888c263ef787237918eb1eaa.png)

Or in rich text editor:

 ![CleanShot 2026-07-20 at 08.25.11@2x](https://global.discourse-cdn.com/meta/original/4X/e/6/7/e67fa273bd717656d1dffaec71ce2c1c692571bd.png)

becomes:

```txt
hello world
 this is a line with a leading space
  this is a line with 2 leading spaces
   this is a line with 3 leading spaces

```

And if you have access to TC, you could add some small CSS to mitigate it:

```plaintext
code.lang-txt, pre code.lang-txt {
  font-family: cursive;
  font-size: inherit;
  background: transparent;
  color: inherit;
}
pre:has(code.lang-txt) {
  background: transparent;
  border: none;
  padding: 0;
}

```

Which looks like (for example):

 ![CleanShot 2026-07-20 at 08.19.42@2x](https://global.discourse-cdn.com/meta/original/4X/1/8/8/18846987500b0d1fd41b26d82a33b52b10215fe7.png)

Typing ``` is an easy skill to teach and likely becomes a habit fast.

---

<div class="post-metadata">

### Author: ![rdweb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rdweb/32/517575_2.png) [@rdweb](https://meta.discourse.org/u/rdweb)
#### Post date: [20 juli 2026 om 06:57 UTC](https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991/6 "2026-07-20T06:57:30Z")

</div>

I think the 2 simplest solutions are:

1. Using “Preformatted text”:  
Just type the text with spaces, select it and then use the ![image](https://global.discourse-cdn.com/meta/original/4X/2/3/0/23002d9188990127c423a6827493e4b39fdfde9e.png) button to format the text.  
Alternatively, you can select the lines and type CTRL+E.  
This is exactly the same as the _backticks_ solution suggested above.

2. Use the `<pre>` HTML tag _(I know you asked about solutions avoiding HTML, but this is very simple)_:  
Surround the text with the HTML tags, like this:

---

<div class="post-metadata">

### Author: ![pinetree1111](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinetree1111/32/571161_2.png) [@pinetree1111](https://meta.discourse.org/u/pinetree1111)
#### Post date: [20 juli 2026 om 07:14 UTC](https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991/7 "2026-07-20T07:14:05Z")

</div>

Thanks so much for your comments. I have programming experience that I have not used for a long time (and had forgotten about &nbsp), I’ll see if I can play with this in the morning. We have a tech team that would integrate the forum into the new website if we decide to use it permanently, so it sounds like they may be able to create a button for the average user.

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [21 juli 2026 om 23:49 UTC](https://meta.discourse.org/t/is-there-a-simple-way-to-not-strip-leading-spaces-and-other-formatting-in-a-poem/407991/8 "2026-07-21T23:49:37Z")

</div>

you might find this post (and topic) useful too

> [@Post formatting using &nbsp; for tab indentations](https://meta.discourse.org/t/post-formatting-using-nbsp-for-tab-indentations/393109/8):
>
> I’ll give you some quick CSS formatting tips you can use for blog-style posts. you’re doing indentation wrong. the proper way to do it with CSS is like this (indentation standard is 2em): in common.scss [data-theme-indent="indent"] { text-indent: 2em; } in your post: \<div data-theme-indent="indent"\> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam \</div\> A…

there is also link in that topic to a simple composer toolbar button addition for formatting text that i quickly made one day.
