I created a snippet with various styles. Oddly, the editor displays the heading in a different style than set in the snippet. When viewing the text in a preview, the heading has the original style again.
Any idea why?
Thanks.
snippet looks different in editor
-
- Senior Propellus Maximus
- Posts: 2634
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: snippet looks different in editor
The WYSIWYG should really be called WYSIAWYGBNQ (What you see is almost what you get but not quite). I have a similar issue where I have a Note paragraph (with auto-number text "Note: ") which looks fine when I look at the snippet itself but the auto-number text doesn't appear when the snippet is inserted into a topic. It works fine when the output is generated so I've just got used to it, but it is a bit annoying.
No idea why though. Look forward to seeing if anyone has any information.
No idea why though. Look forward to seeing if anyone has any information.
Started as a newbie with Flare 6.1, now using Flare 2023.
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
-
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: snippet looks different in editor
I think Choccie's on the right track. But in case not, your issue *might* have to do with how you're inserted the snippet.
If you insert a snippet as a "text snippet" (in the code, you'll see "snippetText"), it will inherit the styling of the paragraph or other block (e.g., list item, table cell) into which it has been inserted, although it will retain any span styling. It will also be run all together, even if internally it is structured into multiple blocks (e.g., a heading followed by a paragraph or a paragraph followed by a list). To insert a text snippet, you insert it into a block that already has some other content in it (e.g., a paragraph with some other stuff in it already). A text snippet should really contain only a single paragraph of content that can "drop into place" within something else.
By contrast, if you insert a snippet as a block snippet (in the code, you'll see "snippetBlock)," it will retain its internal styling and structure. To insert a block snippet, you insert it in an otherwise empty block (e.g., a blank paragraph).
More here on the differences: http://webhelp.madcapsoftware.com/flare ... ippets.htm in the subsection "Text and block snippets".
If you already know all this, I don't mean to bore you. I err on the side of caution when assuming a poster's Flare knowledge, plus (when I've got the time) I try to answer thoroughly for the benefit of the community.
If you insert a snippet as a "text snippet" (in the code, you'll see "snippetText"), it will inherit the styling of the paragraph or other block (e.g., list item, table cell) into which it has been inserted, although it will retain any span styling. It will also be run all together, even if internally it is structured into multiple blocks (e.g., a heading followed by a paragraph or a paragraph followed by a list). To insert a text snippet, you insert it into a block that already has some other content in it (e.g., a paragraph with some other stuff in it already). A text snippet should really contain only a single paragraph of content that can "drop into place" within something else.
By contrast, if you insert a snippet as a block snippet (in the code, you'll see "snippetBlock)," it will retain its internal styling and structure. To insert a block snippet, you insert it in an otherwise empty block (e.g., a blank paragraph).
More here on the differences: http://webhelp.madcapsoftware.com/flare ... ippets.htm in the subsection "Text and block snippets".
If you already know all this, I don't mean to bore you. I err on the side of caution when assuming a poster's Flare knowledge, plus (when I've got the time) I try to answer thoroughly for the benefit of the community.
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!
-
- Senior Propellus Maximus
- Posts: 2634
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: snippet looks different in editor
Nita, your full explanations are always welcome, so please don't stop.
I insert my Note snippets as a snippetblock, but I still don't see "Note: " in the topic in which it's been added. (Suppose I ought to add a bug report...)
I insert my Note snippets as a snippetblock, but I still don't see "Note: " in the topic in which it's been added. (Suppose I ought to add a bug report...)
Started as a newbie with Flare 6.1, now using Flare 2023.
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
-
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: snippet looks different in editor
I edited my original answer to say that I think you're on the right track. I've noticed that anomoly too (seems always to be when there's an auto-number) and I too just ignore it while editing because it comes out right in output.ChoccieMuffin wrote:I insert my Note snippets as a snippetblock, but I still don't see "Note: " in the topic in which it's been added. (Suppose I ought to add a bug report...)
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!
Re: snippet looks different in editor
I'm a relatively recent convert to Flare with what I believe to be a closely related issue re insertion of a snippet.
I have inserted a snippet (defined with a colored font) into various topics. Each topic is built around a standard, two-column table. The content is maintained within the table. After publishing the project, I find that one topic displays the snippet in the expected font color, while another doesn't. (It reverts to black.)
The Preview function accurately predicts the published outcome. If the Preview doesn't display the snippet in a colored font, the published version doesn't either.
In both cases, the snippet is listed as a snippetBlock: <MadCap:snippetBlock src="Resources/Snippets/flag_top_check_box.flsnp" />.
The same issue doesn't occur when the same content is inserted directly, and a corresponding CSS is applied. I can do this easily enough and will, if need be. But I prefer the simplicity and uniformity that the snippet format provides.
Insights most welcome.
I have inserted a snippet (defined with a colored font) into various topics. Each topic is built around a standard, two-column table. The content is maintained within the table. After publishing the project, I find that one topic displays the snippet in the expected font color, while another doesn't. (It reverts to black.)
The Preview function accurately predicts the published outcome. If the Preview doesn't display the snippet in a colored font, the published version doesn't either.
In both cases, the snippet is listed as a snippetBlock: <MadCap:snippetBlock src="Resources/Snippets/flag_top_check_box.flsnp" />.
The same issue doesn't occur when the same content is inserted directly, and a corresponding CSS is applied. I can do this easily enough and will, if need be. But I prefer the simplicity and uniformity that the snippet format provides.
Insights most welcome.
-
- Propeller Head
- Posts: 88
- Joined: Wed May 25, 2016 3:35 pm
Re: snippet looks different in editor
Not an insight, but another question: Is one snippet within a paragraph with formatting or the other not? What happens when you insert snippet into a paragraph with the CSS style of the color you want, and it is inserted as a snippet text?gsm1 wrote:I'm a relatively recent convert to Flare with what I believe to be a closely related issue re insertion of a snippet.
I have inserted a snippet (defined with a colored font) into various topics. Each topic is built around a standard, two-column table. The content is maintained within the table. After publishing the project, I find that one topic displays the snippet in the expected font color, while another doesn't. (It reverts to black.)
The Preview function accurately predicts the published outcome. If the Preview doesn't display the snippet in a colored font, the published version doesn't either.
In both cases, the snippet is listed as a snippetBlock: <MadCap:snippetBlock src="Resources/Snippets/flag_top_check_box.flsnp" />.
The same issue doesn't occur when the same content is inserted directly, and a corresponding CSS is applied. I can do this easily enough and will, if need be. But I prefer the simplicity and uniformity that the snippet format provides.
Insights most welcome.
Technical Writer using and experimenting with Flare version 12.0.5991.
-
- Senior Propellus Maximus
- Posts: 3672
- Joined: Thu Feb 02, 2006 9:57 am
- Location: Pittsford, NY
Re: snippet looks different in editor
A snippet inserted into a paragraph that already has something in it is inserted as "SnippetText" and, therefore, assumes the formatting/styling of the paragraph that contains it.paintedturtle wrote:Not an insight, but another question: Is one snippet within a paragraph with formatting or the other not? What happens when you insert snippet into a paragraph with the CSS style of the color you want, and it is inserted as a snippet text?
A snippet inserted into a paragraph that is empty is inserted as "SnippetBlock" and, therefore, retains its internal formatting/styling.
HTH
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!
Re: snippet looks different in editor
If the topics use different style sheets, or even have styles defined inline within the topics, this could affect the appearance of the snippet.
Re: snippet looks different in editor
Careful testing showed that the fourth snippet used in a tested topic (row 13) was directly responsible for invalidating the color (#8b4513) assigned to CCS > p.KRY_tip ( rows 1 & 9). It appeared in black, instead. The font-weight (Bold), however, was not affected. The entire topic is comprised of a two column / 17-row table.
In short, a snippet introduced much below two instances of a paragraph style somehow invalidated their color assignment.
The snippet in question was a two column / two row table with six bulleted glossary links. It was preceded by three other snippets, two of which included tables and bullets.
When I replaced the culprit snippet with a one-line sentence and a 2 column / 1 row table with bulleted glossary links, the issue disappeared. When I turned the new 2 column / 1 row table into a snippet and used it in the same topic, p.KRY_tip displayed the assigned color as expected.
When the new snippet replaced the old snippet in another topic with the same issue, p.KRY_tip displayed correctly in that topic, too.
Whether corrupted code is the issue or there is some sort of bug, I cannot tell.
I copied the culprit snippet to Notepad and offer it, below, for reference. Perhaps this will help someone else.
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="8" MadCap:lastHeight="109" MadCap:lastWidth="1001">
<head>
<link href="../TableStyles/Kry_nogrid.css" rel="stylesheet" MadCap:stylesheetType="table" />
</head>
<body>
<table style="mc-table-style: url('../TableStyles/Kry_nogrid.css');margin-left: 0;margin-right: auto;width: 100%;" class="TableStyle-Kry_nogrid" cellspacing="0">
<col style="width: 150px;" class="TableStyle-Kry_nogrid-Column-Column1" />
<col style="width: 150px;" class="TableStyle-Kry_nogrid-Column-Column2" />
<tbody>
<tr class="TableStyle-Kry_nogrid-Body-Body1">
<td class="TableStyle-Kry_nogrid-BodyE-Column1-Body1" style="text-align: left;padding-left: 5px;padding-right: 5px;padding-top: 4px;padding-bottom: 4px;border-right-style: none;border-right-width: 1px;border-right-color: #ffffff;border-bottom-style: none;border-bottom-width: 0px;border-bottom-color: #ffffff;">Item types are:</td>
<td class="TableStyle-Kry_nogrid-BodyD-Column2-Body1"> </td>
</tr>
<tr class="TableStyle-Kry_nogrid-Body-Body1">
<td class="TableStyle-Kry_nogrid-BodyB-Column1-Body1">
<ul class="ul_indent_1">
<li>FB - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term32">Fill in the Blank </MadCap:glossaryTerm></li>
<li>MA - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term31">Matching Answer</MadCap:glossaryTerm> </li>
</ul>
<ul class="ul_indent_1">
<li>MC - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term28">Multiple Choice</MadCap:glossaryTerm> </li>
</ul>
</td>
<td class="TableStyle-Kry_nogrid-BodyA-Column2-Body1">
<ul class="ul_indent_1">
<li>MS - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term29">Multiple Selection</MadCap:glossaryTerm> </li>
</ul>
<ul class="ul_indent_1">
<li>SA- <MadCap:glossaryTerm glossTerm="Exams Glossary.Term33">Short Answer / Essay</MadCap:glossaryTerm></li>
</ul>
<ul class="ul_indent_1">
<li>TF - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term30">True or False</MadCap:glossaryTerm> </li>
</ul>
</td>
</tr>
</tbody>
</table>
</body>
</html>
In short, a snippet introduced much below two instances of a paragraph style somehow invalidated their color assignment.
The snippet in question was a two column / two row table with six bulleted glossary links. It was preceded by three other snippets, two of which included tables and bullets.
When I replaced the culprit snippet with a one-line sentence and a 2 column / 1 row table with bulleted glossary links, the issue disappeared. When I turned the new 2 column / 1 row table into a snippet and used it in the same topic, p.KRY_tip displayed the assigned color as expected.
When the new snippet replaced the old snippet in another topic with the same issue, p.KRY_tip displayed correctly in that topic, too.
Whether corrupted code is the issue or there is some sort of bug, I cannot tell.
I copied the culprit snippet to Notepad and offer it, below, for reference. Perhaps this will help someone else.
<?xml version="1.0" encoding="utf-8"?>
<html xmlns:MadCap="http://www.madcapsoftware.com/Schemas/MadCap.xsd" MadCap:lastBlockDepth="8" MadCap:lastHeight="109" MadCap:lastWidth="1001">
<head>
<link href="../TableStyles/Kry_nogrid.css" rel="stylesheet" MadCap:stylesheetType="table" />
</head>
<body>
<table style="mc-table-style: url('../TableStyles/Kry_nogrid.css');margin-left: 0;margin-right: auto;width: 100%;" class="TableStyle-Kry_nogrid" cellspacing="0">
<col style="width: 150px;" class="TableStyle-Kry_nogrid-Column-Column1" />
<col style="width: 150px;" class="TableStyle-Kry_nogrid-Column-Column2" />
<tbody>
<tr class="TableStyle-Kry_nogrid-Body-Body1">
<td class="TableStyle-Kry_nogrid-BodyE-Column1-Body1" style="text-align: left;padding-left: 5px;padding-right: 5px;padding-top: 4px;padding-bottom: 4px;border-right-style: none;border-right-width: 1px;border-right-color: #ffffff;border-bottom-style: none;border-bottom-width: 0px;border-bottom-color: #ffffff;">Item types are:</td>
<td class="TableStyle-Kry_nogrid-BodyD-Column2-Body1"> </td>
</tr>
<tr class="TableStyle-Kry_nogrid-Body-Body1">
<td class="TableStyle-Kry_nogrid-BodyB-Column1-Body1">
<ul class="ul_indent_1">
<li>FB - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term32">Fill in the Blank </MadCap:glossaryTerm></li>
<li>MA - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term31">Matching Answer</MadCap:glossaryTerm> </li>
</ul>
<ul class="ul_indent_1">
<li>MC - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term28">Multiple Choice</MadCap:glossaryTerm> </li>
</ul>
</td>
<td class="TableStyle-Kry_nogrid-BodyA-Column2-Body1">
<ul class="ul_indent_1">
<li>MS - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term29">Multiple Selection</MadCap:glossaryTerm> </li>
</ul>
<ul class="ul_indent_1">
<li>SA- <MadCap:glossaryTerm glossTerm="Exams Glossary.Term33">Short Answer / Essay</MadCap:glossaryTerm></li>
</ul>
<ul class="ul_indent_1">
<li>TF - <MadCap:glossaryTerm glossTerm="Exams Glossary.Term30">True or False</MadCap:glossaryTerm> </li>
</ul>
</td>
</tr>
</tbody>
</table>
</body>
</html>