Tidying up Text Editor content - any easy way?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Tidying up Text Editor content - any easy way?

Post by ChoccieMuffin »

Hi all. In some of my topics, when I look at them in the Text Editor, they're neatly laid out, making them easy to follow, so something like this (the underline isn't there, it's just to show the spacing):
<p>This is a paragraph</p>
<ul>
___<li>This is a list.</li>
</ul>
etc

But in some topics, for some reason things are all squished up:
<p>This is a paragraph</p><ul><li>This is a list.</li></ul>

Is there any way I can get a topic that's been squished to be more legible in a text editor? It's a very small thing, but would be nice.

Answers on a postcard please!
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
paul_collins
Propeller Head
Posts: 25
Joined: Thu May 22, 2014 7:25 am

Re: Tidying up Text Editor content - any easy way?

Post by paul_collins »

I normally see that where you have nested lists. To make it display over separate lines you need to ensure the parent list item is enclosed in <p> tags, for example:

Code: Select all

<li>
  <p>parent item:</p>
  <ul>
     <li>sublist</li>
  </ul>
</li>
without the paragraph tags you'll see it as:

Code: Select all

<li>parent item:<ul><li>sublist</li></ul></li>
It also makes it far easier to see the wood from the trees when looking at changes in a version control system.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2650
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Tidying up Text Editor content - any easy way?

Post by ChoccieMuffin »

Thanks, paul_collins, but I disagree with your suggestion that having <p>s inside <li>s would fix it, because I have lots of topics where the lists are displayed beautifully in the Text Editor window without having <p>s inside them. And it's not just lists, it's everything, even in topics that don't contain any lists, so I think your suggestion is a dead end. But thanks for responding! I have been tidying up lists a bit anyhow, but once the topic is displaying all squished up, even editing the lists as you suggest doesn't fix the display problem.

Given that's what my topics look like now, is there anything I can do (a find-and-replace, open in some other application, something else?) that I can do so that the linefeeds appear again?
Started as a newbie with Flare 6.1, now using Flare 2024r2.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
AlexFox
Sr. Propeller Head
Posts: 265
Joined: Thu Oct 19, 2017 1:56 am

Re: Tidying up Text Editor content - any easy way?

Post by AlexFox »

You could probably use some regex to insert a line break at the end of certain closing tags, but this seems like it would be arduous. When I see this happen it's usually because something has removed the existing line break characters, I've never been able to consistently replicate it though.

Edit: Also you can just open the topic in something like VS Code and right click and format document :)
Post Reply