title: How can i find the tag at which my cursor points in JEditorPane
body: <p>I want to know whether we can find a tag in JEditorPane in java swing where my cursor is pointing..
  For ex.
  following is the text content in my editor pane..</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;body&gt;
  &lt;div&gt;&lt;!--Cursor inside the div tag--&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>for instance suppose this is the text inside my editor pane. and my cursor is inside the  tag. now what i want is a function that returns me the tag in which the cursor is. Is it possible?</p>
  
  <p>Here cursor is in <code>&lt;div&gt;</code> tag so function should return <code>"div"</code> or <code>"&lt;div&gt;"</code>.</p>