How to aviod HTML Tag removement on text item content

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
frimi
Posts: 15
Joined: 02 Oct 2020, 15:25

How to aviod HTML Tag removement on text item content

Post by frimi » 15 Dec 2020, 14:27

I create text items via

Code: Select all

 $newTextItem = $textMgr->create();
 $newTextItem->setType('long');
 $newTextItem->setDomain('product');
 $newTextItem->setLabel('Beschreibung');
 $newTextItem->setContent('Text with some html <tags>');
In the Backend, all <tags> are removed. If I enter <tags> in the backend via RTE, the <tags> will be stored without problems.

What should I do to aviod the <tag> replacement/supression?

Thank for your support ans and kind regards, Michael

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: How to aviod HTML Tag removement on text item content

Post by aimeos » 17 Dec 2020, 14:26

You have to overwrite this configuration in your own file and add the allowed tags:
https://github.com/aimeos/ai-admin-jqad ... min.js#L22
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

frimi
Posts: 15
Joined: 02 Oct 2020, 15:25

Re: How to aviod HTML Tag removement on text item content

Post by frimi » 18 Dec 2020, 10:54

Super, thank you. I'll try this. If I change that in my installation - what would happen on a upgrade of the shop extension?

User avatar
aimeos
Administrator
Posts: 7889
Joined: 01 Jan 1970, 00:00

Re: How to aviod HTML Tag removement on text item content

Post by aimeos » 20 Dec 2020, 13:08

Add the JS to your own Aimeos extension in ./admin/jqadm/themes/custom.js:
https://aimeos.org/docs/latest/admin/jqadm/customize/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply