Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Publii removing stuff from embedded JS scripts??

  • #10201
    Avatar photo[anonymous]

    Hi there,

    I am pasting this embedable ecommerce script from Ecwid into my page but it seems like publii is rewriting or removing stuff after I save?

    Here is the code I am pasting in…

    Any ideas how to fix this?

    <div class=”ecsp ecsp-SingleProduct-v2 ecsp-SingleProduct-v2-bordered ecsp-Product ec-Product-567457709″ itemscope itemtype=”http://schema.org/Product&#8221; data-single-product-id=”567457709″>

    <div itemtype=”http://schema.org/Offer&#8221; itemscope itemprop=”offers”>

    <script data-cfasync=”false” type=”text/javascript” src=”https://app.ecwid.com/script.js?78987762&data_platform=singleproduct_v2&#8243; charset=”utf-8″></script><script type=”text/javascript”>xProduct()</script>

    #10202
    Avatar photoBob

    It’s highly likely that your code is being truncated by the Tiny editor. That’s why I recommend using a block editor, especially an HTML block.

    #10210
    Avatar photo[anonymous]

    Thanks, and so the code block would be more for?

    #10213
    Avatar photoBob

    The Code block is dedicated to displaying your code, while the HTML block to rendering your code.

    #10219
    Avatar photo[anonymous]

    Hi,

    You can also try to add script as extended valid element: https://getpublii.com/blog/release-042.html (Additional Option for Handling custom_elements) if you need to use WYSIWYG editor 🙂