/ Published in: Java

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
int start = textArea.getSelection(0).getStart(); text = java.util.regex.Pattern.compile("(?sm)$.*?^[ \t]*").matcher(textArea.getSelectedText()).replaceAll(""); textArea.replaceSelection(text); textArea.setSelection(new Selection.Range(start, start + text.length()));
Comments
