From ae3de7bf55c3c6c02c220eb97da9a77a8d53ada3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BA=91=E9=A3=9E?= Date: Fri, 14 Jan 2022 14:40:19 +0800 Subject: [PATCH] feat:add superscript and subscript --- index.html | 6 ++++ src/assets/images/subscript.svg | 1 + src/assets/images/superscript.svg | 1 + src/editor/core/command/Command.ts | 12 +++++++ src/editor/core/command/CommandAdapt.ts | 47 +++++++++++++++++++++++-- src/editor/core/draw/Draw.ts | 11 ++++-- src/editor/core/event/CanvasEvent.ts | 7 ++-- src/editor/core/range/RangeManager.ts | 5 +++ src/editor/dataset/constant/Element.ts | 8 +++++ src/editor/interface/Element.ts | 6 +++- src/editor/interface/Listener.ts | 2 ++ src/editor/utils/clipboard.ts | 6 ++-- src/main.ts | 15 ++++++-- src/style.css | 8 +++++ 14 files changed, 122 insertions(+), 13 deletions(-) create mode 100644 src/assets/images/subscript.svg create mode 100644 src/assets/images/superscript.svg diff --git a/index.html b/index.html index 7948ea5..335df87 100644 --- a/index.html +++ b/index.html @@ -57,6 +57,12 @@ + +