1

I got to know that some older version of browser take new line character as single space. Is there a method to revert back to that newline character when the content is copied? any suggestion?

kanchan
  • 77
  • 3
  • 11

1 Answers1

0

This is not possible when copying the rendered output; however if you can leverage the underlying markup you could obviously treat a newline as you desire before moving it to the clipboard.

You have to remember that the browser treats line breaks as white space characters and thus condenses the white space characters as it renders the markup.

Community
  • 1
  • 1
Aaron McIver
  • 24,527
  • 5
  • 59
  • 88
  • Thanks for your quick reply but i just wanted to know how can we get the underlying markup when we copy the content? – kanchan Dec 22 '11 at 07:02
  • You would need to parse the HTML as noted [here](http://blog.andrewpearson.org/2010/07/android-html-parsing.html). – Aaron McIver Dec 22 '11 at 14:35