From bd279ac150258ff41e3474dde823a81dd10d805e Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Tue, 31 Jan 2023 15:19:50 +0100 Subject: [PATCH 1/3] Update @matrix-org/matrix-wysiwyg to 0.23.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1906e1e580d..8b8c3209f59 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@matrix-org/analytics-events": "^0.4.0", - "@matrix-org/matrix-wysiwyg": "^0.22.0", + "@matrix-org/matrix-wysiwyg": "^0.23.0", "@matrix-org/react-sdk-module-api": "^0.0.3", "@sentry/browser": "^7.0.0", "@sentry/tracing": "^7.0.0", diff --git a/yarn.lock b/yarn.lock index b1c415e85b2..f5f4930289a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1589,10 +1589,10 @@ resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-js/-/matrix-sdk-crypto-js-0.1.0-alpha.2.tgz#a09d0fea858e817da971a3c9f904632ef7b49eb6" integrity sha512-oVkBCh9YP7H9i4gAoQbZzswniczfo/aIptNa4dxRi4Ff9lSvUCFv6Hvzi7C+90c0/PWZLXjIDTIAWZYmwyd2fA== -"@matrix-org/matrix-wysiwyg@^0.22.0": - version "0.22.0" - resolved "https://registry.yarnpkg.com/@matrix-org/matrix-wysiwyg/-/matrix-wysiwyg-0.22.0.tgz#53f1e80d9ae7be0940e0ca905a3952804b029b29" - integrity sha512-3b5jGMI56zcqZ2PktrSPMAbzfWmkdupuzcLeemWQ0fT8QuiG4dA72NUxdDyarlz+1eQ+Qm4fu9j/zsPlvNpy8g== +"@matrix-org/matrix-wysiwyg@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@matrix-org/matrix-wysiwyg/-/matrix-wysiwyg-0.23.0.tgz#32242b18ae9dbb28d920c31f50bbac87ff4317fe" + integrity sha512-wO5KYznlfsSIMo0R8tyZqfvZrPkQMaL1qBHzhaeKIsC4vK4MnJ9mj6JiS6+XiuHJyc9nqN+IdeUjKyJOnStHaA== "@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz": version "3.2.14" From bddb97678df1f823bc14740aba67a920e028982e Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Tue, 31 Jan 2023 16:15:18 +0100 Subject: [PATCH 2/3] 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={} /> +