Add indentation increasing/decreasing to RTE (#10034)
Add indent and unindent actions to RTE
This commit is contained in:
parent
703587b8e9
commit
918f151384
7 changed files with 45 additions and 5 deletions
|
@ -28,6 +28,8 @@ import { Icon as LinkIcon } from "../../../../../../res/img/element-icons/room/c
|
|||
import { Icon as BulletedListIcon } from "../../../../../../res/img/element-icons/room/composer/bulleted_list.svg";
|
||||
import { Icon as NumberedListIcon } from "../../../../../../res/img/element-icons/room/composer/numbered_list.svg";
|
||||
import { Icon as CodeBlockIcon } from "../../../../../../res/img/element-icons/room/composer/code_block.svg";
|
||||
import { Icon as IndentIcon } from "../../../../../../res/img/element-icons/room/composer/indent_increase.svg";
|
||||
import { Icon as UnIndentIcon } from "../../../../../../res/img/element-icons/room/composer/indent_decrease.svg";
|
||||
import AccessibleTooltipButton from "../../../elements/AccessibleTooltipButton";
|
||||
import { Alignment } from "../../../elements/Tooltip";
|
||||
import { KeyboardShortcut } from "../../../settings/KeyboardShortcut";
|
||||
|
@ -127,6 +129,18 @@ export function FormattingButtons({ composer, actionStates }: FormattingButtonsP
|
|||
onClick={() => composer.orderedList()}
|
||||
icon={<NumberedListIcon className="mx_FormattingButtons_Icon" />}
|
||||
/>
|
||||
<Button
|
||||
actionState={actionStates.indent}
|
||||
label={_td("Indent increase")}
|
||||
onClick={() => composer.indent()}
|
||||
icon={<IndentIcon className="mx_FormattingButtons_Icon" />}
|
||||
/>
|
||||
<Button
|
||||
actionState={actionStates.unIndent}
|
||||
label={_td("Indent decrease")}
|
||||
onClick={() => composer.unIndent()}
|
||||
icon={<UnIndentIcon className="mx_FormattingButtons_Icon" />}
|
||||
/>
|
||||
<Button
|
||||
actionState={actionStates.quote}
|
||||
label={_td("Quote")}
|
||||
|
|
|
@ -2144,6 +2144,8 @@
|
|||
"Underline": "Underline",
|
||||
"Bulleted list": "Bulleted list",
|
||||
"Numbered list": "Numbered list",
|
||||
"Indent increase": "Indent increase",
|
||||
"Indent decrease": "Indent decrease",
|
||||
"Code": "Code",
|
||||
"Link": "Link",
|
||||
"Edit link": "Edit link",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue