Adding custom attributes to TRichViewEdit.

General TRichView support forum. Please post your questions here
Post Reply
yorax31
Posts: 1
Joined: Sat May 10, 2025 6:26 pm

Adding custom attributes to TRichViewEdit.

Post by yorax31 »

Is it possible to add custom HTML attributes (like 'data-id', 'data-type' etc.) to specific elements (e.g., images, tables, spans) within TRichViewEdit? I need to store some metadata alongside the content for processing later. I've explored the HTML export options but haven't found a straightforward way to inject these custom attributes. Any suggestions or examples would be greatly appreciated! I'm using Delphi 10.4.
Sergey Tkachenko
Site Admin
Posts: 17836
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Adding custom attributes to TRichViewEdit.

Post by Sergey Tkachenko »

There is no easy way to do it.
In the next update, I'll extend functionality of OnSaveHTMLExtra event to allow adding additional attributes when saving non-text items.
Post Reply