Uzfren Posted October 25 Share Posted October 25 (edited) I want to add an image in the body of a coverpage, however only code can be placed in the Advanced settings of these pages and cannot be placed in the text box. All the code injections I use preload my image and then it disappears when the cover page loads. This is what I've used so far for the insertion of the image. What I want to do is to for an image to be placed between 2 paragraphs in the text body. <div id="custom-container"> <p>First paragraph of text.</p> <img id="custom-image" src="URL_TO_YOUR_IMAGE.jpg" alt="Your Image Alt Text"> <p>Second paragraph of text.</p> </div> <script> // Get references to the container and the image var container = document.getElementById("custom-container"); var image = document.getElementById("custom-image"); // Create a new paragraph element for text var newParagraph = document.createElement("p"); newParagraph.textContent = "This is a dynamically added paragraph."; // Insert the new paragraph after the image container.insertBefore(newParagraph, image.nextSibling); </script> Edited October 25 by Uzfren Link to comment
tuanphan Posted October 27 Share Posted October 27 Hi, Can you share link to cover page? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment