javascript Programming Glossary: textnodes
Consolidate stacked DOM formatting elements - contenteditable DIV http://stackoverflow.com/questions/16226671/consolidate-stacked-dom-formatting-elements-contenteditable-div slow and even one could easily modify it to process entire textNodes but solution 1 seems like a better approach if it only worked..
getElementsByTagName() equivalent for textNodes http://stackoverflow.com/questions/2579666/getelementsbytagname-equivalent-for-textnodes equivalent for textNodes Is there any way to get the collection of all textNode objects.. document.body NodeFilter.SHOW_TEXT null false var node var textNodes while node walker.nextNode textNodes.push node.nodeValue Recursive.. false var node var textNodes while node walker.nextNode textNodes.push node.nodeValue Recursive Tree Traversal function customRecursiveTreeWalker..
How do I select text nodes with jQuery? http://stackoverflow.com/questions/298750/how-do-i-select-text-nodes-with-jquery . function getTextNodesIn node includeWhitespaceNodes var textNodes nonWhitespaceMatcher S function getTextNodes node if node.nodeType.. nonWhitespaceMatcher.test node.nodeValue textNodes.push node else for var i 0 len node.childNodes.length i len..
Cross Browser Selection Range Library? http://stackoverflow.com/questions/3454152/cross-browser-selection-range-library sel rangy.getSelection var ranges sel.getAllRanges var textNodes textNode el i len j jLen for i 0 len ranges.length i len i range.. an array of valid nodeTypes in this case text nodes only textNodes range.getNodes 3 for j 0 jLen textNodes.length j jLen j textNode.. text nodes only textNodes range.getNodes 3 for j 0 jLen textNodes.length j jLen j textNode textNodes j el templateElement.cloneNode..
Highlight text range using JavaScript http://stackoverflow.com/questions/6240139/highlight-text-range-using-javascript selection setting code function getTextNodesIn node var textNodes if node.nodeType 3 textNodes.push node else var children node.childNodes.. getTextNodesIn node var textNodes if node.nodeType 3 textNodes.push node else var children node.childNodes for var i 0 len.. node.childNodes for var i 0 len children.length i len i textNodes.push.apply textNodes getTextNodesIn children i return textNodes..
Raphael JS: how to change the color of certain letters within a text-element? http://stackoverflow.com/questions/7942269/raphael-js-how-to-change-the-color-of-certain-letters-within-a-text-element #7c7c7c #00aff2 var letterSpace 5 var xPos 10 var yPos 10 textNodes text.split ' ' for var i 0 i textNodes.length i var textColor.. xPos 10 var yPos 10 textNodes text.split ' ' for var i 0 i textNodes.length i var textColor colors i var textNode paper.text xPos.. i var textColor colors i var textNode paper.text xPos yPos textNodes i textNode.attr 'text anchor' 'start' 'font size' 12 'fill'..
Why does an onclick property set with setAttribute fail to work in IE? http://stackoverflow.com/questions/95731/why-does-an-onclick-property-set-with-setattribute-fail-to-work-in-ie
|