What would be the easiest and cleanest way to transform the description field of the product resource into a rich text field? Our customer found the field too restrictive for their purpose and they would like to be able to enter bold text, headings as well as hyperlinks in the description of each product.
Has anything been foreseen to achieve this without compromising the upgrade ability of commerce?
We already use TinyMCE as a Rich Text Engine and of course it would be convenient to instantiate this editor on the description field.
Thanks for any clue. Please note that I am not a developer and the only way to dot it for me would be through configuration.
This would be easiest if implemented in Commerce itself, I’ve logged a feature request for it. Initialising an RTE consists of a few moving parts that Commerce doesn’t currently take care of, and while it’s probably possible to do so from an extension, that may get pretty complex.
I do wonder if you may be looking at the wrong hammer though. The product description field is limited to 1024 characters, so the type of markup you’re describing sounds like that’s going to hit that limit quite quickly. This post up to here is already half of that - add a few headings or 80-character URLs and that’ll be exceeded pretty quickly.
For any extended content related to a product, you’d typically have that on the resource itself, with the description (copied into order items when added to cart) containing a brief summary of the key specs or information for the purchase. Perhaps you can handle it somewhat similar to that, where your user adds the additional content in the resource?
Thank you Mark! We will follow your advice and work with resources for now but for a future release, it would probably be worth considering two new features:
- Make description field a rich text field
- Increase the limit of the description field up to (at least) 2048 characters