Corsol Posted October 30, 2022 Share Posted October 30, 2022 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 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 30, 2022 Share Posted October 30, 2022 Hello, Can you please specify first, which edition and build of UniGUI are you using? Quote Link to comment Share on other sites More sharing options...
Corsol Posted October 31, 2022 Author Share Posted October 31, 2022 My version is 1.90.0.1543 for delphi Tokyo. Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 31, 2022 Share Posted October 31, 2022 44 minutes ago, Corsol said: My version is 1.90.0.1543 for delphi Tokyo. Okay. Not trial? Quote Link to comment Share on other sites More sharing options...
Corsol Posted October 31, 2022 Author Share Posted October 31, 2022 2 hours ago, Sherzod said: Okay. Not trial? no, commercial licenced Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 31, 2022 Share Posted October 31, 2022 11 minutes ago, Corsol said: no, commercial licenced Okay. Please adjust your forum email address first: Quote Link to comment Share on other sites More sharing options...
Corsol Posted October 31, 2022 Author Share Posted October 31, 2022 1 hour ago, Sherzod said: Okay. Please adjust your forum email address first: ok, but the owner of my licence is the company where i work for. i need ti ask for additional info to my manager. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 31, 2022 Share Posted October 31, 2022 1 minute ago, Corsol said: ok, i'll do. Thanks. Quote Link to comment Share on other sites More sharing options...
MassimoD Posted October 31, 2022 Share Posted October 31, 2022 1 hour ago, Sherzod said: Thanks. Hi, i'm here with my manager account for the same question. Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 31, 2022 Share Posted October 31, 2022 1 hour ago, MassimoD said: i'm here with my manager account for the same question. Hi, I see you as a subscriber. But please adjust your forum email address to get more features from the forum. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 31, 2022 Share Posted October 31, 2022 You can try this approach, for example: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniHTMLMemo1.JSInterface.JSCall('insertAtCursor', ['insert text']); end; Quote Link to comment Share on other sites More sharing options...
MassimoD Posted October 31, 2022 Share Posted October 31, 2022 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 Quote Link to comment Share on other sites More sharing options...
MassimoD Posted November 1, 2022 Share Posted November 1, 2022 Solution worked perfectly! Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.