diff --git a/package.json b/package.json index cb17d44351c..9a2c2b9265c 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.19.0", + "@matrix-org/matrix-wysiwyg": "^0.20.0", "@matrix-org/react-sdk-module-api": "^0.0.3", "@sentry/browser": "^7.0.0", "@sentry/tracing": "^7.0.0", diff --git a/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss b/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss index 21db71a774b..cc805e1ac1e 100644 --- a/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss +++ b/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss @@ -44,9 +44,21 @@ limitations under the License. padding-inline-start: $spacing-28; } + blockquote { + color: #777; + border-left: 2px solid $blockquote-bar-color; + border-radius: 2px; + padding: 0 10px; + + margin-block-start: 0; + margin-block-end: 0; + margin-inline-start: 0; + margin-inline-end: 0; + } + // model output always includes a linebreak but we do not want the user // to see it when writing input in lists - :is(ol, ul, pre) + br:last-of-type { + :is(ol, ul, pre, blockquote) + br:last-of-type { display: none; } diff --git a/res/img/element-icons/room/composer/quote.svg b/res/img/element-icons/room/composer/quote.svg new file mode 100644 index 00000000000..82cc2d28752 --- /dev/null +++ b/res/img/element-icons/room/composer/quote.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx index c80857b9f16..80f2563d1d8 100644 --- a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx +++ b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx @@ -22,6 +22,7 @@ import { Icon as BoldIcon } from "../../../../../../res/img/element-icons/room/c import { Icon as ItalicIcon } from "../../../../../../res/img/element-icons/room/composer/italic.svg"; import { Icon as UnderlineIcon } from "../../../../../../res/img/element-icons/room/composer/underline.svg"; import { Icon as StrikeThroughIcon } from "../../../../../../res/img/element-icons/room/composer/strikethrough.svg"; +import { Icon as QuoteIcon } from "../../../../../../res/img/element-icons/room/composer/quote.svg"; import { Icon as InlineCodeIcon } from "../../../../../../res/img/element-icons/room/composer/inline_code.svg"; import { Icon as LinkIcon } from "../../../../../../res/img/element-icons/room/composer/link.svg"; import { Icon as BulletedListIcon } from "../../../../../../res/img/element-icons/room/composer/bulleted_list.svg"; @@ -126,6 +127,12 @@ export function FormattingButtons({ composer, actionStates }: FormattingButtonsP onClick={() => composer.orderedList()} icon={} /> +