It can't be done in Java like in Python. However if you are using Eclipse go to Window->Preferences->Java->Editor->Typing The last check box is "Escape text when pasting into a String literal". Check that. Now when you paste when your cursor is between quotation marks it'll be escaped.
Read full article from Simple/Direct/Heredoc way of constructing a HTML string in Java - Stack Overflow
No comments:
Post a Comment