From bddb97678df1f823bc14740aba67a920e028982e Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Tue, 31 Jan 2023 16:15:18 +0100 Subject: [PATCH] Add indent and unindent actions to RTE --- .../room/composer/indent_decrease.svg | 10 ++++++++++ .../room/composer/indent_increase.svg | 10 ++++++++++ .../components/FormattingButtons.tsx | 14 ++++++++++++++ .../components/FormattingButtons-test.tsx | 4 ++++ 4 files changed, 38 insertions(+) create mode 100644 res/img/element-icons/room/composer/indent_decrease.svg create mode 100644 res/img/element-icons/room/composer/indent_increase.svg diff --git a/res/img/element-icons/room/composer/indent_decrease.svg b/res/img/element-icons/room/composer/indent_decrease.svg new file mode 100644 index 00000000000..660c3e55ca0 --- /dev/null +++ b/res/img/element-icons/room/composer/indent_decrease.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/res/img/element-icons/room/composer/indent_increase.svg b/res/img/element-icons/room/composer/indent_increase.svg new file mode 100644 index 00000000000..f40162e05de --- /dev/null +++ b/res/img/element-icons/room/composer/indent_increase.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx index 80f2563d1d8..7bc4b33d412 100644 --- a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx +++ b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx @@ -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={} /> +