By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,472 Members | 1,219 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,472 IT Pros & Developers. It's quick & easy.

How to get the start and end of selected text from iframe in javascript

P: 23

I am trying to do the following in firefox.Please suggest the solution that will be applicable to firefox only.

I am having one xml and xslt file. I kept the xml file content in iframe. Now what i want is, when i select the text in iframe and click on bold link, it has to get the selected text start and end and it has to insert <b> beginning and closing tags.

For example ; This is a text

If i am selecting the text 'This' from iframe and clicking on Bold, it has to insert <b>This</b>

Dont ask me to use execCommand. we will not be having any control on that to customize on our own
Mar 24 '09 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Does this demo help?
Mar 28 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.