Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

set cursor position between HTML/Text views of the page

Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
in my application i have HTML editing capability via HTMLEditorKit (via JEditorPane fundamentally)...
i have a radio button that allows switching between HTML view of the page and the Text view of the page. when i switch from HTML to Text view my cursor (caret) goes to the top of the page but i want to have it pointing to the corresponding HTML location it was at in the HTML view..
basically, if you have used Dreamweaver you will know it..they have two frames one with HTML view and the other with coding that shows view with HTML tags when we select something on one frame it also selects corresponding text on the second frame automatically..i want the same thing with little simplicity...i want only caret position to maintain...
how can i do this?
[ March 13, 2003: Message edited by: Maulin Vasavada ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic