Skip to content

Commit

Permalink
Update ChinesePanel.java
Browse files Browse the repository at this point in the history
  • Loading branch information
bit4woo committed May 12, 2024
1 parent 63dc3c7 commit 738509d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/messageTab/U2C/ChinesePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,12 @@ public void display(byte[] content, boolean isRequest, String currentCharset) {

if (getter.isJSON(content, isRequest)) {
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JSON);
} else if (getter.isJavaScript(content, isRequest)){
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT);
} else {
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_HTML);
}

try {
textArea.setText(new String(newContent, currentCharset));
} catch (UnsupportedEncodingException e) {
Expand Down

0 comments on commit 738509d

Please sign in to comment.