Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aef8e71

Browse files
deleted Post content @
1 parent 4629fb4 commit aef8e71

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

‎help/5-MessageQueue/7-@.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,4 +608,16 @@ discuss-detail:
608608
</script>
609609
</body>
610610
</html>
611+
```
612+
613+
## 帖子@ —— 禁用掉
614+
由于使用了markdown帖子发布,会出现帖子里的@指向GitHub用户的情况,遂禁用
615+
616+
```javascript
617+
// 拦截 @ 符号输入
618+
$('#test-editormd').on('keypress', function(e) {
619+
if (e.which === 64) { // ASCII code for @
620+
e.preventDefault();
621+
}
622+
});
611623
```

‎src/main/resources/templates/site/publish-posts.html‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<!doctype html>
21
<html lang="en" xmlns:th="https://www.thymeleaf.org">
32
<head>
43
<meta charset="utf-8">
@@ -81,6 +80,13 @@ <h5 class="modal-title" id="hintModalLabel">提示</h5>
8180
imageUpload: false,
8281
placeholder: "欢迎来到帖子发布界面~ 本论坛支持 Markdown/非Markdown 格式的帖子~"
8382
});
83+
84+
// 拦截 @ 符号输入
85+
$('#test-editormd').on('keypress', function(e) {
86+
if (e.which === 64) { // ASCII code for @
87+
e.preventDefault();
88+
}
89+
});
8490
});
8591

8692
$(function() {

‎src/main/resources/templates/site/update-posts.html‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ <h5 class="modal-title" id="hintModalLabel">提示</h5>
8383
imageUpload: false,
8484
placeholder: "欢迎来到帖子编辑界面~ 本论坛支持 Markdown/非Markdown 格式的帖子~"
8585
});
86+
87+
// 拦截 @ 符号输入
88+
$('#test-editormd').on('keypress', function(e) {
89+
if (e.which === 64) { // ASCII code for @
90+
e.preventDefault();
91+
}
92+
});
8693
});
8794

8895
$(function() {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /