Skip to content

The Unified and Autonomous Development Platform

Do not show user mention and pull request reference button in normal markdown editor

robin shen48acee7f331a
diff --git a/web/src/main/java/com/gitplex/server/web/component/markdown/markdown.js b/web/src/main/java/com/gitplex/server/web/component/markdown/markdown.js
index 0d99652885..267578021b 100644
--- a/web/src/main/java/com/gitplex/server/web/component/markdown/markdown.js
+++ b/web/src/main/java/com/gitplex/server/web/component/markdown/markdown.js
@@ -512,7 +512,12 @@ gitplex.server.markdown = {
gitplex.server.markdown.autofit(containerId, $(window).width(), $(window).height());
}
});
-
+
+ if (!canMentionUser)
+ $head.find(".do-mention").remove();
+ if (!canReferencePullRequest)
+ $head.find(".do-hashtag").remove();
+
$head.find(".do-mention, .do-hashtag").click(function() {
if (!$edit.is(":visible"))
return;