Inline template in table cell

Hi,
Some of our users are trying to insert inline template in a table cell using EditLive. Each time they do so, the inline template is inserted outside of the table and the table is duplicated. It work fine with images but not with templates.

Is there a solution for that or the EditLive does not permit that kind of use ?

Thanks,

Guillaume

Hi,

Does someone else is having the same issue ?
Is it our snippet templates that are causing that ?

Thanks,

Guillaume

We haven’t had the problem. What code do you have in your snippet? Do is contain a block level element such as a div, or another table?

All our snippet template are inside a div tab. Our snippet are working everywhere except when we try to insert it in a table in EditLive. Here is an example of one of our snippet :

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>#displayfield("displaytitle")</title>
<meta content="Percussion Rhythmyx" name="generator"/>
<link rel="stylesheet" type="text/css" href="$hecStatic/css/hec-g-1.css" />
</head>
<body>
 ## ALL SNIPPETS MUST HAVE A ROOT NODE. HERE IT IS AN DIV.
<div class="Sn">
#field("callout")
</div>
</body>
</html>

Regards,

Guillaume

Have you managed to get any other snippets to appear in line?

Yes all our snippets work in line (in Edit Live). They just don’t work when placed inside tables in line (in Edit Live).

Hi Guillaume

I’m not sure a div tag is recognised content for a table cell.

Cheers
James

I wondered the same thing. But if you mean “recognized” as in “valid HTML,” here’s an example from http://www.w3.org/TR/CSS21/tables.html:

<table>
 <tr>
  <td>
   <div> Test </div>
  </td>
 </tr>
</table>

Here is how we can reproduce the problem we have with inserting a variant in a table cell in Ephox.

  1. Create new brief item. Insert a table. (the ephox default is a 2x2). In first cell, insert a variant. All works well. Looking at the code we get something like:
<td width="50%">
  <div style=" display: inline;" sys_dependentvariantid="637" rxinlineslot="105" class="rx_ephox_inlinevariant" sys_dependentid="1184" contenteditable="false" inlinetype="rxvariant" sys_siteid="305" sys_folderid="721">
    <div class="Sn" contenteditable="false" unselectable="on">
      <h2 contenteditable="false" unselectable="on">
	 L'expérience HEC Montréal
      </h2>
    </div>
  </div>
</td>
  1. Update item and close item.
  2. Re-open item for editing. Looking at the code we see that everything is now wrapped in a div:
<div class="rxbodyfield">
  1. Insert a variant in 2nd cell. Table breaks up badly.

Does anyone know how to fix this problem ? Thanks.

Marc

Do you see anything suspicious about the HTML code that Ephox generates after you enter the variant in the second cell? Can you show it to us?

Hi Marc

From what I can see Ephox doesn’t like the parameter “rxinlineslot”. If you remove this from your code it will save OK. I’m not sure why this is happening as I dont know how Rhythmyx processes the contents of the field.

Cheers
James

One thing that i noticed was that if you delete the beginning div, then you will be able to insert templates into cells properly (at least this was the work around i told end users to do until we get 6.6 which has a later version of ephox which apparently fixes the issue).

Our TAR#: MA-08-10-0128 with techsupport.

Directions:
So,

  1. save the item,
  2. go to html view,
  3. delete the beginning div
  4. Go to design view
  5. insert inline templates as you want into table cells

Do note that the beginning div (< div class=“rxbodyfield” > ) will be inserted every time you save…