Jump to content

Put custom text into uniDBHTMLMemo from button


Corsol

Recommended Posts

Hi,

is there a way to paste a specific text when i click on a button at caret position into DBHTMLMemo component?

I've this task: when user click on a button, the click event has to put a fixed text into UniDBHtmlMemo at caret position (like a placeholder or other marker text).

How to do this goal?

Thanks

Link to comment
Share on other sites

19 hours ago, Sherzod said:

You can try this approach, for example:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniHTMLMemo1.JSInterface.JSCall('insertAtCursor', ['insert text']);
end;

 

Nice idea! i've not thinked about to use JS functions... i'll try it.

Thanks

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.

×
×
  • Create New...