Jump to content

Link in TUniDBHTMLMemo


Janex
 Share

Recommended Posts

Hi all.

 

When I add link in TUniDBHTMLMemo via embeded toolbar, link is added without "target='new'" and when i click on link, it is opened

in the same browser window/tab :( And back button not work in unigui.:(

Question - is there some easy way to add "target='new'" without programmatic change HTML ?

 

WBR

Janex

 

 

Link to comment
Share on other sites

Hi Janex.

If I understand correctly, try:

 

UniDBHTMLMemo1 -> ClientEvents -> ExtEvents -> add afterrender function:

function afterrender(sender, eOpts)
{
  sender.toolbar.getComponent('createlink').handler = function() {
    var url = prompt(this.createLinkText, this.defaultLinkValue);
    if (url && url != 'http:/' + '/') {
      this.relayCmd('insertHTML', "<a href='" + url + "' target='_blank'>" + this.getDoc().getSelection() + "</a>");    
   }
 }
}

This code simply adds a "target".
I do not know, but by using the links UniDBHTMLMemo1, of clicking behavior before and after changing the code does not work for me.

 

Try...

 

Best regards.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...