Snippet alignment inside a table cell

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
Peter_J_user
Posts: 6
Joined: Thu Dec 16, 2021 4:20 pm

Snippet alignment inside a table cell

Unread post by Peter_J_user »

Hello team,

To insert a snippet with a different paragraph style than "Normal", I insert the snippet with "Snippet begins a new paragraph" unchecked.
This works when the snippet is in the middle of a paragraph or when the snippet is a separate paragraph with a different style than "Normal".

However, this does not work when inserting a snippet inside a table cell (at the beginning of the cell) with a different style than "Normal" (Note: The text inside the snippet has "Normal" style). In Help+Manual editor, the snippet alignment looks OK. But after compilation to html, the alignment disappears (see the attached example1.png). Is this a bug?

I found a workaround: adding an empty space before the snippet solves the issue and html looks as expected (see the attached example2.png).

Another solution would be to adjust the style inside the snippet. However, I want to use the same snippet in several places inserted with different styles (inserted differently in a table cell and differently in the middle of a paragraph).
You do not have the required permissions to view the files attached to this post.
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Snippet alignment inside a table cell

Unread post by Tim Green »

Hi Peter,

Snippets are actually the same as copying and pasting text, with everything that entails. The preview of a linked snippet may not show exactly how it is going to be inserted, as it can only show what it looks like at source.

As to inserting snippets without the new paragraph option: That is really only for insertion within other paragraphs, because it is explicitly for inline text. If you use it for an entire paragraph you will lose the paragraph formatting, and it will then just be inserted inside a standard paragraph. So for inserting in a table, activate the new paragraph option and make sure that the paragraph in the snippet is formatted the way you want to have it. :)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
michal_novomesky
Posts: 53
Joined: Thu Jan 12, 2012 2:21 pm
Contact:

Re: Snippet alignment inside a table cell

Unread post by michal_novomesky »

A good option is to use padding-left, instead of adding empty space to the beginning of each table cell. In this case, you can continue using inline snippets.

We use "Normal Table" style for text elements in table cells.

Code: Select all

      <styleclass name="Normal Table" parentclass="Normal List" shortcut="24768">
        <style-set media="screen" type="para">margin-right:6px; margin-left:8px;</style-set>
      </styleclass>
Post Reply