Advanced TinyMCE editor (CMS pages) for PrestaShop 1.6 and 1.7
Come back
14

Advanced TinyMCE editor (CMS pages) for PrestaShop 1.6 and 1.7

To display different elements in the editor tinyMce will have to turn off in the admin panel in the general settings HTMLPurifier, because when editing and saving in the editor, some elements are not saved. The editor itself for descriptions is set by default for regular descriptions, for your information I attach a screenshot where you can disable:

html tinymce off


The file that we will edit is called tinymce.inc.js and is located in the JS folder of the store root or in the folder /js/admin/tinymce.inc.js.
By default, the editor looks like

before

Now open the file tinymce.inc.js editor and replace the entire contents of the file with the following code and save.


As a result, we get the following form:

after

But that is not all. As in the case of adding a video in the article We will also have to edit the file Validate.php Finding a method isCleanHtml


And already radically remove the part that forbids us to insert certain HTML code
The method will look like:


Now both the video and the improved functionality of the text editor will work without errors.

Attention there is a module for editing html code in tinyMce!
You can edit the page description with text editor code, by presenting the html code in a convenient format. Using two editors to choose from and possible settings, that's all for tinyMCE editor, in which you write html code.
created:
20.09.2020
updated:
15.11.2022
author:
admin
Tags
yandex metrika