Reviewed-on: #397 Co-authored-by: miteruzo <miteruzo@naver.com> Co-committed-by: miteruzo <miteruzo@naver.com>
このコミットはPull リクエスト #397 でマージされました.
このコミットが含まれているのは:
@@ -22,6 +22,11 @@ import 'react-markdown-editor-lite/lib/index.css'
|
||||
import type { User, WikiPage } from '@/types'
|
||||
|
||||
const mdParser = new MarkdownIt
|
||||
const FIXED_WIKI_EDITOR_VIEW = { menu: true, md: true, html: true } as const
|
||||
|
||||
// `wiki_editor_mode` is still kept in backend settings, but the common
|
||||
// settings screen does not expose it at present. Until that UI returns, the
|
||||
// editor stays on the fixed split view here.
|
||||
|
||||
type Props = { user: User | null }
|
||||
|
||||
@@ -92,6 +97,7 @@ const WikiNewPage: FC<Props> = ({ user }) => {
|
||||
{() => (
|
||||
<MdEditor value={body}
|
||||
style={{ height: '500px' }}
|
||||
config={{ view: FIXED_WIKI_EDITOR_VIEW }}
|
||||
renderHTML={text => mdParser.render (text)}
|
||||
onChange={({ text }) => setBody (text)}/>)}
|
||||
</FormField>
|
||||
|
||||
新しい課題から参照
ユーザをブロックする