Jump to content

Insert html into UniHtmlMemo at current cursor postion


Recommended Posts

  • 4 weeks later...
I try to get cursor position inside a TUniHtmlMemo on client side with js.

The problem is that the TUniHtmlMemo I need to access the textarea of the component (ctl retun more div html tag).

Somebody can help?


function Onclick(sender)




    var ctl = document.getElementById(sender.id);

    if (ctl != null) 


      var startPos = ctl.selectionStart;

      /*var endPos = ctl.selectionEnd;*/






    txt="There was an error on this page.\n\n";

    txt+="Error description: " + err.message + "\n\n";

    txt+="Click OK to continue.\n\n";




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.

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.

  • Create New...