From 28c818a8fbeeec3222c12f6c76243c90313e1f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E4=BA=91=E9=A3=9E?= Date: Fri, 18 Feb 2022 15:47:06 +0800 Subject: [PATCH] feat:add codeblock --- index.html | 3 + package.json | 4 ++ src/assets/images/codeblock.svg | 1 + src/components/dialog/Dialog.ts | 29 +++++++-- src/components/dialog/dialog.css | 9 +-- src/editor/core/command/Command.ts | 7 ++ src/editor/core/command/CommandAdapt.ts | 20 ++++++ src/editor/utils/element.ts | 4 +- src/main.ts | 49 ++++++++++++++ src/style.css | 4 ++ src/utils/prism.ts | 87 +++++++++++++++++++++++++ yarn.lock | 10 +++ 12 files changed, 214 insertions(+), 13 deletions(-) create mode 100644 src/assets/images/codeblock.svg create mode 100644 src/utils/prism.ts diff --git a/index.html b/index.html index e687f0a..2acc94c 100644 --- a/index.html +++ b/index.html @@ -154,6 +154,9 @@ +