2
0
Эх сурвалжийг харах

feat: visual editor code + sub/sup + table props

NGPixel 5 жил өмнө
parent
commit
4cb7f33dcf

+ 15 - 0
client/components/editor/editor-ckeditor.vue

@@ -159,6 +159,17 @@ $editor-height-mobile: calc(100vh - 56px - 16px);
     }
   }
 
+  .contents {
+    table {
+      margin: inherit;
+    }
+    pre > code {
+      background-color: unset;
+      color: unset;
+      padding: .15em;
+    }
+  }
+
   .ck.ck-toolbar {
     border: none;
     justify-content: center;
@@ -166,6 +177,10 @@ $editor-height-mobile: calc(100vh - 56px - 16px);
     color: #FFF;
   }
 
+  .ck.ck-toolbar__items {
+    justify-content: center;
+  }
+
   > .ck-editor__editable {
     background-color: mc('grey', '100');
     overflow-y: auto;

+ 1 - 1
package.json

@@ -199,7 +199,7 @@
     "@babel/preset-env": "^7.10.1",
     "@mdi/font": "5.3.45",
     "@panter/vue-i18next": "0.15.2",
-    "@requarks/ckeditor5": "12.4.0-wiki.16",
+    "@requarks/ckeditor5": "19.0.1-wiki.1",
     "@vue/babel-preset-app": "4.4.1",
     "animate-sass": "0.8.2",
     "animated-number-vue": "1.0.0",

+ 5 - 1
server/controllers/common.js

@@ -158,7 +158,11 @@ router.get(['/e', '/e/*'], async (req, res, next) => {
       content: null,
       title: null,
       description: null,
-      updatedAt: new Date().toISOString()
+      updatedAt: new Date().toISOString(),
+      extra: {
+        css: '',
+        js: ''
+      }
     }
 
     // -> From Template

+ 4 - 4
yarn.lock

@@ -2863,10 +2863,10 @@
   resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
   integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=
 
-"@requarks/ckeditor5@12.4.0-wiki.16":
-  version "12.4.0-wiki.16"
-  resolved "https://registry.yarnpkg.com/@requarks/ckeditor5/-/ckeditor5-12.4.0-wiki.16.tgz#ac025edac283df1cbb5dd9f838b5fe06d0a93e84"
-  integrity sha512-EVVxnbXU9PXGuBo58xSZziTzFQebYimczZOswQSPRIvJqaK0Xc1mqDmND6BSrUIAdue2j71+zukLudgYeKMKWQ==
+"@requarks/ckeditor5@19.0.1-wiki.1":
+  version "19.0.1-wiki.1"
+  resolved "https://registry.yarnpkg.com/@requarks/ckeditor5/-/ckeditor5-19.0.1-wiki.1.tgz#257b5b38e2fe9138474656856ce0d20bd99c8fda"
+  integrity sha512-q5l3I7rnL3zeIFqpI4ymMaQ0XJg4h0E7zbuuQt6JSGjTmZooiAIDLIguE2t4T6BdQjkATPw0THyfgyPGylMfgg==
 
 "@root/acme@^3.0.2":
   version "3.0.9"