Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
How to Insert text as link in UltraFormattedTextEditor
posted

hi,

I want to add some string(expression : e.g. #{name}# or ${name}$). When I add this expression it should appear as link in the UltraFormattedTextEditor. And also when I clcik on that it should trigger an event.

is there any way to do that?

If yes, Please give me some sample example

Thanks in advance,

Regards,

Santosh

 

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi Santosh,

    I find that the easiest way to learn how to do something in the UltraFormattedTextEditor is to use the designer. If you place an UltraFormattedTextEditor on a form and go to the Value property, you can click the button to bring up the designer.

    The designer has a button on the toolbar to allow you to add a link. You can use the two tabs to see what the control will look like and also to see the XML that is created to achieve that look.

    So you could set the Value on the control to something like this:

    <a href="url">Display text</a>

    Then you just handle the LinkClicked event and set e.OpenLink to true. This will prevent the control from trying to launch the URL you provided automatically. You can then handle it however you want.

     

     

Reply Children