Aug 24, 2022
0
Level 5
Appending All Image Tags Within a Text Field.
I have a "posts" editor that uses CKEditor. It allows a user to upload an image as part of the content they are creating. The entire HTML text blob gets stored in a text field in the database. I have since created a link that produces a PDF of the post. The problem is I need to append ALL image tags in the html text blob with the "public_path".
Outside of the text blob, I add images to the PDF using something like {{ public_path('/images/featured/'. $post->featured_image) }}
Can someone please explain to me the best way to do this?
Please or to participate in this conversation.