Skip to content
This repository has been archived by the owner on May 19, 2020. It is now read-only.

Commit

Permalink
feat(src): finalize block quote shortcut
Browse files Browse the repository at this point in the history
Signed-off-by: irmerk <[email protected]>
  • Loading branch information
jolanglinais committed Mar 12, 2020
1 parent 0f1ad73 commit c58f1d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/FormattingToolbar/toolbarTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export const capitalizeWord = word => capitalizeFirst(word) + sliceWord(word);

export const identifyBlock = (block) => {
const typeBeginning = firstTwoLetters(block);
if (typeBeginning === 'bl') return `Quote (${MOD}+Q)`;
if (typeBeginning === 'ul') return `Bulleted List (${MOD}+Shift+8)`;
if (typeBeginning === 'ol') return `Numbered List (${MOD}+Shift+7)`;
if (typeBeginning === 'bl') return `Quote (${MOD}+⇧+. )`;
if (typeBeginning === 'ul') return `Bulleted List (${MOD}++8)`;
if (typeBeginning === 'ol') return `Numbered List (${MOD}++7)`;
return null;
};
2 changes: 1 addition & 1 deletion src/SlateAsInputEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ const SlateAsInputEditor = React.forwardRef((props, ref) => {
return editor.toggleMark(CONST.FONT_ITALIC);
case isHotKey('mod+alt+c', event) && isEditable(editor, CONST.FONT_CODE):
return editor.toggleMark(CONST.FONT_CODE);
case isHotKey('mod+q', event) && isEditable(editor, CONST.BLOCK_QUOTE):
case isHotKey('mod+shift+.', event) && isEditable(editor, CONST.BLOCK_QUOTE):
return handleBlockQuotes(editor);
case isHotKey('mod+shift+7', event) && isEditable(editor, CONST.OL_LIST):
return handleList(editor, CONST.OL_LIST);
Expand Down
2 changes: 1 addition & 1 deletion src/icons/navigation-right.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as tips from '../FormattingToolbar/toolbarTooltip';

export const type = () => 'redo';

export const label = () => `Redo (${tips.MOD}+Shift+Z)`;
export const label = () => `Redo (${tips.MOD}++Z)`;

export const height = () => '25px';

Expand Down

0 comments on commit c58f1d8

Please sign in to comment.