Forum


Replies: 3   Views: 926
Add custom attributes while adding content
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 Brightalley  · 25-08-2021 - 09:05

Is it possible to add customAttributes while adding content instead of using the customizeWordContent function after adding content? 

Something like:

$docx->addText($text, ['customAttributes' => ['id' => 'myCustomId']]);