A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
search
AI OnAI Off
I've got a client that wants srcset to be used in place of img tags when rendering an xhtmlstring property.
I've tried the following methods with limited success:
1) Override the display template for xhtmlstring...Difficult parsing html using regex.
It's working for a single img tag but when the xhtmlstring has other markup...results are unpredictable. Difficult getting the perfect regex.
2) Created a TinyMCE plugin allowing the editor to select an img and convert to srcset via a button.
Not a great editor experience as the actions are disconnected. Which leads on to attempt #3
3) Replicate / override the dnd processor plugin and epi-image-tool tinymce plugin.
Difficult overriding in TinyMCE plugins. The img markup generated in the javascript, there doesn't seem to be a way to inject my own html or hook to an event to override just that part.
Has anyone had success in this area?
Does anyone know what processor is used to compile Episerver.CMS.TinyMce module?
My last attempt is to modify the files and then compile/pack my own version of it and not rely on the one in the nuget feed.