mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: mdeditor: add zh-TW
This commit is contained in:
3 files changed
+8
No files matched your search
@@ -176,6 +176,7 @@ export default class Editor extends DOMAttachedObject {
|
||||
ref={renderCallback}
|
||||
value={val}
|
||||
theme={getTheme()}
|
||||
language={UserContext.viewLang === 'zh' ? 'zh-CN' : UserContext.viewLang?.replace('_', '-')}
|
||||
noMermaid
|
||||
noPrettier
|
||||
noKatex
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'md-editor-rt/lib/style.css';
|
||||
|
||||
import zh_TW from '@vavt/cm-extension/dist/locale/zh-TW';
|
||||
import Anchor from 'markdown-it-anchor';
|
||||
import Footnote from 'markdown-it-footnote';
|
||||
import Mark from 'markdown-it-mark';
|
||||
@@ -43,6 +44,11 @@ config({
|
||||
codeMirrorExtensions(extensions) {
|
||||
return extensions.filter((i) => i.type !== 'linkShortener');
|
||||
},
|
||||
editorConfig: {
|
||||
languageUserDefined: {
|
||||
'zh-TW': zh_TW,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export { MdEditor };
|
||||
@@ -41,6 +41,7 @@
|
||||
"@types/redux-logger": "^3.0.13",
|
||||
"@types/uuid": "^11.0.0",
|
||||
"@types/webpack-env": "^1.18.8",
|
||||
"@vavt/cm-extension": "^1.11.2",
|
||||
"@vscode/codicons": "^0.0.44",
|
||||
"ajv": "^8.18.0",
|
||||
"allotment": "^1.20.5",
|
||||
|
||||
Reference in new issue
Block a user