mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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}
|
ref={renderCallback}
|
||||||
value={val}
|
value={val}
|
||||||
theme={getTheme()}
|
theme={getTheme()}
|
||||||
|
language={UserContext.viewLang === 'zh' ? 'zh-CN' : UserContext.viewLang?.replace('_', '-')}
|
||||||
noMermaid
|
noMermaid
|
||||||
noPrettier
|
noPrettier
|
||||||
noKatex
|
noKatex
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'md-editor-rt/lib/style.css';
|
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 Anchor from 'markdown-it-anchor';
|
||||||
import Footnote from 'markdown-it-footnote';
|
import Footnote from 'markdown-it-footnote';
|
||||||
import Mark from 'markdown-it-mark';
|
import Mark from 'markdown-it-mark';
|
||||||
@@ -43,6 +44,11 @@ config({
|
|||||||
codeMirrorExtensions(extensions) {
|
codeMirrorExtensions(extensions) {
|
||||||
return extensions.filter((i) => i.type !== 'linkShortener');
|
return extensions.filter((i) => i.type !== 'linkShortener');
|
||||||
},
|
},
|
||||||
|
editorConfig: {
|
||||||
|
languageUserDefined: {
|
||||||
|
'zh-TW': zh_TW,
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export { MdEditor };
|
export { MdEditor };
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
"@types/redux-logger": "^3.0.13",
|
"@types/redux-logger": "^3.0.13",
|
||||||
"@types/uuid": "^11.0.0",
|
"@types/uuid": "^11.0.0",
|
||||||
"@types/webpack-env": "^1.18.8",
|
"@types/webpack-env": "^1.18.8",
|
||||||
|
"@vavt/cm-extension": "^1.11.2",
|
||||||
"@vscode/codicons": "^0.0.44",
|
"@vscode/codicons": "^0.0.44",
|
||||||
"ajv": "^8.18.0",
|
"ajv": "^8.18.0",
|
||||||
"allotment": "^1.20.5",
|
"allotment": "^1.20.5",
|
||||||
|
|||||||
Reference in new issue
Block a user