From a1293aff228595cafe2c730d9fb5dbdb1241c3d8 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Sat, 4 May 2024 17:35:47 +0800 Subject: [PATCH] feat: add justify-all property to row flex #535 --- docs/en/guide/schema.md | 3 ++- docs/en/guide/shortcut-internal.md | 4 ++++ docs/guide/schema.md | 3 ++- docs/guide/shortcut-internal.md | 4 ++++ index.html | 3 +++ src/assets/images/justify.svg | 7 ++++++ src/editor/core/draw/Draw.ts | 22 +++++++++++++------ src/editor/core/shortcut/keys/richtextKeys.ts | 8 +++++++ src/editor/dataset/enum/Row.ts | 3 ++- src/editor/utils/element.ts | 2 ++ src/main.ts | 12 ++++++++++ src/style.css | 4 ++++ 12 files changed, 65 insertions(+), 10 deletions(-) create mode 100644 src/assets/images/justify.svg diff --git a/docs/en/guide/schema.md b/docs/en/guide/schema.md index 3ab9de7..93bf789 100644 --- a/docs/en/guide/schema.md +++ b/docs/en/guide/schema.md @@ -39,7 +39,8 @@ interface IElement { LEFT = 'left', CENTER = 'center', RIGHT = 'right', - ALIGNMENT = 'alignment' + ALIGNMENT = 'alignment', + JUSTIFY = 'justify' }; rowMargin?: number; letterSpacing?: number; diff --git a/docs/en/guide/shortcut-internal.md b/docs/en/guide/shortcut-internal.md index 33e6b13..0f76cbc 100644 --- a/docs/en/guide/shortcut-internal.md +++ b/docs/en/guide/shortcut-internal.md @@ -132,6 +132,10 @@ Feature: Line right Feature: Both sides are aligned +## Ctrl/Cmd + Shift + J + +Feature: Line justify + ## Ctrl + Shift + X Feature: Strikethrough diff --git a/docs/guide/schema.md b/docs/guide/schema.md index b4ec204..c4078c7 100644 --- a/docs/guide/schema.md +++ b/docs/guide/schema.md @@ -39,7 +39,8 @@ interface IElement { LEFT = 'left', CENTER = 'center', RIGHT = 'right', - ALIGNMENT = 'alignment' + ALIGNMENT = 'alignment', + JUSTIFY = 'justify' }; rowMargin?: number; letterSpacing?: number; diff --git a/docs/guide/shortcut-internal.md b/docs/guide/shortcut-internal.md index 1ae9ca8..1bc1a3f 100644 --- a/docs/guide/shortcut-internal.md +++ b/docs/guide/shortcut-internal.md @@ -132,6 +132,10 @@ 功能:两端对齐 +## Ctrl/Cmd + Shift + J + +功能:分散对齐 + ## Ctrl + Shift + X 功能:删除线 diff --git a/index.html b/index.html index 2cbbdcc..a40ba94 100644 --- a/index.html +++ b/index.html @@ -158,6 +158,9 @@ +