이 문제를 해결할 설정은 없습니다. 하지만 다음 JavaScript 코드를 사용하면 구현할 수 있습니다:
테마 또는 새 테마 구성 요소에서 JS 탭에 아래 내용을 추가하세요:
import { apiInitializer } from "discourse/lib/api";
import { schedule } from "@ember/runloop";
export default apiInitializer((api) => {
const current = api.getCurrentUser();
if (!current || !current.staff) {
return;
}
// Removes anything after the first paragraph
// containing the staff notice.
api.decorateCookedElement((element, helper) => {
const post = helper?.getModel();
if (!post || !post.notice) {
return;
}
schedule("afterRender", () => {
const postNoticeMessage = document.querySelector(
`article[data-post-id="${post.id}"] .post-notice-message`
);
if (postNoticeMessage) {
postNoticeMessage.replaceWith(postNoticeMessage.firstChild);
}
});
});
});
이 정도면 충분할 것입니다.
