Shopify themes, liquid, logos, and UX
Can someone report this bug to the Polaris/Admin Shopifolk Team?
Looks like the latest admin RTE is stripping div attributes when expanding.
Steps to reproduce
1. Add in the admin RTE code a div with some attributes, eg <div itemscope>Some Text</div>
2. Go back to text mode and add a new line, text or paragraph
3. Go back to code mode, the attributes are stripped:
Here's a video: https://monosnap.com/file/hjpWixH0nSoJWrIyYlsCLQ3efP4lDW
HALP - this is causing an insane amount of issues with all my products and blog posts content 😕
Hi @shopGroves
Shopify editor might be not allow to add these type attributes in divs
So getting this issue.
Shopify allow classes and Ids as attributes.
Thanks
Shuvam
I swear this was working up until recently when the RTE was updated.
Hi - can you plz provide an example? TY 😃
Go to settings > custom data
Create products metafields.
Then you can manage metafileds data from product admin page.
You have to add metafileds ID in product liquid file where you want to display the content.
Thanks
Shuvam
Thank you - however I don't think metafields would work for us as we're not looking for a dynamic solution. Just to write some FAQ divs into our posts manually. This used to work I'm sure 😕
Need to add different Faqs for each product?
Metafield is best solution for this, To manage the FAQ's dynamic for all products.
If you want to use the same FAQ for all the products then we can manage that through the coustomizer.
using the custom JS and css we create the FAQ acoordion.
It will take approx 3-4 Hours.
If need any help from my end Please let me know, Contact info is in signature.
With Regards,
Shuvam
Thanks for your reply. However, you are missing the point. I'm not looking for a metafield dynamic solution nor an accordion FAQ.
I just need to add manual itemscope info data in the RTE editor of my blog posts. It used to work with the previous RTE admin version, but now it is stripping those attributes if you follow my steps in the first post ^
Try adding the following in the RTE editor code option and save in product or blog article - looks good.
<div itemscope itemtype="https://schema.org/FAQPage">
<div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<h3 itemprop="name">When is the best time to shop at discount home stores?</h3>
<div itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>The best time to shop at discount home stores is typically early morning on weekdays when new shipments arrive. Most stores receive deliveries 2-3 times per week, with Tuesday and Wednesday being common restocking days. Additionally, shop during seasonal transitions (January/February and July/August) for the deepest discounts on clearance items.</p>
</div>
</div>
</div>
</div>
Issue is when you go back to the editor to add some lines or text, and re-save, it will strip those said attributes.
This is a bug.
Learn what's possible with customizing Shopify Checkout beyond what's available out of...
By Shopify Feb 19, 20252m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025