1,105,556 Community Members

getSelection() remove html and replace with text

Member Avatar
softDeveloper
Junior Poster in Training
76 posts since Nov 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi all,

how can we replace the getSelection HTML in an iframe?

I want to getSelection() and the replace selection's html with simple text.

Member Avatar
softDeveloper
Junior Poster in Training
76 posts since Nov 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

found it:

self.parent.frames[i].getSelection().anchorNode.parentNode.outerHTML=self.parent.frames[i].getSelection().anchorNode.parentNode.innerHTML;
Question Self-Answered as of 2 Years Ago
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article