Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Text range object
- From: javascript@xxxxxxxxxx (Andrew Gibson)
- Subject: [Javascript] Text range object
- Date: Thu, 30 May 2002 17:38:38 +1200
Thanks cory I did. The problem was that on hitting an enter button, it threw(correctly) a <br> into the HTML source. But it also enclosed the previous line in a <p> </p> or something like that, meaning an extra line. So I just replaced the <br> 's with '' and seemes to work ok.. > Hello, Andrew. Did you ever find a solution to your problem? > > Bests, > -cory- > > Subject: [Javascript] Text range object > > > I'm trying to replace the HTML code in a text range > > say I select some text "<b>test</b>" > > // this selects the range > var r=document.selection.createRange() > > // this can delete the text in the range > r.text="" > > but leaves the html portion as "<b></b>" > > I gather r.textHTML is a read only property so I can't change it that way! > > I wan to be able to remove or edit the html portion > > eg > > "<b>text</b>" >> "text" >
- References:
- [Javascript] Text range object
- From: Cory Mercurio
- [Javascript] Text range object
- Prev by Date: [Javascript] nested "for" statements
- Next by Date: [javascript] UNSUBSCRIBE
- Previous by thread: [Javascript] Text range object
- Next by thread: [Javascript] modal windows anyone?
- Index(es):