(How to) Copy/Manipulate all parsed output/displayed text for use as real text?
Apparently, there are no universal references to nodes further down the DOM list than the root node. You have to traverse the DOM, using a tree-navigating algorithm, until you find what you're looking for.
YET, we can simply drag our mouse across a web page of text, highlight that text, copy it, and post it to a text file........ so easy we don't think about it.
Is it possible to NOT traverse the DOM, but instead....
.... grab everything from the 1st to the last part of the display....
.... and paste it as text ....
In effect, a function to mimic the 'highlight, copy, & paste, commands': Where everything on a page is copied, but only the text gets pasted to text?
- For this application all the display pages would be the same, other than the changing text (arriving from google's translation server).
- I understand that all browsers may be slightly different.
- Clearly a universal solution would be ideal, but one for Chrome would be a good start.
I am confident that there will be a simple way to do this, however I have yet to discover a programmer who knows that method (and for me, I lack the in depth experience needed, to generate a solution to this apparently fundamental problem).
I found you via:
There is a direct link to Coding Forums :)