Forums / General / tag "tr" attribute problem

tag "tr" attribute problem

Author Message

source pixel

Tuesday 24 July 2007 4:19:55 am

Hi

Problem with class attribute of tag "<tr>" with "Online editor" switched on

I have created such a table with "Online editor"

Example:

<table class="table_style"  border="0" cellpadding="2" cellspacing="0"  width="200">
  <tr class="tr_style1">
    <td class="td_style1">1</td>
    <td class="td_style1">2</td>
    <td class="td_style1">3</td>
  </tr>
  <tr class="tr_style2">
    <td>4</td>
    <td>5</td>
    <td>6</td>
  </tr>
</table>

After next editing tags "<tr>" lose class attribute.
so instead of <tr class="tr_style1"> we get <tr>

But if online editor is off attribute don't disappear.

Help to solve the problem.

Xavier Serna

Tuesday 24 July 2007 5:57:22 am

You need to configure the styles that you want to use for each element (in this case tr), in and override for content.ini. And then assign the styles to each element in the OE.

An example:

[tr]
AvailableClasses[]
AvailableClasses[]=myTRstyle1
AvailableClasses[]=myTRstyle2

for more reference see the default content.ini file, inside settings.

hth!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

source pixel

Wednesday 25 July 2007 12:12:40 am

Hi, Thanks for the answer.
Yes I have written so in a configuration file (content.ini.append.php),

<?php /* #?ini charset="utf-8"?

[tr]
AvailableClasses[]=tr_style1
AvailableClasses[]=tr_style2

[td]
AvailableClasses[]=td_style1
AvailableClasses[]=td_style2

[table]
AvailableClasses[]
AvailableClasses[]=table_style
*/ ?>

I have created such a table with "Online editor"

Example:

<table class="table_style"  border="1" cellpadding="2" cellspacing="0"  width="100%">
    <tr class="tr_style1">
       <td valign="top" class="td_style1">  
          <p>
            1
         </p>
      </td>
       <td valign="top" class="td_style1">  
          <p>
            2
         </p>
      </td>
   </tr>
    <tr class="tr_style2">
      <td valign="top" class="td_style2">  
         <p>
           3
         </p>
     </td>
      <td valign="top" class="td_style2">  
         <p>
           4
        </p>
    </td>
   </tr>
</table>

<b>After next editing tags "<tr class="tr_style1">" lose class attribute, we get "<tr>"</b>

<textarea class="box" name="ContentObjectAttribute_data_text_844" cols="90" rows="10">
&lt;p&gt;&lt;table id='table' class='table_style' width='100%' ezborder='1' border='1'&gt;&lt;tr&gt;&lt;td class='td_style1'&gt;&lt;p&gt;1&lt;/p&gt;&lt;/td&gt;&lt;td class='td_style1'&gt;&lt;p&gt;2&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class='td_style2'&gt;&lt;p&gt;3&lt;/p&gt;&lt;/td&gt;&lt;td class='td_style2'&gt;&lt;p&gt;4&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
</textarea>
<p><table id='table' class='table_style' width='100%' ezborder='1' border='1'><tr><td class='td_style1'><p>1</p></td><td class='td_style1'><p>2</p></td></tr><tr><td class='td_style2'><p>3</p></td><td class='td_style2'><p>4</p></td></tr></table></p><p>&nbsp;</p>

<b>but the problem is not solved.

Help to solve the problem.</b>

Kristof Coomans

Thursday 26 July 2007 2:30:24 am

Hi, can you tell us which version of
- eZ publish
- Online Editor
you are using?

Does the same issue happen when the online editor is disabled?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

source pixel

Thursday 26 July 2007 3:45:02 am

Hi

- eZ publish: 3.9.0 (3.9.0)
- Online Editor: 4.2

If I switch off Online Editor, a class in tag "<tr class="tr_style1">" attribute will work.

Kristof Coomans

Thursday 26 July 2007 5:46:38 am

I can confirm the wrong behavior in Mozilla Firefox (2.0.0.5), with OE 4.2.3. Can you please report this in the issue tracker ( http://issues.ez.no/ProjectSelect.php?Id=4 ) and crosslink with this forum topic?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org