0

I use PrestaShop to create some CMS pages in HTML. I would like to add some Schema.org structured data into my code, but when I paste the HTML and save the page, all the Microdata disappears. I guess the WYSIWYG editor doesn't allow me to add that.

Example

<div itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">

PrestaShop keeps the <div> and clears the Microdata attributes. Do you know a way to solve that?

  • Related questions: [How to insert microdata into tinymce 5x](https://stackoverflow.com/q/65542540/19579546) + [tinymce extended_valid_elements for Microdata](https://stackoverflow.com/q/28241172/19579546) + [Correctly format boolean tag attributes with tinymce editor plugin](https://stackoverflow.com/q/10168207/19579546) – Stefan - brox IT-Solutions Sep 08 '22 at 07:36

2 Answers2

0

Make sure that in your backoffice Shop Parameters > General "Use HTMLPurifier Library" is turned off.

This will prevent TinyMCE to remove some HTML content during validation.

If your micro-data content is still wiped, you should either apply some modifications in core during TinyMce initialisation , or (better) develop a simple module that inject your Microdata in CMS pages with Prestashop hooks.

gennaris
  • 1,467
  • 1
  • 11
  • 17
0

The TinyMCE integrated in prestashop get a lot a limited features in his configuration.

You will need to edit TinyMCe configuration in /js/admin/tinymce.inc.js

HeineFR
  • 11
  • 2