volume_up

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

volume_up

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

Overriding XHtmlString Output

Hi all,

We have a requirement that when an editor inserts a link to a document from within the TinyMCE editor, when the content is rendered we need to override how the link to the document is shown - specifically, we need to insert the file size next to the link, so it would look something like:

lorem ipsum Open Document (34kb) lorum ipseum etc etc.

I could create a UIHint, get a handle on the value (i.e. the content the editor has input) and then search the HTML for a link. Outside of EPiServer I'd probably use the HTML agility pack, but I know EPiServer has built in string parsing capabilities - deos anyone have any thoughts?

thanks in advance guys

Al

#73103
Jul 05, 2013 14:16

Hey Alf,

That's my approach - a custom renderer and then decorate the property with the UIHint attribute.

What I was actually looking for is any help around parsing the string itself - I know there is built-in string parsing in EPiServer so wondered if there is any way of parsing the XHhtml and detecting a link? Any thoughts?

Thanks again

Al

#73121
Jul 06, 2013 14:02
error This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.