Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

reface(ui): Update keyMap for toolbar items

robind62e11e7f97b
diff --git a/ui/src/components/Editor/ToolBars/blockquote.tsx b/ui/src/components/Editor/ToolBars/blockquote.tsx
index 30a99141..68d73cfc 100644
--- a/ui/src/components/Editor/ToolBars/blockquote.tsx
+++ b/ui/src/components/Editor/ToolBars/blockquote.tsx
@@ -29,7 +29,7 @@ const BlockQuote = () => {
const item = {
label: 'blockquote',
- keyMap: ['Ctrl-Q'],
+ keyMap: ['Ctrl-q'],
tip: `${t('blockquote.text')} (Ctrl+Q)`,
};
diff --git a/ui/src/components/Editor/ToolBars/bold.tsx b/ui/src/components/Editor/ToolBars/bold.tsx
index 6731ee07..480872ae 100644
--- a/ui/src/components/Editor/ToolBars/bold.tsx
+++ b/ui/src/components/Editor/ToolBars/bold.tsx
@@ -28,8 +28,8 @@ const Bold = () => {
const { t } = useTranslation('translation', { keyPrefix: 'editor' });
const item = {
label: 'bold',
- keyMap: ['Ctrl-B'],
- tip: `${t('bold.text')} (Ctrl+B)`,
+ keyMap: ['Ctrl-b'],
+ tip: `${t('bold.text')} (Ctrl+b)`,
};
const DEFAULTTEXT = t('bold.text');
diff --git a/ui/src/components/Editor/ToolBars/code.tsx b/ui/src/components/Editor/ToolBars/code.tsx
index a3cdbffc..df52d163 100644
--- a/ui/src/components/Editor/ToolBars/code.tsx
+++ b/ui/src/components/Editor/ToolBars/code.tsx
@@ -156,8 +156,8 @@ const Code = () => {
const item = {
label: 'code',
- keyMap: ['Ctrl-K'],
- tip: `${t('code.text')} (Ctrl+K)`,
+ keyMap: ['Ctrl-k'],
+ tip: `${t('code.text')} (Ctrl+k)`,
};
const [code, setCode] = useState({
diff --git a/ui/src/components/Editor/ToolBars/heading.tsx b/ui/src/components/Editor/ToolBars/heading.tsx
index 9ae243ef..5c22b606 100644
--- a/ui/src/components/Editor/ToolBars/heading.tsx
+++ b/ui/src/components/Editor/ToolBars/heading.tsx
@@ -61,8 +61,8 @@ const Heading = () => {
];
const item = {
label: 'heading',
- keyMap: ['Ctrl-H'],
- tip: `${t('heading.text')} (Ctrl+H)`,
+ keyMap: ['Ctrl-h'],
+ tip: `${t('heading.text')} (Ctrl+h)`,
};
const [isShow, setShowState] = useState(false);
const [isLocked, setLockState] = useState(false);
diff --git a/ui/src/components/Editor/ToolBars/hr.tsx b/ui/src/components/Editor/ToolBars/hr.tsx
index 76d08ea0..ac988a87 100644
--- a/ui/src/components/Editor/ToolBars/hr.tsx
+++ b/ui/src/components/Editor/ToolBars/hr.tsx
@@ -28,8 +28,8 @@ const Hr = () => {
const { t } = useTranslation('translation', { keyPrefix: 'editor' });
const item = {
label: 'hr',
- keyMap: ['Ctrl-R'],
- tip: `${t('hr.text')} (Ctrl+R)`,
+ keyMap: ['Ctrl-r'],
+ tip: `${t('hr.text')} (Ctrl+r)`,
};
const handleClick = (ctx) => {
context = ctx;
diff --git a/ui/src/components/Editor/ToolBars/italic.tsx b/ui/src/components/Editor/ToolBars/italic.tsx
index 8237e974..f9b0e955 100644
--- a/ui/src/components/Editor/ToolBars/italic.tsx
+++ b/ui/src/components/Editor/ToolBars/italic.tsx
@@ -28,8 +28,8 @@ const Italic = () => {
const { t } = useTranslation('translation', { keyPrefix: 'editor' });
const item = {
label: 'italic',
- keyMap: ['Ctrl-I'],
- tip: `${t('italic.text')} (Ctrl+I)`,
+ keyMap: ['Ctrl-i'],
+ tip: `${t('italic.text')} (Ctrl+i)`,
};
const DEFAULTTEXT = t('italic.text');
diff --git a/ui/src/components/Editor/ToolBars/link.tsx b/ui/src/components/Editor/ToolBars/link.tsx
index 1fadcd63..f5b7c216 100644
--- a/ui/src/components/Editor/ToolBars/link.tsx
+++ b/ui/src/components/Editor/ToolBars/link.tsx
@@ -29,8 +29,8 @@ const Link = () => {
const { t } = useTranslation('translation', { keyPrefix: 'editor' });
const item = {
label: 'link',
- keyMap: ['Ctrl-L'],
- tip: `${t('link.text')} (Ctrl+L)`,
+ keyMap: ['Ctrl-l'],
+ tip: `${t('link.text')} (Ctrl+l)`,
};
const [visible, setVisible] = useState(false);
const [link, setLink] = useState({
diff --git a/ui/src/components/Editor/ToolBars/ol.tsx b/ui/src/components/Editor/ToolBars/ol.tsx
index 468d2baf..76179cf6 100644
--- a/ui/src/components/Editor/ToolBars/ol.tsx
+++ b/ui/src/components/Editor/ToolBars/ol.tsx
@@ -28,8 +28,8 @@ const OL = () => {
const { t } = useTranslation('translation', { keyPrefix: 'editor' });
const item = {
label: 'orderedList',
- keyMap: ['Ctrl-O'],
- tip: `${t('ordered_list.text')} (Ctrl+O)`,
+ keyMap: ['Ctrl-o'],
+ tip: `${t('ordered_list.text')} (Ctrl+o)`,
};
const handleClick = (ctx) => {
diff --git a/ui/src/components/Editor/ToolBars/ul.tsx b/ui/src/components/Editor/ToolBars/ul.tsx
index 6c5d0b81..c0c5df52 100644
--- a/ui/src/components/Editor/ToolBars/ul.tsx
+++ b/ui/src/components/Editor/ToolBars/ul.tsx
@@ -28,8 +28,8 @@ const UL = () => {
const { t } = useTranslation('translation', { keyPrefix: 'editor' });
const item = {
label: 'unorderedList',
- keyMap: ['Ctrl-U'],
- tip: `${t('unordered_list.text')} (Ctrl+U)`,
+ keyMap: ['Ctrl-u'],
+ tip: `${t('unordered_list.text')} (Ctrl+u)`,
};
const handleClick = (ctx) => {