Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 814747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:34:16+00:00 2026-05-15T01:34:16+00:00

So I have a textarea containing text. I want to be able to display

  • 0

So I have a textarea containing text. I want to be able to display a tooltip when my mouse is hovered a certain word inside the textarea.

Is this possible at all? I would prefer to see a solution that doesn’t use any third party javascript libraries.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:34:17+00:00Added an answer on May 15, 2026 at 1:34 am

    If you’re willing to use a “richtext” field (eg contentEditable and designMode), you can wrap the word with a <span> and attach mouseover and mouseout events to it. The big drawback with this approach is that “richtext” features that you may not want can be invoked with keyboard shortcuts in some browsers even if you don’t provide an interface for them, and you’ll need to filter those styles either while editing or after saving to a <textarea>.

    Alternatively, you can have a hidden (but not display: none, as this will prevent accurate measurement) <div>* and update its content as the <textarea> changes, wrap the word with a <span> as in the option above, and display the tooltip if the cursor position’s offset relative to the <textarea> is within bounds that would be over the <span> relative the hidden <div>. To determine position you’d probably want to start a mousemove event observer if there is a mouseover event on the <textarea>, and stop the mousemove event if there is a mouseout event on the <textarea>.

    * Note: In order to ensure correct positioning, this <div> should have exactly the same font, text, line and dimensional styles as the textarea, and when mirroring the content you’ll need to escape HTML special characters (&, < and >), as well as convert new lines to <br> tags.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have textarea in the UI which i display text inside it from db
I have a textarea inside a form (form action=post) and a link under this
I have textarea in my site(link shortening site) i want to user enter some
I have a textarea and a button. button on click event i pick text
I have a textarea that I'm able to edit with the jeditable plugin but
Hi I have made a program that reads a text file containing words and
I have a textarea element what i want to limit to, lets say, 100
I have text containing multi-byte characters as shown: 위키백과, 백과사전. 대수(λ -, lambda -)는
Have textarea wrapped in parent div element. This textarea becomes visible only when parent
I have textarea and i want, when i post the form if there are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.