1 / 3
Mar 2015

Squarespace allows to embed code in a page, but you have to put it outside the text flow. I need to link a word in the text to the cart.

I can obviously add a simple link to a word. This way, though, the overlay cart doesn't work. Despite I already added the appropriate jd to the header.



How can I add the HTML preserving class and target?

  • created

    Mar '15
  • last reply

    Mar '15
  • 2

    replies

  • 1.6k

    views

  • 2

    users

  • 2

    links

This help page offers our general recommendations for pasting E-junkie buttons into a SquareSpace site:

13http://www.e-junkie.com/ej/help.sites.squarespace.htm13



To do what you described, as far as I can tell, you would need to use the Code Block tool to insert your entire block of text as raw HTML including the text link. To make that link, you would start with your standard button code from Seller Admin and replace the <img ...etc.> tag with whatever text you want to be linked -- e.g., here's a dummy paragraph including a text link to the cart, such as you might use in a Code Block:



<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt <a href="https://www.e-junkie.com/ecom/gb.php?c=cart&ejc=2&cl=XXXXXX&i=YYYYYY" target="ej ejc" class="ec_ejc_thkbx" onclick="return EJEJC_lc(this);">click here to purchase</a> ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>