Forum


Replies: 9   Views: 3585
Rtl lists generation from html
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 nregev  · 10-12-2016 - 00:48

Hi there,

Unfortunately, these solutions don't seem to work.

replaceVariableByHTML, if I understand correctly, only works for template.
when I do try to use it, the code just crashes.
the code I tried looks something like this :

$html = '<p>$testing$</p>';

$doc = new CreateDocx();
$doc->setRTL();
$doc->embedHTML($html);

$doc->replaceVariableByHTML('testing', 'block', '<p>testing 123</p>');

also tried to add the code to HTML2WordML as per your suggestion but this didn't seem to work either.
(with setRTL and changing the configuration as suggested).

the HTML I've tested was this :

<ul dir="rtl">
   <li dir="rtl">
      aaa
   </li>
   <li dir="rtl">
      bbb
   </li>
</ul>

Any further sugestions ?

Nir.