block snippets lose formatting
block snippets lose formatting
I read in the doc:
Block Snippets If you insert a snippet on a blank line in a topic, it is inserted as a block snippet and takes up all of the room so that no other content can be added. Block snippets are best for multiple paragraphs, lists, and other large chunks of content.
But despite inserting the snippet into a blank <p> tag, I lose the formatting.
Block Snippets If you insert a snippet on a blank line in a topic, it is inserted as a block snippet and takes up all of the room so that no other content can be added. Block snippets are best for multiple paragraphs, lists, and other large chunks of content.
But despite inserting the snippet into a blank <p> tag, I lose the formatting.
You do not have the required permissions to view the files attached to this post.
-
Nita Beck
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: block snippets lose formatting
Just to confirm that it's been inserted as a snippet block, look in the code. Do you see "SnippetBlock" or "SnippetText"? My hunch is that this is snippet text wrapped with a <p> tag, given that I don't see a snippet block structure bar to its left (in the XML Editor), just the p structure bar.
Nita

RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
Jon Harding
- Jr. Propeller Head
- Posts: 2
- Joined: Thu May 05, 2016 7:25 am
Re: block snippets lose formatting
Hi guys,
I'm currently having a similar problem with a snippet losing some of its formatting. In my case, it's the soft returns and the "Note:" autotext that vanish.
Here's how it looks in the snippet: ...and here's how it comes out in the XML Editor: I thought your hunch might be right, Nita, but it does appear to be a snippet block. When I tried inserting the snippet into a larger block of text, all the formatting vanished as expected. Are there certain kinds of formatting that can't be used in snippets?
I'm currently having a similar problem with a snippet losing some of its formatting. In my case, it's the soft returns and the "Note:" autotext that vanish.
Here's how it looks in the snippet: ...and here's how it comes out in the XML Editor: I thought your hunch might be right, Nita, but it does appear to be a snippet block. When I tried inserting the snippet into a larger block of text, all the formatting vanished as expected. Are there certain kinds of formatting that can't be used in snippets?
You do not have the required permissions to view the files attached to this post.
-
Nita Beck
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: block snippets lose formatting
The fact that the auto-numbered "Note" disappears is a quirk of the XML Editor. Don't worry about it. How does the topic look when previewed or in output? I suspect it'll render correctly.
In response to what happens when one inserts a snippet with multiple blocks into a larger block of stuff, well, that means it's being inserted as snippet text and *will* lose its internal formatting because it will assume the formatting of the larger block of stuff it's being inserted into.
All this said, I'm ever so slightly beginning to suspect a bug somewhere. Can you post what the snippet when inserted into a topic looks like in the topic's code, so we can examine that?
In response to what happens when one inserts a snippet with multiple blocks into a larger block of stuff, well, that means it's being inserted as snippet text and *will* lose its internal formatting because it will assume the formatting of the larger block of stuff it's being inserted into.
All this said, I'm ever so slightly beginning to suspect a bug somewhere. Can you post what the snippet when inserted into a topic looks like in the topic's code, so we can examine that?
Nita

RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: block snippets lose formatting
As a workaround, in your snippet instead of using soft returns to give the spacing, you could put the content into three separate paragraphs. Does look like a bit of a bug in its current form though.
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
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
-
Jon Harding
- Jr. Propeller Head
- Posts: 2
- Joined: Thu May 05, 2016 7:25 am
Re: block snippets lose formatting
Oh man.
Well, I am a pretty new Flare user, and the lesson here is "always preview before getting frustrated." Everything seems to render just fine. The "Note" autotext, the soft returns, it all looks as intended in the final output. Guess it's just that XML editor quirk you mentioned, Nita. I imagine this would take care of the OP's bullet points as well.
Thanks for everyone's help!
Well, I am a pretty new Flare user, and the lesson here is "always preview before getting frustrated." Everything seems to render just fine. The "Note" autotext, the soft returns, it all looks as intended in the final output. Guess it's just that XML editor quirk you mentioned, Nita. I imagine this would take care of the OP's bullet points as well.
Thanks for everyone's help!
-
StraygoatWriting
- Sr. Propeller Head
- Posts: 125
- Joined: Thu Mar 05, 2015 4:24 am
- Location: Chesterfield, Derbyshire, UK
- Contact:
Re: block snippets lose formatting
I've seen the snippetBlock and snippetText thing cause a few issues, most notably when snippets are email address links. It is easy to fix, but I've no idea why it happens. Is it just me or does Flare seem a bit random when it comes to allocating a snippet Block or Text status?
-
BedfordWriter
- Sr. Propeller Head
- Posts: 231
- Joined: Wed Jun 23, 2010 10:13 am
- Location: Nova Scotia
Re: block snippets lose formatting
I bumped into this today and am currently fixing it in a bunch of topics. Was about to post in the Tips & Tricks forum, but checked first and found this thread.
The difference is that a snippetText is meant to go inside a sentence and so the <p> tags are ignored. (At a minimum. Haven't experimented to see what else goes.) A snippetBlock stands on its own and preserves the paragraph breaks.
Where I got into trouble is that a lot of places where I thought I was replacing a paragraph with a snippet, I was only replacing the text between the <p>...</p> tags. Flare spotted what I was doing and helpfully gave me a snippetText instead of the snippetBlock that I thought I was inserting.
If you look at your source code and see something like...
then there's your problem.
The moral is to keep an eye on the tags along the edge of the editor. If you have a snippet, but you don't see a tag for a snippetBlock, then you've got a snippetText.
The difference is that a snippetText is meant to go inside a sentence and so the <p> tags are ignored. (At a minimum. Haven't experimented to see what else goes.) A snippetBlock stands on its own and preserves the paragraph breaks.
Where I got into trouble is that a lot of places where I thought I was replacing a paragraph with a snippet, I was only replacing the text between the <p>...</p> tags. Flare spotted what I was doing and helpfully gave me a snippetText instead of the snippetBlock that I thought I was inserting.
If you look at your source code and see something like...
Code: Select all
<p>
<MadCap:snippetText src="../Resources/Snippets/TheGreatSnippet.flsnp" />
</p>The moral is to keep an eye on the tags along the edge of the editor. If you have a snippet, but you don't see a tag for a snippetBlock, then you've got a snippetText.
-
armplinker
- Propeller Head
- Posts: 21
- Joined: Fri Oct 05, 2012 7:41 am
- Location: Bedford MA
Re: block snippets lose formatting
It is absolutely inserting these as a snippetText by default. Switching the ones that were supposed to be para to snippetBlock solved the issue for me.
-
ChoccieMuffin
- Senior Propellus Maximus
- Posts: 2650
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: block snippets lose formatting
I think it must be how you are inserting them.armplinker wrote:It is absolutely inserting these as a snippetText by default. Switching the ones that were supposed to be para to snippetBlock solved the issue for me.
If you have your cursor in a paragraph that contains ANY text then when you insert a snippet (Ctrl-R or the button on the local toolbar) then you'll get SnippetText.
If your cursor is in an empty paragraph and you insert the snippet, it comes in as SnippetBlock.
So if you want a snippet block after the current paragraph, remember to press Return, and it should work fine.
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
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
-
armplinker
- Propeller Head
- Posts: 21
- Joined: Fri Oct 05, 2012 7:41 am
- Location: Bedford MA
Re: block snippets lose formatting
Maybe so but these were within a <div></div> by themselves. Anyway the point is to check the snippet type if formatting gets wiped by Flare.
