Copy link to clipboard
Copied
I am trying to add a snippet in a dropdown text (in a table) so that when I click the dropdown text, it shows the snippet's text (another table) in the next row. I am able to do so by adding the dropdown div to the next row. Problem is that this remains intact unless I am in the Preview mode. As soon as I change the mode, the div tag automatically moves back to the previous row.
Copy link to clipboard
Copied
What version of RH? Can you show what you are talking about here? I'm not visualizing it very well...
Copy link to clipboard
Copied
I am using RH 2022.4.179. Here's the HTML of my table:
<tbody>
<tr>
<td><a class="dropspot" data-rhwidget="DropSpot" data-target="drop-down" href="#">Snippet Text</a></td>
</tr>
<tr>
<td colspan="4"><div class="droptext" data-targetname="drop-down">
<p><span data-conref="assets/snippets/Created.hts"> </span>
</p>
</div></td>
</tr>
</tbody>
Copy link to clipboard
Copied
This in the output HTML or the topic? Are you trying to add this code in the Source view of the topic?
Copy link to clipboard
Copied
Yes, the HTML for droptext div and snippet were auto-generated by using these in-built functions of RH. I just cut and paste the div to the next row.
And, it worked pretty fine, just the way I wanted. The problem is that when you switch between the Preview mode and other modes, the div tag is automatically placed in the first row.
Copy link to clipboard
Copied
So this from the topic & you're manually changing the code in the Source view - I suspect that RH is trying to "fix" the code for you - that's why it seems to not "stick" after you change it.