herrmiller
Programmer
Hey, i'm building a DOM rich text editor and i have run into a few problems but i have one question for now...
i know i can easily use surroundContents() to add a new tag around some text... but what is the best way to remove it? so far i have been trying to select the entire node, extract the contents and create a new node with just the text content, and completely replace the old one with the new extracted one.
i'm mainly producing it for firefox and mozilla so no need to take into account inconcistencies with internet explorer btw.
thanks!
i know i can easily use surroundContents() to add a new tag around some text... but what is the best way to remove it? so far i have been trying to select the entire node, extract the contents and create a new node with just the text content, and completely replace the old one with the new extracted one.
i'm mainly producing it for firefox and mozilla so no need to take into account inconcistencies with internet explorer btw.
thanks!