From 314a042f0c357134b79efb0ebcede8447e1f606a Mon Sep 17 00:00:00 2001 From: joefalmko Date: Sun, 10 Nov 2024 20:51:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=8B=E5=8A=A8=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=A0=B7=E5=BC=8F=E7=9A=84=E5=B0=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E7=BE=8E=E5=8C=96=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ckeditor5/public/style.css | 17 +- ckeditor5/src/App.vue | 520 ++++++++++++++++-------------- ckeditor5/src/components/utils.js | 8 +- 3 files changed, 302 insertions(+), 243 deletions(-) diff --git a/ckeditor5/public/style.css b/ckeditor5/public/style.css index f43b293..b3854f2 100644 --- a/ckeditor5/public/style.css +++ b/ckeditor5/public/style.css @@ -328,4 +328,19 @@ opacity: .5; } } -} \ No newline at end of file +} + +.ck-content p.add_style_test { + font-family: SimHei; + color: green; + font-size: 19px; + font-style: italic; + font-weight: bold; + text-transform: full-width; + text-decoration: underline; + text-shadow: 4px 4px 5px rgba(0, 0, 0, 0.7); + text-align: center; + line-height: 2.0; + letter-spacing: 2px; + word-spacing: 2px; + } \ No newline at end of file diff --git a/ckeditor5/src/App.vue b/ckeditor5/src/App.vue index ff19a8b..b45f6e7 100644 --- a/ckeditor5/src/App.vue +++ b/ckeditor5/src/App.vue @@ -1,223 +1,253 @@ diff --git a/ckeditor5/src/components/utils.js b/ckeditor5/src/components/utils.js index 46f4833..6fa8107 100644 --- a/ckeditor5/src/components/utils.js +++ b/ckeditor5/src/components/utils.js @@ -1,7 +1,7 @@ // utils.js // 获取用户配置 -export async function getUserConfigFromBackend() { +export function getUserConfigFromBackend() { // TODO 请求用户配置 const options = {}; // 字体、字号、样式 @@ -138,10 +138,10 @@ export function getPageContent() { } // 获取并应用用户定义的样式 -export async function getAndApplyUserStyles() { +export function getAndApplyUserStyles() { // 模拟从后端获取用户定义的样式 - const response = await fetch('/api/user-styles'); - const styles = await response.json(); + const response = fetch('/api/user-styles'); + const styles = response.json(); const styleElement = document.createElement('style'); styleElement.innerHTML = styles; document.head.appendChild(styleElement);