Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
How to put value to mouse focused position Angular

I have angular form textarea

<textarea class="form-control"                        
                        id="message"
                        formControlName="message"
                        (focus)="onFocusEvent($event)"
></textarea>

and button that add text to the end of

<button (click)=addText()></button>

addText() {
const customText: string = 'customText';
this.form.setValue({message: this.form.get('message').value + '\n' + customText});
}

I'd like to add customText to place based on where mouse is located on now. How can I determine that place? possible using onFocus event?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Determining the mouse position is easy with Rxjs. Look at the following example:

Stackblitz - MouseMove

After this, you can create a method that determines the message to display based on the mouse result.

I hope this helps.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!