Catalog>Product>text description with color

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
WGSF
Posts: 22
Joined: 04 Apr 2023, 11:12

Catalog>Product>text description with color

Post by WGSF » 30 May 2023, 14:42

Laravel 10, Aimeos 2022, php 8.1

Hello,
Is there a way to set colored text (or use html tag) in long or short description of a product ?

kdim95
Advanced
Posts: 195
Joined: 26 Aug 2022, 12:17

Re: Catalog>Product>text description with color

Post by kdim95 » 31 May 2023, 08:33

Hello,

You can read about the ckeditor configuration here:
https://aimeos.org/docs/2022.x/admin/jq ... #customize

By default only the tags div, p, span are allowed.

You can edit the HTML by clicking the three dots on the top right of the editor window and clicking "Source".

By default you can only add classes, no styles, no attributes, but you can override the config in your extension:
/packages/your-extension/themes/admin/jqadm/custom.js

You put this code in your custom.js and change what you want:

Code: Select all

Aimeos.ckeditor.htmlSupport = {
  allow: [{
    name: /div|p|span/,
    attributes: false,
    classes: true,
    styles: false,
  }],
  disallow: []
};

WGSF
Posts: 22
Joined: 04 Apr 2023, 11:12

Re: Catalog>Product>text description with color

Post by WGSF » 31 May 2023, 19:42

Thanks a lot for that complete answer

Post Reply