Forum


Replies: 8   Views: 4616
Auto highlight the text when background color is set
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by anzai408  · 21-02-2014 - 08:16

Hi, I encounter a issue here When I using the replaceTemplateVariableByHTML. I am trying to adopt the html table to the doc. What I encountered is when I try to put background-color to the row, it will auto hilight the row text which I do not want.



Here is my code. 



$table = '<table style="border-collapse: collapse;">

                      <tr style="background-color:#9bbb59; color:red; font-weight: bold;">

                          <td>

                              <span style="font-family: Calibri; font-size: 21pt">No</span>

                          </td>

                          <td>

                              <span style="font-family: Calibri; font-size: 21pt">Test</span>

                          </td>

                          <td>

                              <span style="font-family: Calibri; font-size: 21pt">Dest</span>

                          </td>

                      </tr>

                      <tr>

                          <td>

                              <span style="font-family: Calibri; font-size: 21pt">Just Try</span>

                          </td>

                          <td>

                              <span style="font-family: Calibri; font-size: 21pt">Just Try</span>

                          </td>

                          <td>

                              <span style="font-family: Calibri; font-size: 21pt">Just Try</span>

                          </td>

                      </tr>

                  </table>';



$docx->replaceTemplateVariableByHTML('TABLE_1', 'block', $table, array('isFile' => false, 'parseDivsAsPs' => false, 'downloadImages' => true));



 





 


Posted by jorgelj  · 21-02-2014 - 09:22

Hello,



We're checking the issue to be fixed.



Regards.


Posted by anzai408  · 21-02-2014 - 10:02

I found a solution, but this is not really good. You can try to set the background-color of the particular text to none, but I don't think this is good practise. Hope vendor can solve it as soon as possible.



<span style="font-family: Calibri; font-size: 21pt; background-color:none;">No</span>


Posted by jorgelj  · 24-02-2014 - 09:04

Hello,



Yes, that's a quick fix that you can use meanwhile we add a better approach.



Regards.


Posted by dssa  · 30-04-2014 - 16:35

Hi,



Is there any prevision about the correction of this bug?



Thanks!

Regards


Posted by jorgelj  · 30-04-2014 - 17:12

Hello,



The next version we'll add new options to do that.



Regards.


Posted by dssa  · 07-05-2014 - 19:16

Hello,



Do you have a provisional date for the new version?



if i buy v3.7 Pro+, can i download de new version?



or the best for me it's waiting new version to buy?



Thanks!



Regards.


Posted by bigease  · 04-12-2014 - 14:58

Is the fix for this problem going to make a v3 version, or do I have to pay for v4 to get this fix?

Posted by admin  · 05-12-2014 - 09:54

Hello, When you set the style as: 1_1 . It works perfectly. Every issue is fixed in all versions of the library. Regards.