forked from External/mage
* Fixed chat command handling (\list), the user chat input is now escaped to prevent using html tags.
This commit is contained in:
parent
54ec3b658e
commit
0a068e2258
7 changed files with 53 additions and 41 deletions
|
|
@ -38,9 +38,13 @@ public class ColorPane extends JTextPane {
|
|||
|
||||
public void append(String s) {
|
||||
try {
|
||||
setEditable(true);
|
||||
kit.insertHTML(doc, doc.getLength(), s, 0, 0, null);
|
||||
int len = getDocument().getLength();
|
||||
setCaretPosition(len);
|
||||
setEditable(false);
|
||||
|
||||
// setEditable(true);
|
||||
//
|
||||
//
|
||||
// StyleContext sc = StyleContext.getDefaultStyleContext();
|
||||
// AttributeSet aset = sc.addAttribute(SimpleAttributeSet.EMPTY, StyleConstants.Foreground, color);
|
||||
|
|
@ -51,7 +55,7 @@ public class ColorPane extends JTextPane {
|
|||
// setCharacterAttributes(aset, false);
|
||||
// replaceSelection(s);
|
||||
//
|
||||
// setEditable(false);
|
||||
//
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue