Sign in

Publii removing stuff from embedded JS scripts??

  • This topic has 4 replies, 3 voices, and was last updated 2 months, 3 weeks ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #10201
    Avatar photoprintpeppermint

    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.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #10210
    Avatar photoprintpeppermint

    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.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #10219
    Avatar photoTomasz Dziuda

    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 🙂

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.