Forum


Replies: 3   Views: 1898
Get contents (with info of style)
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 IHD  · 24-01-2019 - 16:23

Hi!

I think i might manage to implement a solution using transformDocAdvHTML and then try to figure out the content's style by the classname. 

On a separate but similar note: Is there any way to include an attribute for a peice of text (inserted with addText or embedHTML), which may later be "retrieved" by transformDocAdvHTML?

For example:

$text = '<customTag hiddenvalue="10">15</customTag>';
// and then 
$docx->embedHTML($text);
// or
$docx->addText($text);

I was trying to follow the implementation of embedHTML to see if I could make a custom WordML such as <w:customTag hiddenvalue="10">... but I do not see the big picture in this fix.