I'm trying to replace a placeholder image and that part is working fine, but I haven't found anywhere where I can link this image to a url.. Is this even possible?
I'm trying to replace a placeholder image and that part is working fine, but I haven't found anywhere where I can link this image to a url.. Is this even possible?
Hello,
To add a link to the image you should work with WordFragments, this is the method replaceVariableByWordFragment. The replacePlaceholderImage only replace the image.
Regards.
OK but how would that work? In the examples/documents I don't see images being linked only text.
Hello,
Our apologizes, image's links are using their own tags instead of the used by texts so it can't be replaced easily using the current version of phpdocx.
You can set a placeholder such as $VAR_IMAGE_URL$ in the URL image field and this var may be replaced by a new value. Please send us an email to contact[at]phpdocx.com and we'll send you a patch to be able to do this kind of replacement.
Regards.